rust-lang / rust-lang/rust

`run-make` test failures when building rust-with rpath disabled

Open
#140,738 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-run-make A-test-infra C-bug T-bootstrap T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Similar to #140299, we're seeing some run-make tests failing to run due to missing librustc_driver when building with rpath disabled:

<build-dir>/x86_64-unknown-linux-gnu/stage1/bin/rustc: error while loading shared libraries: librustc_driver-b8b100cea390592b.so: cannot open shared object file: No such file or directory

Tests that fail:

* [run-make] tests/run-make/broken-pipe-no-ice
* [run-make] tests/run-make/compiler-builtins
* [run-make] tests/run-make/rustc-crates-on-stable

The root cause is that these tests either:

  • Create a Command::new(env_var("RUSTC")) instead using the rustc() wrapper provided by run-make-support, or
  • Use the cargo() wrapper from run-make-support, which doesn't set the runtime library path (e.g. LD_LIBRARY_PATH) like rustc() does.

To reproduce in a clean tree:

./config --disable-rpath
python x.py test --force-rerun tests/run-make/{broken-pipe-no-ice,compiler-builtins,rustc-crates-on-stable}

Originally reproduced on beta (973ec11f61b), still happens on latest master (71b68da1bd9).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tests/run-make/broken-pipe-no-ice, tests/run-make/compiler-builtins, and tests/run-make/rustc-crates-on-stable, then inspect the run-make-support rustc() and cargo() wrappers. Reproduce with --disable-rpath using the x.py command in the issue and compare how each test launches Rust tools. Done means all three tests run successfully with rpath disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.