Authored by Robin Randhawa

Situation with current checkout: x86_64-unknown-redox

Some notes to keep me sane which I promised @mich.

I had to fix a number of things to get the build going. The resulting build begins running but quickly bombs out.

The console log is attached.

This list is not complete. I'm pretty sure I missed a few steps out. I'll try and update it by doing (another) from-scratch build sometime today.

  • Fixing toolchain breakage

    The toolchain build invocation I used:

    $ PREFIX_RUSTC=1 PREFIX_BINARY=0 make prefix
    • libstdc++-v3 breakage

      The failure here was due to libstdc++-v3 doing a gc-sections check on ld and that failing and triggering the infamous 'gcc_no_link Link tests are not allowed after GCC_NO_EXECUTABLES' error.

      The hack that worked was applying the following patch to GCC as under to disable libstdc++-v3.

      $ cd prefix/x86_64-unknown-redox/gcc
      $ patch -p1 <<'EOF'
      diff --git a/configure b/configure
      --- a/configure
      +++ b/configure
      @@ -3356,6 +3356,9 @@ if test "${ENABLE_LIBSTDCXX}" = "default" ; then
             noconfigdirs="$noconfigdirs target-libstdc++-v3"
      +    *-*-redox)
      +      noconfigdirs="$noconfigdirs target-libstdc++-v3"
      +      ;;
    • Cannot remove $ROOT/prefix/x86_64-unknown-redox/gcc-install.partial/x86_64-unknown-redox/lib/*.la

      [Note that ROOT is the top-level of the redox source checkout].

      To fix this I used the following:

      $ patch -p1 <<'EOF'
      diff --git a/mk/ b/mk/
      --- a/mk/
      +++ b/mk/
      @@ -214,7 +214,7 @@ $(PREFIX)/gcc-install: $(PREFIX)/gcc | $(PREFIX)/relibc-freestanding-install
      && \
              make -j `$(NPROC)` all-gcc all-target-libgcc all-target-libstdc++-v3 && \
              make -j `$(NPROC)` install-gcc install-target-libgcc install-target-libstdc++-v3 DESTDIR="$(ROOT)/$@.partial" && \
      -       rm $(ROOT)/$@.partial/$(TARGET)/lib/*.la
      +       rm -rf $(ROOT)/$@.partial/$(TARGET)/lib/*.la
              rm -rf "$<-build"
              cd "$@.partial" && $(PREFIX_STRIP)
              touch "$@.partial"

    At this point the prefix toolchain built successfully.

  • Other problems (in the order encountered)

    I then proceeded to build the complete redox suite as follows:

    $ PREFIX_RUSTC=1 PREFIX_BINARY=0 make qemu kvm=no vga=no
    • thread 'main' panicked at 'RUST_COMPILER_RT_ROOT is not set'

      To silence the RUST_COMPILER_RT_ROOT complaint I used the following invocation to try and build the prefix.

      $ RUST_COMPILER_RT_ROOT=$PWD/rust/src/llvm-project/compiler-rt/ PREFIX_RUSTC=1 PREFIX_BINARY=0 make qemu kvm=no vga=no
    • Invalid mio-uds dependencies

      • A number of cookbook recipes broke because of stale Cargo.lock files. I don't have the list here but if you do see an mio-uds problem try a cargo update in the src sub-directory of the recipe.

12.8 KB
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment