Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage2 install issue #41467

Closed
rezso opened this issue Apr 22, 2017 · 9 comments
Closed

Stage2 install issue #41467

rezso opened this issue Apr 22, 2017 · 9 comments
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@rezso
Copy link

rezso commented Apr 22, 2017

Install docs stage2 (i686-unknown-linux-gnu)
touch: cannot touch '/usr/lib/rust-install-probe': Permission denied
install: error: can't write to destination. consider sudo.

command did not execute successfully: "sh" "/var/uhubuild/work/compile/build/tmp/dist/rust-docs-1.18.0-i686-unknown-linux-gnu/install.sh" "--prefix=/usr" "--docdir=/usr/share/doc/rust" "--libdir=/usr/lib" "--mandir=/usr/share/man" "--disable-ldconfig"
expected success, got: exit code: 1

Why NEED to run install 3 times, and why not works under chroot?

@Mark-Simulacrum Mark-Simulacrum added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jun 22, 2017
@Mark-Simulacrum
Copy link
Member

Without more details, I don't think this issue is actionable. Can you create the file manually (touch /usr/lib/rust-install-probe)? I don't know what you mean by "need to run install 3 times," I believe make install should install rust into the configured directories.

@Mark-Simulacrum
Copy link
Member

Closing. Let us know if you can respond to my questions above and we'll reopen.

@rezso
Copy link
Author

rezso commented Jul 27, 2017

Sorry, I don't saw your questions, I think the email is lost.
So, I build everything under chroot. This means, I need to create /var/uhubuild/work/install/usr/lib/rust-install-probe instead of /usr/lib/rust-install-probe. I don't saw any option to add install prefix,
And yes, I can create manually, but this file will be lost on the next or restarted build, because rust compiled 3 times.
But because I need rust compiler just for compiling a small rust code in Firefox, I simply use the precompiled binary now.

@Mark-Simulacrum
Copy link
Member

don't saw any option to add install prefix

You should be able to copy src/bootstrap/config.toml.example next to x.py and edit the prefix field under [install] to specify an installation prefix.

I'm still not clear what you mean by rust will compile 3 times, but perhaps you're referring to the compiler bootstrapping itself. A build log would be helpful. Using precompiled binaries is probably a good bet for compiling firefox, though installing from source should work.

@Mark-Simulacrum
Copy link
Member

@rezso Is there a chance you could get back to me if adding the prefix worked? A build log would be appreciated as well, and if possible, full reproducible steps.

@rezso
Copy link
Author

rezso commented Sep 16, 2017

The build system always tries to download anything, but it fails, because the internet connection not works for me under chroot currently (I don't know why, previously worked):

running: /usr/bin/cargo build --manifest-path /var/uhubuild/work/compile/src/bootstrap/Cargo.toml --verbose
Updating registry https://github.com/rust-lang/crates.io-index
Warning: Transient problem: timeout Will retry in 2 seconds. 2 retries left.
warning: spurious network error (2 tries remaining): [12/-1] Failed to resolve address for github.com: Temporary failure in name resolution
Warning: Transient problem: timeout Will retry in 4 seconds. 1 retries left.
warning: spurious network error (1 tries remaining): [12/-1] Failed to resolve address for github.com: Temporary failure in name resolution
curl: (6) Couldn't resolve host 'static.rust-lang.org'

spurious failure, trying again
downloading https://static.rust-lang.org/dist/2017-07-20/rust-std-1.19.0-i686-unknown-linux-gnu.tar.gz.sha256
running: curl -# --retry 3 -Sf -o /tmp/tmpSm5jHg.sha256 https://static.rust-lang.org/dist/2017-07-20/rust-std-1.19.0-i686-unknown-linux-gnu.tar.gz.sha256
error: failed to fetch https://github.com/rust-lang/crates.io-index

Caused by:
[12/-1] Failed to resolve address for github.com: Temporary failure in name resolution
Traceback (most recent call last):
File "/var/uhubuild/work/compile/src/bootstrap/bootstrap.py", line 711, in
main()
File "/var/uhubuild/work/compile/src/bootstrap/bootstrap.py", line 694, in main
bootstrap()
File "/var/uhubuild/work/compile/src/bootstrap/bootstrap.py", line 675, in bootstrap
rb.build_bootstrap()
File "/var/uhubuild/work/compile/src/bootstrap/bootstrap.py", line 423, in build_bootstrap
run(args, env=env, verbose=self.verbose)
File "/var/uhubuild/work/compile/src/bootstrap/bootstrap.py", line 147, in run
raise RuntimeError(err)
RuntimeError: failed to run: /usr/bin/cargo build --manifest-path /var/uhubuild/work/compile/src/bootstrap/Cargo.toml --verbose
make: *** [Makefile:24: all] Error 1

I tried to compile the 1.20 release from relase tarball.

@rezso
Copy link
Author

rezso commented Oct 24, 2017

Okay, I solved the network error.
I try to compile 1.20.0 on 64 bit:

running: /var/uhubuild/work/compile/build/bootstrap/debug/bootstrap build
finding compilers
CC_x86_64-unknown-linux-gnu = "cc"
AR_x86_64-unknown-linux-gnu = "ar"
CC_x86_64-unknown-linux-gnu = "cc"
AR_x86_64-unknown-linux-gnu = "ar"
CXX_x86_64-unknown-linux-gnu = "c++"
CXX_x86_64-unknown-linux-gnu = "c++"
running sanity check
thread 'main' panicked at 'FileCheck executable "/usr/bin/FileCheck" does not exist', src/bootstrap/sanity.rs:144:8
note: Run with RUST_BACKTRACE=1 for a backtrace.
Traceback (most recent call last):
File "/var/uhubuild/work/compile/src/bootstrap/bootstrap.py", line 711, in
main()
File "/var/uhubuild/work/compile/src/bootstrap/bootstrap.py", line 694, in main
bootstrap()
File "/var/uhubuild/work/compile/src/bootstrap/bootstrap.py", line 686, in bootstrap
run(args, env=env, verbose=rb.verbose)
File "/var/uhubuild/work/compile/src/bootstrap/bootstrap.py", line 147, in run
raise RuntimeError(err)
RuntimeError: failed to run: /var/uhubuild/work/compile/build/bootstrap/debug/bootstrap build
make: *** [Makefile:24: all] Error 1

I get similar "thread 'main' panicked" error with precompiled 64-bit binary, if I try to compile firefox with it:

thread 'main' panicked at 'called Result::unwrap() on an Err value: Any', /checkout/src/libcore/result.rs:860:4
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::_print
at /checkout/src/libstd/sys_common/backtrace.rs:71
2: std::panicking::default_hook::{{closure}}
at /checkout/src/libstd/sys_common/backtrace.rs:60
at /checkout/src/libstd/panicking.rs:380
3: std::panicking::default_hook
at /checkout/src/libstd/panicking.rs:396
4: std::panicking::rust_panic_with_hook
at /checkout/src/libstd/panicking.rs:611
5: std::panicking::begin_panic_new
at /checkout/src/libstd/panicking.rs:553
6: std::panicking::begin_panic_fmt
at /checkout/src/libstd/panicking.rs:521
7: rust_begin_unwind
at /checkout/src/libstd/panicking.rs:497
8: core::panicking::panic_fmt
at /checkout/src/libcore/panicking.rs:92
9: core::result::unwrap_failed
10: build_script_build::main
11: __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
12: std::rt::lang_start
at /checkout/src/libstd/panicking.rs:458
at /checkout/src/libstd/panic.rs:361
at /checkout/src/libstd/rt.rs:59
13: __libc_start_main
14: _start

This happens on 64-bit only, on 32-bit no problem.

@rezso
Copy link
Author

rezso commented Oct 26, 2017

Solved.
I have llvm 4.0, which is not contains the /usr/bin/FileCheck binary. Setting codegen-tests to false solves this.
In the install, the liblzma.{a,la,pc} and header files are installed, so rust package conflicts with xz-dev package.
If I set docs to false, the build fails:
Nothing to run...

Traceback (most recent call last):
File "/var/uhubuild/work/compile/src/bootstrap/bootstrap.py", line 711, in
main()
File "/var/uhubuild/work/compile/src/bootstrap/bootstrap.py", line 694, in main
bootstrap()
File "/var/uhubuild/work/compile/src/bootstrap/bootstrap.py", line 686, in bootstrap
run(args, env=env, verbose=rb.verbose)
File "/var/uhubuild/work/compile/src/bootstrap/bootstrap.py", line 147, in run
raise RuntimeError(err)
RuntimeError: failed to run: /var/uhubuild/work/compile/build/bootstrap/debug/bootstrap doc
make: *** [Makefile:25: all] Error 1

@steveklabnik
Copy link
Member

Triage: this is a very old issue, and the last comment says "solved", so, closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

3 participants