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

Failed to do cargo build --release for 0.9.0 and HEAD with rust 1.72.0 #12

Closed
chenrui333 opened this issue Aug 27, 2023 · 3 comments
Closed

Comments

@chenrui333
Copy link
Contributor

chenrui333 commented Aug 27, 2023

👋 while trying to upgrade rust to 1.72.0, we ran into the stuck build with yash-syntax crate.

While cargo build works fine, but it failed with cargo build --release

image

rustc --crate-name yash_syntax --edition=2021 /Users/rui/.cargo/registry/src/index.crates.io-6f17d22bba15001f/yash-syntax-0.6.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=155 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=64d2c0b358580c39 -C extra-filename=-64d2c0b358580c39 --out-dir /Users/rui/Downloads/brew/sh4d0wup/target/release/deps -L dependency=/Users/rui/Downloads/brew/sh4d0wup/target/release/deps --extern async_trait=/Users/rui/Downloads/brew/sh4d0wup/target/release/deps/libasync_trait-37f75ec5eb81b709.dylib --extern futures_util=/Users/rui/Downloads/brew/sh4d0wup/target/release/deps/libfutures_util-a79f4b19fb62844a.rmeta --extern itertools=/Users/rui/Downloads/brew/sh4d0wup/target/release/deps/libitertools-e862d6f649772b8b.rmeta --cap-lints allow

relates to Homebrew/homebrew-core#140367

chenrui333 added a commit to Homebrew/formula-patches that referenced this issue Aug 27, 2023
kpcyrd added a commit that referenced this issue Aug 27, 2023
@kpcyrd
Copy link
Owner

kpcyrd commented Aug 27, 2023

I can reproduce this, I suspect this is a compiler regression related to "Const evaluation time is now unlimited", I managed to work around this by adding this to my Cargo.toml (594e55c):

[profile.release.package.yash-syntax]
opt-level = 0

It also seems to be fixed with the current 1.73.0 Rust beta.

Thanks for reporting!

@ZhongRuoyu
Copy link

Thanks @chenrui333 for the report and @kpcyrd for the insight! I can confirm that rust-lang/rust#114948 fixed this issue on Rust's side. With that patch applied to rustc, sh4d0wup can again be built normally.

@kpcyrd
Copy link
Owner

kpcyrd commented Sep 9, 2023

I've released 0.9.1 that contains a workaround.

Thanks for the notification!

@kpcyrd kpcyrd closed this as completed Sep 9, 2023
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