[Linux] Building Rust from source fails with exit code 101


#1

I’m trying to follow the instructions to build Rust from source for Linux. When I run /x.py build I get the following error:

expected success, got: exit code: 101 thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9 note: Run withRUST_BACKTRACE=1for a backtrace. failed to run: /home/jen/rust/build/bootstrap/debug/bootstrap build Build completed unsuccessfully in 0:12:54

The full error message can be found here: https://gist.github.com/jfswitzer/52a7817be36f7de5e746ebee1991c72c

I’ve encountered the same error on two separate VMs running on different laptops. Both were 64-bit Ubuntu 16.04 machines.

I’ve tried running ./x.py clean but it didn’t seem to help, and ./x.py check also failed. I checked that my dependencies were up to date, tried uninstalling the previous version of Rust that I had installed beforehand, and tried running it with Cargo both installed & uninstalled.

Any tips for what to try next?


#2

That’s not the full error message, just the final report of the build system exiting on error. There should be a lot more information before that error: Could not compile `rustc`.


#3

Oh, one thing I can see though is a SIGKILL, which would most likely be an out-of-memory situation. You might even see an OOM reported by the kernel in dmesg output. How much memory do you have allocated to your VM?


#4

Thanks for the tip, it appears it was an out-of-memory error. I only had 1GB of RAM allocated. Upped that to 4GB and the issue seems to be resolved.