Failed to build redox on Ubuntu


#1

Failed to build redox on Ubuntu:

lafolle@yoss:~/rustlang/redox$ make qemu
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/lafolle/rustlang/redox/build/initfs/
repo - building drivers
cook - drivers build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling gcc v0.3.54
   Compiling libc v0.2.31
   Compiling core v0.0.0 (file:///home/lafolle/rustlang/redox/rust/src/libcore)
   Compiling libc v0.0.0 (file:///home/lafolle/rustlang/redox/rust/src/rustc/libc_shim)
   Compiling unwind v0.0.0 (file:///home/lafolle/rustlang/redox/rust/src/libunwind)
   Compiling filetime v0.1.12
   Compiling build_helper v0.1.0 (file:///home/lafolle/rustlang/redox/rust/src/build_helper)
   Compiling compiler_builtins v0.0.0 (file:///home/lafolle/rustlang/redox/rust/src/rustc/compiler_builtins_shim)
   Compiling std v0.0.0 (file:///home/lafolle/rustlang/redox/rust/src/libstd)
   Compiling rand v0.0.0 (file:///home/lafolle/rustlang/redox/rust/src/librand)
   Compiling std_unicode v0.0.0 (file:///home/lafolle/rustlang/redox/rust/src/libstd_unicode)
   Compiling panic_abort v0.0.0 (file:///home/lafolle/rustlang/redox/rust/src/libpanic_abort)
   Compiling alloc v0.0.0 (file:///home/lafolle/rustlang/redox/rust/src/liballoc)
   Compiling alloc_system v0.0.0 (file:///home/lafolle/rustlang/redox/rust/src/liballoc_system)
   Compiling collections v0.0.0 (file:///home/lafolle/rustlang/redox/rust/src/libcollections)
   Compiling panic_unwind v0.0.0 (file:///home/lafolle/rustlang/redox/rust/src/libpanic_unwind)
warning: dropping unsupported crate type `dylib` for target `x86_64-unknown-redox`

    Finished release [optimized] target(s) in 36.73 secs
 Downloading redox_syscall v0.1.31
 Downloading spin v0.4.5
 Downloading hyper v0.10.13
 Downloading untrusted v0.5.1
 Downloading futures v0.1.16
 Downloading serde_derive v1.0.15
 Downloading serde v1.0.15
 Downloading serde_derive_internals v0.16.0
 Downloading orbclient v0.3.11
 Downloading ransid v0.2.10
   Compiling traitobject v0.1.0
   Compiling winapi-build v0.1.1
   Compiling matches v0.1.6
   Compiling quote v0.3.15
   Compiling gcc v0.3.54
   Compiling language-tags v0.2.2
   Compiling untrusted v0.5.1
   Compiling arg_parser v0.1.0 (https://github.com/redox-os/arg-parser.git#288d2fd9)
   Compiling log v0.3.8
   Compiling safemem v0.2.0
   Compiling byteorder v1.1.0
   Compiling either v1.1.0
   Compiling unicode-normalization v0.1.5
   Compiling httparse v1.2.3
   Compiling scopeguard v0.3.2
   Compiling byteorder v0.5.3
   Compiling winapi v0.2.8
   Compiling bitflags v0.7.0
   Compiling percent-encoding v1.0.0
   Compiling typeable v0.1.2
   Compiling extra v0.1.0 (https://github.com/redox-os/libextra.git#40293208)
   Compiling spin v0.4.5
   Compiling serde v1.0.15
   Compiling unicode-xid v0.0.4
   Compiling libc v0.2.31
   Compiling lazy_static v0.2.8
   Compiling version_check v0.1.3
   Compiling ransid v0.2.10
   Compiling rayon-core v1.2.1
   Compiling redox_syscall v0.1.31
   Compiling futures v0.1.16
   Compiling unicode-bidi v0.3.4
   Compiling kernel32-sys v0.2.2
   Compiling base64 v0.6.0
   Compiling mime v0.2.6
   Compiling coco v0.1.1
   Compiling synom v0.11.3
   Compiling num_cpus v1.6.2
   Compiling bgad v0.1.0 (file:///home/lafolle/rustlang/redox/cookbook/recipes/drivers/build/bgad)
   Compiling ahcid v0.1.0 (file:///home/lafolle/rustlang/redox/cookbook/recipes/drivers/build/ahcid)
   Compiling xhcid v0.1.0 (file:///home/lafolle/rustlang/redox/cookbook/recipes/drivers/build/xhcid)
warning: unused import: `xhci::Xhci`
 --> xhcid/src/main.rs:7:5
  |
7 | use xhci::Xhci;
  |     ^^^^^^^^^^
  |
  = note: #[warn(unused_imports)] on by default

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...
warning: struct is never used: `Trb`
  --> xhcid/src/xhci.rs:6:1
   |
6  | / struct Trb {
7  | |     pub data: u64,
8  | |     pub status: u32,
9  | |     pub control: u32,
10 | | }
   | |_^
   |
   = note: #[warn(dead_code)] on by default

warning: method is never used: `from_type`
  --> xhcid/src/xhci.rs:13:5
   |
13 | /     pub fn from_type(trb_type: u32) -> Self {
14 | |         Trb {
15 | |             data: 0,
16 | |             status: 0,
17 | |             control: (trb_type & 0x3F) << 10,
18 | |         }
19 | |     }
   | |_____^

warning: struct is never used: `XhciCap`
  --> xhcid/src/xhci.rs:23:1
   |
23 | / pub struct XhciCap {
24 | |     len: Mmio<u8>,
25 | |     _rsvd: Mmio<u8>,
26 | |     hci_ver: Mmio<u16>,
...  |
33 | |     hcc_params2: Mmio<u32>
34 | | }
   | |_^

warning: struct is never used: `XhciOp`
  --> xhcid/src/xhci.rs:37:1
   |
37 | / pub struct XhciOp {
38 | |     usb_cmd: Mmio<u32>,
39 | |     usb_sts: Mmio<u32>,
40 | |     page_size: Mmio<u32>,
...  |
46 | |     config: Mmio<u32>,
47 | | }
   | |_^

warning: struct is never used: `XhciPort`
  --> xhcid/src/xhci.rs:76:1
   |
76 | / pub struct XhciPort {
77 | |     portsc : Mmio<u32>,
78 | |     portpmsc : Mmio<u32>,
79 | |     portli : Mmio<u32>,
80 | |     porthlpmc : Mmio<u32>,
81 | | }
   | |_^

warning: method is never used: `read`
  --> xhcid/src/xhci.rs:84:5
   |
84 | /     fn read(&self) -> u32 {
85 | |         self.portsc.read()
86 | |     }
   | |_____^

warning: method is never used: `state`
  --> xhcid/src/xhci.rs:88:5
   |
88 | /     fn state(&self) -> u32 {
89 | |         (self.read() & (0b1111 << 5)) >> 5
90 | |     }
   | |_____^

warning: method is never used: `speed`
  --> xhcid/src/xhci.rs:92:5
   |
92 | /     fn speed(&self) -> u32 {
93 | |         (self.read() & (0b1111 << 10)) >> 10
94 | |     }
   | |_____^

warning: method is never used: `flags`
  --> xhcid/src/xhci.rs:96:5
   |
96 | /     fn flags(&self) -> XhciPortFlags {
97 | |         XhciPortFlags::from_bits_truncate(self.read())
98 | |     }
   | |_____^

warning: struct is never used: `XhciDoorbell`
   --> xhcid/src/xhci.rs:101:1
    |
101 | pub struct XhciDoorbell(Mmio<u32>);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `read`
   --> xhcid/src/xhci.rs:104:5
    |
104 | /     fn read(&self) -> u32 {
105 | |         self.0.read()
106 | |     }
    | |_____^

warning: method is never used: `write`
   --> xhcid/src/xhci.rs:108:5
    |
108 | /     fn write(&mut self, data: u32) {
109 | |         self.0.write(data);
110 | |     }
    | |_____^

warning: struct is never used: `XhciSlotContext`
   --> xhcid/src/xhci.rs:114:1
    |
114 | / pub struct XhciSlotContext {
115 | |     inner: [u8; 32]
116 | | }
    | |_^

warning: struct is never used: `XhciEndpointContext`
   --> xhcid/src/xhci.rs:119:1
    |
119 | / pub struct XhciEndpointContext {
120 | |     inner: [u8; 32]
121 | | }
    | |_^

warning: struct is never used: `XhciDeviceContext`
   --> xhcid/src/xhci.rs:124:1
    |
124 | / pub struct XhciDeviceContext {
125 | |     slot: XhciSlotContext,
126 | |     endpoints: [XhciEndpointContext; 15]
127 | | }
    | |_^

warning: struct is never used: `Xhci`
   --> xhcid/src/xhci.rs:129:1
    |
129 | / pub struct Xhci {
130 | |     cap: &'static mut XhciCap,
131 | |     op: &'static mut XhciOp,
132 | |     ports: &'static mut [XhciPort],
...   |
136 | |     cmds: Dma<[Trb; 256]>,
137 | | }
    | |_^

warning: method is never used: `new`
   --> xhcid/src/xhci.rs:140:5
    |
140 | /     pub fn new(address: usize) -> Result<Xhci> {
141 | |         let cap = unsafe { &mut *(address as *mut XhciCap) };
142 | |
143 | |         let op_base = address + cap.len.read() as usize;
...   |
214 | |         Ok(xhci)
215 | |     }
    | |_____^

warning: method is never used: `init`
   --> xhcid/src/xhci.rs:217:5
    |
217 | /     pub fn init(&mut self) {
218 | |         for (i, port) in self.ports.iter().enumerate() {
219 | |             let data = port.read();
220 | |             let state = port.state();
...   |
224 | |         }
225 | |     }
    | |_____^

error: build failed
./repo.sh failed.mk/initfs.mk:2: recipe for target 'build/initfs.tag' failed
make: *** [build/initfs.tag] Error 1

Rust version: rustc 1.22.0-nightly (325ba23d5 2017-09-19)