warricksothr / RustBuild

Scripts and patches to auto build Rustc and Cargo on ARM
MIT License
104 stars 8 forks source link

Rasbian Nightly Builds Stopped Working #4

Closed warricksothr closed 8 years ago

warricksothr commented 8 years ago

Latest stack trace from the Raspbian container.

Oct 01 10:37:24 aita BuildRust.sh[12488]: /build/rust/build/arm-unknown-linux-gnueabihf/llvm/Release/lib/libLLVMX86CodeGen.a(X86TargetMachine.o): In function `(anonymous namespace)::X86PassConfig::addPostRegAlloc()':
Oct 01 10:37:24 aita BuildRust.sh[12488]: X86TargetMachine.cpp:(.text._ZN12_GLOBAL__N_113X86PassConfig15addPostRegAllocEv+0x8): undefined reference to `llvm::createX86FloatingPointStackifierPass()'
Oct 01 10:37:24 aita BuildRust.sh[12488]: collect2: error: ld returned 1 exit status
Oct 01 10:37:24 aita BuildRust.sh[12488]: /build/rust/src/llvm/Makefile.rules:1434: recipe for target '/build/rust/build/arm-unknown-linux-gnueabihf/llvm/Release/bin/llc' failed
Oct 01 10:37:24 aita BuildRust.sh[12488]: make[3]: *** [/build/rust/build/arm-unknown-linux-gnueabihf/llvm/Release/bin/llc] Error 1
Oct 01 10:37:24 aita BuildRust.sh[12488]: make[3]: Leaving directory '/build/rust/build/arm-unknown-linux-gnueabihf/llvm/tools/llc'
Oct 01 10:37:24 aita BuildRust.sh[12488]: /build/rust/src/llvm/Makefile.rules:939: recipe for target 'llc/.makeall' failed
Oct 01 10:37:24 aita BuildRust.sh[12488]: make[2]: *** [llc/.makeall] Error 2
Oct 01 10:37:24 aita BuildRust.sh[12488]: make[2]: *** Waiting for unfinished jobs....
Oct 01 10:37:24 aita BuildRust.sh[12488]: llvm[3]: Compiling PrintSCC.cpp for Release build
Oct 01 10:37:26 aita BuildRust.sh[12488]: llvm[3]: Compiling opt.cpp for Release build
Oct 01 10:37:27 aita BuildRust.sh[12488]: llvm[3]: Linking Release executable llvm-extract (without symbols)
Oct 01 10:37:29 aita BuildRust.sh[12488]: llvm[3]: ======= Finished Linking Release Executable llvm-extract (without symbols)
Oct 01 10:37:29 aita BuildRust.sh[12488]: make[3]: Leaving directory '/build/rust/build/arm-unknown-linux-gnueabihf/llvm/tools/llvm-extract'
Oct 01 10:37:29 aita BuildRust.sh[12488]: llvm[3]: Compiling ToolRunner.cpp for Release build
Oct 01 10:37:30 aita BuildRust.sh[12488]: llvm[3]: Compiling bugpoint.cpp for Release build
Oct 01 10:37:42 aita BuildRust.sh[12488]: llvm[3]: Linking Release executable bugpoint (without symbols)
Oct 01 10:37:44 aita BuildRust.sh[12488]: llvm[3]: ======= Finished Linking Release Executable bugpoint (without symbols)
Oct 01 10:37:44 aita BuildRust.sh[12488]: make[3]: Leaving directory '/build/rust/build/arm-unknown-linux-gnueabihf/llvm/tools/bugpoint'
Oct 01 10:37:47 aita BuildRust.sh[12488]: llvm[3]: Linking Release executable opt (without symbols)
Oct 01 10:37:50 aita BuildRust.sh[12488]: /build/rust/build/arm-unknown-linux-gnueabihf/llvm/Release/lib/libLLVMX86CodeGen.a(X86TargetMachine.o): In function `(anonymous namespace)::X86PassConfig::addPostRegAlloc()':
Oct 01 10:37:50 aita BuildRust.sh[12488]: X86TargetMachine.cpp:(.text._ZN12_GLOBAL__N_113X86PassConfig15addPostRegAllocEv+0x8): undefined reference to `llvm::createX86FloatingPointStackifierPass()'
Oct 01 10:37:50 aita BuildRust.sh[12488]: collect2: error: ld returned 1 exit status
Oct 01 10:37:50 aita BuildRust.sh[12488]: /build/rust/src/llvm/Makefile.rules:1434: recipe for target '/build/rust/build/arm-unknown-linux-gnueabihf/llvm/Release/bin/opt' failed
Oct 01 10:37:50 aita BuildRust.sh[12488]: make[3]: *** [/build/rust/build/arm-unknown-linux-gnueabihf/llvm/Release/bin/opt] Error 1
Oct 01 10:37:50 aita BuildRust.sh[12488]: make[3]: Leaving directory '/build/rust/build/arm-unknown-linux-gnueabihf/llvm/tools/opt'
Oct 01 10:37:50 aita BuildRust.sh[12488]: /build/rust/src/llvm/Makefile.rules:939: recipe for target 'opt/.makeall' failed
Oct 01 10:37:50 aita BuildRust.sh[12488]: make[2]: *** [opt/.makeall] Error 2
Oct 01 10:37:50 aita BuildRust.sh[12488]: make[2]: Leaving directory '/build/rust/build/arm-unknown-linux-gnueabihf/llvm/tools'
Oct 01 10:37:50 aita BuildRust.sh[12488]: /build/rust/src/llvm/Makefile.rules:880: recipe for target 'all' failed
Oct 01 10:37:50 aita BuildRust.sh[12488]: make[1]: *** [all] Error 1
Oct 01 10:37:50 aita BuildRust.sh[12488]: make[1]: Leaving directory '/build/rust/build/arm-unknown-linux-gnueabihf/llvm'
Oct 01 10:37:50 aita BuildRust.sh[12488]: /build/rust/mk/llvm.mk:89: recipe for target '/build/rust/build/arm-unknown-linux-gnueabihf/llvm/Release/bin/llvm-config' failed
Oct 01 10:37:50 aita BuildRust.sh[12488]: make: *** [/build/rust/build/arm-unknown-linux-gnueabihf/llvm/Release/bin/llvm-config] Error 2
Oct 01 10:37:50 aita BuildRust.sh[12488]: Container RustBuild-raspbian failed with error code 2.
warricksothr commented 8 years ago

This is a recent development, so I think it might have to do with using the older compiler. The same issue does not happen on the more modern ARMv7 container.

So I'm going to compile and new cmake and new clang in the ARMv6 container and try to use those to build the Rust binaries.

Which means I may need some help testing on an older Raspberry Pi to confirm that the new build will not have messed with the glibc versions.
warricksothr commented 8 years ago

Compiling a new cmake and clang didn't resolve the issue. Looks like it might be a far more simple case of a llvm recipe that shouldn't exist anymore. Attempting a build after a proper cleaning of the required directory.

I built Clang 3.8 so I think I'll keep that around for the builds as long as it produces usable binaries with the correct glibc.

warricksothr commented 8 years ago

1.5.0 Nightly just built on Raspbian with Clang 3.8. Need to test this on a Raspberry Pi to confirm that it is behaving as expected.

warricksothr commented 8 years ago

Success!!! Switched to Clang 3.7, crosscompiled LLVM and Clang and we're now up and running again. New Raspbian builds will be built on Clang 3.7 as it seems GCC 4.8 will no longer build Rust reliably.

pi@raspberrypi ~/dev/hello_world $ rustc -vV
rustc 1.5.0-dev (e50298f7b 2015-10-07)
binary: rustc
commit-hash: e50298f7b53d4f51c936c0f61e282d6cb7ff2a19
commit-date: 2015-10-07
host: arm-unknown-linux-gnueabihf
release: 1.5.0-dev
pi@raspberrypi ~/dev/hello_world $ cargo -V
cargo 0.6.0-nightly (1e5fa84 2015-10-08)
pi@raspberrypi ~/dev/hello_world $ cargo clean
pi@raspberrypi ~/dev/hello_world $ cargo build
   Compiling hello_world v0.1.0 (file:///home/pi/dev/hello_world)
pi@raspberrypi ~/dev/hello_world $ cargo run
     Running `target/debug/hello_world`
Hello, world!
pi@raspberrypi ~/dev/hello_world $

Going to let the autobuild process take over this again.