Skip to content

llvm-tools on nightly doesn't package with external LLVM #52102

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

Closed
semarie opened this issue Jul 6, 2018 · 2 comments
Closed

llvm-tools on nightly doesn't package with external LLVM #52102

semarie opened this issue Jul 6, 2018 · 2 comments

Comments

@semarie
Copy link
Contributor

semarie commented Jul 6, 2018

since #51728, Rust failed to package properly when LLVM is configured as external dependency (with explicit llvm-config in config.toml)

  > LlvmTools { stage: 2, target: "x86_64-unknown-openbsd" }
Dist LlvmTools stage2 (x86_64-unknown-openbsd)

thread 'main' panicked at 'fs::File::open(&src) failed with No such file or directory (os error 2)', bootstrap/lib.rs:1194:25
stack backtrace:
   0: <std::ffi::c_str::NulError as core::fmt::Debug>::fmt
   1: <std::env::JoinPathsError as core::fmt::Debug>::fmt
   2: <std::ffi::os_str::OsString as core::fmt::Debug>::fmt
   3: <std::ffi::os_str::OsString as core::fmt::Debug>::fmt
   4: <std::ffi::os_str::OsString as core::fmt::Debug>::fmt
   5: <std::ffi::os_str::OsString as core::fmt::Debug>::fmt
   6: <std::ffi::os_str::OsString as core::fmt::Debug>::fmt
   7: <bootstrap::dist::LlvmTools as core::fmt::Debug>::fmt
   8: <bootstrap::dist::LlvmTools as bootstrap::builder::Step>::make_run
   9: <&'a T as core::fmt::Debug>::fmt
  10: <bootstrap::dist::Extended as bootstrap::builder::Step>::make_run
  11: <&'a T as core::fmt::Debug>::fmt
  12: <bootstrap::dist::Extended as bootstrap::builder::Step>::make_run
  13: <bootstrap::compile::Assemble as core::fmt::Debug>::fmt
  14: <bootstrap::compile::Assemble as core::fmt::Debug>::fmt
  15: <bootstrap::compile::Assemble as core::fmt::Debug>::fmt
  16: <bootstrap::compile::Assemble as core::fmt::Debug>::fmt
  17: <bootstrap::dist::LlvmTools as core::fmt::Debug>::fmt
  18: __register_frame_info
  19: __register_frame_info
  20: <std::ffi::os_str::OsString as core::fmt::Debug>::fmt
  21: <std::env::JoinPathsError as core::fmt::Debug>::fmt
  22: <std::io::error::Error as core::fmt::Display>::fmt
  23: __register_frame_info
  24: __register_frame_info
  25:
Traceback (most recent call last):
  File "/data/semarie/build-rust/build_dir/rustc-nightly-src/x.py", line 20, in <module>
    bootstrap.main()
  File "/data/semarie/build-rust/build_dir/rustc-nightly-src/src/bootstrap/bootstrap.py", line 827, in main
    bootstrap(help_triggered)
  File "/data/semarie/build-rust/build_dir/rustc-nightly-src/src/bootstrap/bootstrap.py", line 818, in bootstrap
    run(args, env=env, verbose=build.verbose)
  File "/data/semarie/build-rust/build_dir/rustc-nightly-src/src/bootstrap/bootstrap.py", line 148, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /data/semarie/build-rust/build_dir/build/bootstrap/debug/bootstrap dist --jobs=4

the No such file or directory error is because buildrust tries to copy:
/data/semarie/build-rust/build_dir/build/x86_64-unknown-openbsd/llvm/bin/llvm-nm to /data/semarie/build-rust/build_dir/build/tmp/dist/llvm-tools-image/bin/llvm-nm.

But as LLVM was external, the directory build/x86_64-unknown-openbsd/llvm/ is empty.

I think there is two possibilities:

  • doesn't package llvm-tools componment if LLVM is external
  • package it, but uses the right directory

I will make a PR if someone told me the direction to take.

@Mark-Simulacrum
Copy link
Member

I think we should probably package it, cc @japaric @alexcrichton

@alexcrichton
Copy link
Member

I'd personally err on the side of skipping it, if we try to package it we're gonna have to deal with a whole array of local installs and filenames, and it's not actually used anyway

bors pushed a commit that referenced this issue Jul 15, 2018
bors added a commit that referenced this issue Jul 15, 2018
Disable LlvmTools packaging with external LLVM

Fixes: #52102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants