Failed to build Redox using Docker images with the toolchain. ahcid error.
Created by: SanchayanMaity
Reproduction: Follow instructions for building redox using docker images as per here
Expected behavior: Runs redox
Actual behavior: Build for ahcid fails at the fourth step.
Log:
docker run --cap-add MKNOD --cap-add SYS_ADMIN -e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" --device /dev/fuse -v "$(pwd):/home/user/src" --rm redox make fetch all
cd cookbook; \
./fetch.sh "$(cargo run --manifest-path ../installer/Cargo.toml -- --list-packages ../initfs.toml ../filesystem.toml)"
Updating git repository `https://github.com/redox-os/pkgutils.git`
Updating git repository `https://github.com/redox-os/userutils.git`
Updating git repository `https://github.com/redox-os/tar-rs`
Updating git repository `https://github.com/libOctavo/octavo.git`
Updating git repository `https://github.com/ids1024/pb`
Updating git repository `https://github.com/redox-os/arg-parser.git`
Updating git repository `https://github.com/redox-os/libextra.git`
Updating git repository `https://github.com/redox-os/termion.git`
Downloading termion v1.5.1
Downloading serde_derive v0.8.23
Downloading liner v0.1.5
Downloading serde v1.0.11
Downloading toml v0.4.5
Downloading version-compare v0.0.4
Downloading serde_derive v1.0.11
Downloading hyper v0.10.12
Downloading clap v2.26.0
Downloading libflate v0.1.11
Downloading hyper-rustls v0.6.1
Downloading unicode-width v0.1.4
Downloading libc v0.2.29
Downloading winapi v0.2.8
Downloading time v0.1.38
Downloading kernel32-sys v0.2.2
Downloading winapi-build v0.1.1
Downloading quote v0.3.15
Downloading serde_derive_internals v0.15.1
Downloading syn v0.11.11
Downloading synom v0.11.3
Downloading unicode-xid v0.0.4
Downloading httparse v1.2.3
Downloading base64 v0.5.2
Downloading mime v0.2.6
Downloading num_cpus v1.6.2
Downloading unicase v1.4.2
Downloading traitobject v0.1.0
Downloading typeable v0.1.2
Downloading url v1.5.1
Downloading log v0.3.8
Downloading language-tags v0.2.2
Downloading byteorder v1.1.0
Downloading version_check v0.1.3
Downloading matches v0.1.6
Downloading percent-encoding v1.0.0
Downloading idna v0.1.4
Downloading unicode-bidi v0.3.4
Downloading unicode-normalization v0.1.5
Downloading bitflags v0.9.1
Downloading vec_map v0.8.0
Downloading unicode-segmentation v1.2.0
Downloading textwrap v0.7.0
Downloading term_size v0.3.0
Downloading adler32 v1.0.1
Downloading rustls v0.9.0
Downloading webpki-roots v0.11.0
Downloading ring v0.11.0
Downloading untrusted v0.5.0
Downloading webpki v0.14.0
Downloading base64 v0.6.0
Downloading rayon v0.7.1
Downloading gcc v0.3.52
Downloading rayon-core v1.2.1
Downloading lazy_static v0.2.8
Downloading coco v0.1.1
Downloading futures v0.1.14
Downloading either v1.1.0
Downloading scopeguard v0.3.2
Downloading safemem v0.2.0
Downloading byteorder v0.5.3
Downloading generic-array v0.2.1
Downloading static-buffer v0.2.0
Downloading typenum v1.9.0
Downloading redox_termios v0.1.1
Downloading redox_syscall v0.1.30
Downloading argon2rs v0.2.5
Downloading scoped_threadpool v0.1.7
Downloading blake2-rfc v0.2.17
Downloading constant_time_eq v0.1.3
Downloading serde_codegen v0.8.23
Downloading syn v0.10.8
Downloading serde_codegen_internals v0.11.3
Downloading xattr v0.1.11
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `/home/user/src/installer/target/debug/redox_installer --list-packages ../initfs.toml ../filesystem.toml`
cook - drivers fetch
Already up-to-date.
cook - init fetch
Already up-to-date.
cook - redoxfs fetch
Already up-to-date.
cook - coreutils fetch
Already up-to-date.
cook - drivers fetch
Already up-to-date.
cook - extrautils fetch
Already up-to-date.
cook - findutils fetch
Already up-to-date.
cook - ion fetch
Already up-to-date.
cook - netstack fetch
Already up-to-date.
cook - netutils fetch
Already up-to-date.
cook - orbdata fetch
Already up-to-date.
Synchronizing submodule url for 'icons'
cook - orbital fetch
Already up-to-date.
cook - orbterm fetch
Already up-to-date.
cook - orbutils fetch
Already up-to-date.
cook - pkgutils fetch
Already up-to-date.
cook - ptyd fetch
Already up-to-date.
cook - randd fetch
Already up-to-date.
cook - smith fetch
Already up-to-date.
cook - userutils fetch
Already up-to-date.
cook - uutils fetch
Already up-to-date.
cd kernel && xargo clean
rm -rf build/initfs
cargo run --manifest-path installer/Cargo.toml -- --cookbook=cookbook initfs.toml
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `installer/target/debug/redox_installer --cookbook=cookbook initfs.toml`
Install Config {
general: GeneralConfig {
prompt: false,
sysroot: Some(
"build/initfs"
)
},
packages: {
"drivers": PackageConfig {
version: None,
git: None,
path: None
},
"init": PackageConfig {
version: None,
git: None,
path: None
},
"redoxfs": PackageConfig {
version: None,
git: None,
path: None
}
},
files: [
FileConfig {
path: "/etc/init.rc",
data: "export PATH /bin\nexport TMPDIR /tmp\nvesad T T G\nstdio display:1\nps2d\npcid /etc/pcid/initfs.toml\nredoxfs disk:0 file\ncd file:\nexport PATH file:/bin\nrun.d /etc/init.d\n",
symlink: false
}
],
users: {}
}
Create directory /home/user/src/build/initfs/
repo - building drivers
cook - drivers build
Updating git repository `https://github.com/redox-os/netutils.git`
Updating git repository `https://github.com/redox-os/event.git`
Updating git repository `https://github.com/willem66745/ntpclient-rust`
Updating git repository `https://github.com/a8m/pb`
Downloading bitflags v0.7.0
Downloading spin v0.4.5
Downloading hyper v0.10.13
Downloading orbclient v0.3.8
Downloading ransid v0.2.10
Downloading redox_event v0.1.0
Downloading plain v0.2.1
Compiling ahcid v0.1.0 (file:///home/user/src/cookbook/recipes/drivers/build/ahcid)
Compiling synom v0.11.3
Compiling num_cpus v1.6.2
Compiling rand v0.3.16
error: unused extern crate
--> ahcid/src/main.rs:4:1
|
4 | extern crate bitflags;
| ^^^^^^^^^^^^^^^^^^^^^^
|
note: lint level defined here
--> ahcid/src/main.rs:1:9
|
1 | #![deny(warnings)]
| ^^^^^^^^
= note: #[deny(unused_extern_crates)] implied by #[deny(warnings)]
error: aborting due to previous error
error: Could not compile `ahcid`.
warning: build failed, waiting for other jobs to finish...
error: build failed
./repo.sh failed.make: *** [build/initfs.tag] Error 1
mk/initfs.mk:2: recipe for target 'build/initfs.tag' failed
Workaround: Workaround pointed by @fengalin.
docker run --cap-add MKNOD --cap-add SYS_ADMIN \
-e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" \
--device /dev/fuse -v "$(pwd):/home/user/src" --rm redox bash -c "RUSTFLAGS=\"-A unused_extern_crates\" make fetch all"
If the above does not fit the nature of the issue feel free to modify it.