Skip to content

x.py check fails on enzyme build step #139936

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
ZuseZ4 opened this issue Apr 16, 2025 · 1 comment · Fixed by #140000
Closed

x.py check fails on enzyme build step #139936

ZuseZ4 opened this issue Apr 16, 2025 · 1 comment · Fixed by #140000
Labels
C-bug Category: This is a bug. F-autodiff `#![feature(autodiff)]` T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@ZuseZ4
Copy link
Member

ZuseZ4 commented Apr 16, 2025

Summary

Command used

./configure --enable-llvm-link-shared --enable-llvm-plugins --enable-llvm-enzyme --release-channel=nightly --enable-llvm-assertions --enable-clang --enable-lld --enable-option-checking --enable-ninja --disable-docs

./x.py build --stage 1 library

./x.py check

Expected behaviour

runs a check build

Actual behaviour

Checking stage0 library artifacts (x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.02s

thread 'main' panicked at src/bootstrap/src/core/build_steps/compile.rs:1198:73:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:23

Bootstrap configuration (bootstrap.toml)

./configure --enable-llvm-link-shared --enable-llvm-plugins --enable-llvm-enzyme --release-channel=nightly --enable-llvm-assertions --enable-clang --enable-lld --enable-option-checking --enable-ninja --disable-docs

Operating system

Ubuntu 22.04

HEAD

Additional context

Build Log

<log>

cc @onur-ozkan since you helped with bootstrap before.
I improved the code a bit here https://github.com/rust-lang/rust/pull/136428/files#diff-5a1e05f2688d271039171a547d407d0c8a96715ee64d35562fc76b4c9a874303 and you improved it here: #130648

I feel like this worked before and probably regressed, but I'm not 100% sure. I guess I need to add a rustc_check boolean to rustc_cargo and skip the code for both check_runs and dry runs?

@ZuseZ4 ZuseZ4 added C-bug Category: This is a bug. F-autodiff `#![feature(autodiff)]` T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Apr 16, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 16, 2025
@onur-ozkan
Copy link
Member

Replacing the dry-run check with if let Some(llvm_config) = ... might make more sense. I'm not sure if it works in all cases but it's worth a try. If it doesn't work, you can do the if let Some(llvm_config) = ... thing inside a dry-run check.

@onur-ozkan onur-ozkan removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 17, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 18, 2025
…onur-ozkan

skip llvm-config in autodiff check builds, when its unavailable

As you suggested, this indeed fixes `./x.py check` builds when autodiff is enabled.

r? `@onur-ozkan`

closes rust-lang#139936

Tracking:

- rust-lang#124509
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 18, 2025
…onur-ozkan

skip llvm-config in autodiff check builds, when its unavailable

As you suggested, this indeed fixes `./x.py check` builds when autodiff is enabled.

r? ``@onur-ozkan``

closes rust-lang#139936

Tracking:

- rust-lang#124509
@bors bors closed this as completed in c9c25c8 Apr 20, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Apr 20, 2025
Rollup merge of rust-lang#140000 - EnzymeAD:autodiff-check-builds, r=onur-ozkan

skip llvm-config in autodiff check builds, when its unavailable

As you suggested, this indeed fixes `./x.py check` builds when autodiff is enabled.

r? ```@onur-ozkan```

closes rust-lang#139936

Tracking:

- rust-lang#124509
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. F-autodiff `#![feature(autodiff)]` T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants