Open
Description
Hello!
I was trying to build rust within Alpine linux and since it comes with musl
instead of glibc
I've bumped into this confusing error message from rustbuild.
$ make check
Traceback (most recent call last):
File "/home/test/rust/src/bootstrap/bootstrap.py", line 614, in <module>
main()
File "/home/test/rust/src/bootstrap/bootstrap.py", line 602, in main
bootstrap()
File "/home/test/rust/src/bootstrap/bootstrap.py", line 587, in bootstrap
rb.build_bootstrap()
File "/home/test/rust/src/bootstrap/bootstrap.py", line 377, in build_bootstrap
self.run(args, env)
File "/home/test/rust/src/bootstrap/bootstrap.py", line 380, in run
proc = subprocess.Popen(args, env=env)
File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make: *** [Makefile:54: check] Error 1
cargo
is there, in stage0 directory but since it's not compatible with musl
. execution fails.
My proposal is (thanks @matt36 for the idea) that we should catch the error and inform the user with more context.
$ make check
/home/test/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo could not be executed.
You might want to check your internet connection stability since it might be preventing
you from getting stage0 packages correctly.
If the archives are intact, then please check your operating system compatibility on prebuilt
stage0 binaries.
Go to: http://docs.rust-lang.org/some/docs/here for more information.
Build completed unsuccessfully in 0:00:00
make: *** [Makefile:54: check] Error 127
(If you're wondering "why cargo is not found?" please refer to #31322)
Thanks