Fatal Error building Redox at "Make All" stage


#1

Error building with make all. Not sure what’s going on.

   Compiling nvmed v0.1.0 (/home/owen/redox/cookbook/recipes/drivers/build/nvmed)
warning: unused import: `std::fs::File`
 --> nvmed/src/main.rs:9:5
  |
9 | use std::fs::File;
  |     ^^^^^^^^^^^^^
  |
  = note: #[warn(unused_imports)] on by default

warning: unused imports: `Read`, `Write`
  --> nvmed/src/main.rs:10:15
   |
10 | use std::io::{Read, Write};
   |               ^^^^  ^^^^^

warning: unused imports: `AsRawFd`, `FromRawFd`, `RawFd`
  --> nvmed/src/main.rs:11:25
   |
11 | use std::os::unix::io::{AsRawFd, FromRawFd, RawFd};
   |                         ^^^^^^^  ^^^^^^^^^  ^^^^^

warning: unused imports: `EVENT_READ`, `Event`, `Packet`, `Result`, `Scheme`
  --> nvmed/src/main.rs:12:15
   |
12 | use syscall::{EVENT_READ, MAP_WRITE, Event, Packet, Result, Scheme};
   |               ^^^^^^^^^^             ^^^^^  ^^^^^^  ^^^^^^  ^^^^^^

warning: struct is never constructed: `NvmeCmd`
 --> nvmed/src/nvme.rs:4:1
  |
4 | pub struct NvmeCmd {
  | ^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(dead_code)] on by default

warning: method is never used: `read`
  --> nvmed/src/nvme.rs:34:5
   |
34 |     pub fn read(cid: u16, lba: u64, count: u16, dst: u64) -> Self {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `write`
  --> nvmed/src/nvme.rs:52:5
   |
52 |     pub fn write(cid: u16, lba: u64, count: u16, src: u64) -> Self {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: field is never used: `intms`
  --> nvmed/src/nvme.rs:78:5
   |
78 |     intms: Mmio<u32>,
   |     ^^^^^^^^^^^^^^^^

warning: field is never used: `intmc`
  --> nvmed/src/nvme.rs:80:5
   |
80 |     intmc: Mmio<u32>,
   |     ^^^^^^^^^^^^^^^^

warning: field is never used: `cc`
  --> nvmed/src/nvme.rs:82:5
   |
82 |     cc: Mmio<u32>,
   |     ^^^^^^^^^^^^^

warning: field is never used: `csts`
  --> nvmed/src/nvme.rs:86:5
   |
86 |     csts: Mmio<u32>,
   |     ^^^^^^^^^^^^^^^

warning: field is never used: `nssr`
  --> nvmed/src/nvme.rs:88:5
   |
88 |     nssr: Mmio<u32>,
   |     ^^^^^^^^^^^^^^^

warning: field is never used: `aqa`
  --> nvmed/src/nvme.rs:90:5
   |
90 |     aqa: Mmio<u32>,
   |     ^^^^^^^^^^^^^^

warning: field is never used: `asq`
  --> nvmed/src/nvme.rs:92:5
   |
92 |     asq: Mmio<u64>,
   |     ^^^^^^^^^^^^^^

warning: field is never used: `acq`
  --> nvmed/src/nvme.rs:94:5
   |
94 |     acq: Mmio<u64>,
   |     ^^^^^^^^^^^^^^

warning: field is never used: `cmbloc`
  --> nvmed/src/nvme.rs:96:5
   |
96 |     cmbloc: Mmio<u32>,
   |     ^^^^^^^^^^^^^^^^^

warning: field is never used: `cmbsz`
  --> nvmed/src/nvme.rs:98:5
   |
98 |     cmbsz: Mmio<u32>,
   |     ^^^^^^^^^^^^^^^^

error: linking with `x86_64-unknown-redox-gcc` failed: exit code: 1
  |
  = note: "x86_64-unknown-redox-gcc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22.nvmed.52twmt1w-cgu.0.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22.nvmed.52twmt1w-cgu.1.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22.nvmed.52twmt1w-cgu.10.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22.nvmed.52twmt1w-cgu.11.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22.nvmed.52twmt1w-cgu.12.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22.nvmed.52twmt1w-cgu.2.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22.nvmed.52twmt1w-cgu.3.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22.nvmed.52twmt1w-cgu.4.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22.nvmed.52twmt1w-cgu.5.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22.nvmed.52twmt1w-cgu.6.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22.nvmed.52twmt1w-cgu.7.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22.nvmed.52twmt1w-cgu.8.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22.nvmed.52twmt1w-cgu.9.rcgu.o" "-o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/nvmed-7cee53a10aa51e22.4k81ngcold720h32.rcgu.o" "-Wl,--gc-sections" "-no-pie" "-Wl,-O1" "-nodefaultlibs" "-L" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps" "-L" "/home/owen/redox/cookbook/recipes/drivers/build/target/release/deps" "-L" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib" "-Wl,-Bstatic" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/libsyscall-909610a9988165ce.rlib" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/libspin-8cd28f31fa351a75.rlib" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/libbitflags-71604fae4475bd3e.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/libstd.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/libpanic_unwind-e3d21c1b9d3d4840.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/libunwind-4a4edc0fb3dff8b5.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/liballoc_system-28cd0f67f0999a8b.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/liblibc-763fd65b6572ae41.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/liballoc-bb719813941b365f.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/libcore-6cba0e5930de9649.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/libcompiler_builtins-39bbda0e349da6c3.rlib" "-Wl,-Bdynamic" "-lgcc" "-lc" "-lm"
  = note: /home/owen/redox/prefix/relibc-install/usr/lib/libc.a(compiler_builtins-a6b10d4b1c6df5c7.compiler_builtins.f1557lge-cgu.0.rcgu.o): In function `__udivti3':
          /rustc/15d770400eed9018f18bddf83dd65cb7789280a5/src/rustc/compiler_builtins_shim/../../libcompiler_builtins/src/macros.rs:254: multiple definition of `__udivti3'
          /home/owen/redox/prefix/gcc-install/lib/gcc/x86_64-unknown-redox/7.0.1/libgcc.a(_udivdi3.o):/home/owen/redox/prefix/gcc/libgcc/libgcc2.c:1029: first defined here
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

error: Could not compile `nvmed`.
warning: build failed, waiting for other jobs to finish...
error: linking with `x86_64-unknown-redox-gcc` failed: exit code: 1
  |
  = note: "x86_64-unknown-redox-gcc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.0.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.1.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.10.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.11.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.12.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.13.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.14.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.15.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.2.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.3.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.4.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.5.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.6.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.7.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.8.rcgu.o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.ahcid.dgom6i1a-cgu.9.rcgu.o" "-o" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/ahcid-41bca880cdc99ccd.34r3lgnydf88qf8q.rcgu.o" "-Wl,--gc-sections" "-no-pie" "-Wl,-O1" "-nodefaultlibs" "-L" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps" "-L" "/home/owen/redox/cookbook/recipes/drivers/build/target/release/deps" "-L" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib" "-Wl,-Bstatic" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/libbyteorder-b0d2c16cb5cfc848.rlib" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/libsyscall-909610a9988165ce.rlib" "/home/owen/redox/cookbook/recipes/drivers/build/target/x86_64-unknown-redox/release/deps/libspin-8cd28f31fa351a75.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/libstd.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/libpanic_unwind-e3d21c1b9d3d4840.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/libunwind-4a4edc0fb3dff8b5.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/liballoc_system-28cd0f67f0999a8b.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/liblibc-763fd65b6572ae41.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/liballoc-bb719813941b365f.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/libcore-6cba0e5930de9649.rlib" "/home/owen/redox/cookbook/xargo/lib/rustlib/x86_64-unknown-redox/lib/libcompiler_builtins-39bbda0e349da6c3.rlib" "-Wl,-Bdynamic" "-lgcc" "-lc" "-lm"
  = note: /home/owen/redox/prefix/relibc-install/usr/lib/libc.a(compiler_builtins-a6b10d4b1c6df5c7.compiler_builtins.f1557lge-cgu.0.rcgu.o): In function `__udivti3':
          /rustc/15d770400eed9018f18bddf83dd65cb7789280a5/src/rustc/compiler_builtins_shim/../../libcompiler_builtins/src/macros.rs:254: multiple definition of `__udivti3'
          /home/owen/redox/prefix/gcc-install/lib/gcc/x86_64-unknown-redox/7.0.1/libgcc.a(_udivdi3.o):/home/owen/redox/prefix/gcc/libgcc/libgcc2.c:1029: first defined here
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

error: Could not compile `ahcid`.

To learn more, run the command again with --verbose.
./repo.sh failed.mk/initfs.mk:2: recipe for target 'build/initfs.tag' failed
make: *** [build/initfs.tag] Error 1

I’m building on Debian setup using the bootstrap.sh script.


#2

I had a similar build error today. I’m using Debian testing. I’m guessing one of the dependencies required for building is out of date on Debian. Maybe try building using the Docker container for redox.


#3

I tried building again today on Debian (without using Docker) with a fresh clone of the repo and it was successful.


#4

Yeah Jackpot mentioned that on Reddit: