How to build rust in solitude?

I have a situation where I need to be able to and and re-build rust on an x86_64 CentOS system that will never be connected to the web once it goes into service.
To effect that, I

  • Downloaded the rust 1.35 binary kit to use as a bootstrap compiler
  • Downloaded the rust 1.36 source tar file
  • Borrowed most of the ./configure argument list from the EPEL rust src.rpm file:
    --build={rust_triple} --host={rust_triple}
    --target={rust_triple} --python=/usr/local/bin/python2 --local-rust-root={tmp_rust}
    --disable-codegen-tests
    --disable-rpath
    --enable-extended
    --enable-vendor
    --enable-verbose-tests
    --release-channel=static
    --set rust.codegen-units-std=1
  • Edited the resulting config.toml file to use GCC 8 for the "cc" and "cxx" compilers

This process gets me really close! But after an hour, the build dies with

test [run-make] run-make-fulldeps/mixing-formats ... ok
test [run-make] run-make-fulldeps/long-linker-command-lines ... ok

failures:

---- [run-make] run-make-fulldeps/linker-output-non-utf8 stdout ----

error: make failed
status: exit code: 2
command: "make"
stdout:
------------------------------------------
make[1]: Entering directory `/opt/local/proj/swstack/packages/rust/rustc-1.36.0-src/src/test/run-make-fulldeps/linker-output-non-utf8'
...
LD_LIBRARY_PATH="/home/riebs/rust/rustc-1.36.0-src/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/linker-output-non-utf8/linker-output-non-utf8:/home/riebs/rust/rustc-1.36.0-src/build/x86_64-unknown-linux-gnu/stage2/lib:/home/riebs/rust/rustc-1.36.0-src/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/home/riebs/rust/tmp_rust/lib:/home/riebs/sw/gcc/8.2.0/lib64:/home/riebs/sw/gcc/8.2.0/lib:/home/riebs/sw/gdb/8.2/lib:/home/riebs/sw/binutils/2.31.1/lib:/home/riebs/sw/gmp/6.1.2/lib" '/home/riebs/rust/rustc-1.36.0-src/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /home/riebs/rust/rustc-1.36.0-src/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/linker-output-non-utf8/linker-output-non-utf8 -L /home/riebs/rust/rustc-1.36.0-src/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/linker-output-non-utf8/linker-output-non-utf8  -L /home/riebs/rust/rustc-1.36.0-src/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/linker-output-non-utf8/linker-output-non-utf8/zzz$'\xff' exec.rs 2>&1 | "/home/riebs/rust/rustc-1.36.0-src/src/etc/cat-and-grep.sh" this_symbol_not_defined
[[[ begin stdout ]]]
error: Argument 6 is not valid Unicode: "/home/riebs/rust/rustc-1.36.0-src/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/linker-output-non-utf8/linker-output-non-utf8/zzz\xFF"

[[[ end stdout ]]]
Error: cannot match: this_symbol_not_defined
make[1]: Leaving directory `/home/riebs/rust/rustc-1.36.0-src/src/test/run-make-fulldeps/linker-output-non-utf8'

------------------------------------------
stderr:
------------------------------------------
make[1]: *** [all] Error 1

Any thoughts about where I should go from here?

That is, I need to be able to "build and re-build rust..."

That's a failure in the test suite. The compiler itself was built just fine.

As for why that test is failing? I have no idea. It reads as if the thing is supposed to give an error, and is designed to check the compiler's ability to handle it?

Thanks! Not 5 minutes ago, I ran "make check" with that test deleted, and the world was happy again. With your confirmation, I'll proceed with great confidence!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.