-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Setting strip = true in Cargo.toml makes build scripts fail in release mode on MacOS #110536
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
Comments
I "solved" this by changing |
@fschutt can you report if this happens also on the stable or a beta rustc channel? Can you also report when it did stop working for you? Ideally we'd want to bisect this to the Rust release where it actually stopped working. Thanks! |
WG-prioritization assigning priority (Zulip discussion). Also needs to be bisected @rustbot label -I-prioritize +P-high +E-needs-bisect |
Are you perhaps running into #122902 (comment) ? |
…le_osx, r=davidtwco Fix up setting strip = true in Cargo.toml makes build scripts fail in… Fix issue: rust-lang#110536 Strip binary is PATH dependent which breaks builds in MacOS. For example, on my Mac, the output of 'which strip' is '/opt/homebrew/opt/binutils/bin/strip', which leads to incorrect 'strip' results. Therefore, just like on other systems, it is also necessary to specify 'stripcmd' on macOS. However, it seems that there is a bug in binutils [bugzilla-Bug 31571](https://sourceware.org/bugzilla/show_bug.cgi?id=31571), which leads to the problem mentioned above.
Rollup merge of rust-lang#130781 - monkeydbobo:mdb/fix_up_cross_compile_osx, r=davidtwco Fix up setting strip = true in Cargo.toml makes build scripts fail in… Fix issue: rust-lang#110536 Strip binary is PATH dependent which breaks builds in MacOS. For example, on my Mac, the output of 'which strip' is '/opt/homebrew/opt/binutils/bin/strip', which leads to incorrect 'strip' results. Therefore, just like on other systems, it is also necessary to specify 'stripcmd' on macOS. However, it seems that there is a bug in binutils [bugzilla-Bug 31571](https://sourceware.org/bugzilla/show_bug.cgi?id=31571), which leads to the problem mentioned above.
Fixed by #130781. |
fails with:
but when running it with
cargo build
, it works:Meta
rustc --version --verbose
:There was a time when
cargo build --release
worked, since I have oldrelease
builds oflibazul.dylib
from 22/08/22 (last August). It seems that upgrading my Mac has broken it (potentially an XCode upgrade). Currently I am onmacOS 13.3.1 (22E261)
, I remember that it worked on Monterey (release date 24/10/22). It is very likely that it doesn't have anything to do with Rust / cargo itself, but it is weird that build scripts work in debug mode, but not in release mode.The text was updated successfully, but these errors were encountered: