-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
nightly 1.78 build error on macOS for several crates #122641
Comments
Same here aarch64-darwin, was surprised to see no other issues a few minutes ago so assumed user error. |
$ git rev-parse HEAD
ecdea9e9438cdb8cf707e7f60e066eda02344d05
$ rm -rf ./build
$ ./x.py clean
downloading https://static.rust-lang.org/dist/2024-02-04/rust-std-beta-aarch64-apple-darwin.tar.xz
####################################################################################################################################################################################################################################### 100.0%
downloading https://static.rust-lang.org/dist/2024-02-04/rustc-beta-aarch64-apple-darwin.tar.xz
####################################################################################################################################################################################################################################### 100.0%
downloading https://static.rust-lang.org/dist/2024-02-04/cargo-beta-aarch64-apple-darwin.tar.xz
####################################################################################################################################################################################################################################### 100.0%
extracting /Users/n8henrie/git/rust/build/cache/2024-02-04/rust-std-beta-aarch64-apple-darwin.tar.xz
extracting /Users/n8henrie/git/rust/build/cache/2024-02-04/rustc-beta-aarch64-apple-darwin.tar.xz
extracting /Users/n8henrie/git/rust/build/cache/2024-02-04/cargo-beta-aarch64-apple-darwin.tar.xz
Building bootstrap
Compiling libc v0.2.151
Compiling proc-macro2 v1.0.76
Compiling unicode-ident v1.0.12
Compiling cfg-if v1.0.0
Compiling typenum v1.17.0
Compiling version_check v0.9.4
Compiling memchr v2.7.1
Compiling serde v1.0.195
Compiling cc v1.0.73
Compiling crossbeam-utils v0.8.18
Compiling generic-array v0.14.7
Compiling rustix v0.38.28
error: failed to run custom build command for `generic-array v0.14.7`
Caused by:
process didn't exit successfully: `/Users/n8henrie/git/rust/build/bootstrap/debug/build/generic-array-ab25fa20b775d3bc/build-script-build` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `proc-macro2 v1.0.76`
Caused by:
process didn't exit successfully: `/Users/n8henrie/git/rust/build/bootstrap/debug/build/proc-macro2-0d1d0caff9b8427e/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `libc v0.2.151`
Caused by:
process didn't exit successfully: `/Users/n8henrie/git/rust/build/bootstrap/debug/build/libc-06bd4863f1ba3265/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `serde v1.0.195`
Caused by:
process didn't exit successfully: `/Users/n8henrie/git/rust/build/bootstrap/debug/build/serde-9d5af29e6bacc352/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `typenum v1.17.0`
Caused by:
process didn't exit successfully: `/Users/n8henrie/git/rust/build/bootstrap/debug/build/typenum-c6d5f315ae5f7f82/build-script-main` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `crossbeam-utils v0.8.18`
Caused by:
process didn't exit successfully: `/Users/n8henrie/git/rust/build/bootstrap/debug/build/crossbeam-utils-5b726589c5220b36/build-script-build` (signal: 9, SIGKILL: kill)
failed to run: /Users/n8henrie/git/rust/build/aarch64-apple-darwin/stage0/bin/cargo build --manifest-path /Users/n8henrie/git/rust/src/bootstrap/Cargo.toml
Build completed unsuccessfully in 0:00:15 |
@jianshu93 please post your rustc version
|
yes I am aarch64 macos. I will soon add other in formation. Jianshu |
I build clean crate and have the same error and my rust version is: rustc 1.78.0-nightly (766bdce74 2024-03-16)
binary: rustc
commit-hash: 766bdce744d531267d53ba2a3f9ffcda69fb9b17
commit-date: 2024-03-16
host: aarch64-apple-darwin
release: 1.78.0-nightly
LLVM version: 18.1.2
Apparently it 1.78 has not been tested on aarch64 macOS platforms? Thanks, Jianshu |
Bisect points me to 9784a14 |
https://github.com/rust-lang/cargo-bisect-rustc should be helpful to find when things stopped working (without using x.py) |
Just so surprised that nightly version did not go through platform tests, this never happened before. |
In my case, I'm still suspicious that it could be something local to my system. My rust toolchain is running via nix and I just switched to nixpkgs-unstable last week.
|
Every commit that lands is automatically tested, including on aarch64-apple-darwin. Our CI is automated with GitHub actions, you can even click through the UI to find the automated tests for aarch64-apple-darwin. |
Ok that's really strange. I can confirm that with MacOS sonama 14.4, many packages cannot be compiled for nightly 1.78 (see above info), everything is ok with 1.77. The error is just get killed, nothing else. Can somebody use real machine to confirm my situation. Thanks, |
I cloned https://github.com/jianshu93/gsearch and on commit Is there a different build command I need to use? Or is that the wrong project/commit? |
For me nightly fails with that repo. Interesting. $ pwd
/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.9rUGsVs9xI/gsearch
$ git rev-parse HEAD
dbaf7443dfe183e5b0e02e41725fc4a8ba13b897
$ cargo build --release
... succeeds ...
$ cargo +nightly build --release
Compiling libc v0.2.153
Compiling autocfg v1.1.0
Compiling cfg-if v1.0.0
Compiling proc-macro2 v1.0.79
Compiling unicode-ident v1.0.12
Compiling libm v0.2.8
Compiling serde v1.0.197
Compiling memchr v2.7.1
Compiling crossbeam-utils v0.8.19
Compiling version_check v0.9.4
error: failed to run custom build command for `proc-macro2 v1.0.79`
Caused by:
process didn't exit successfully: `/private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.9rUGsVs9xI/gsearch/target/release/build/proc-macro2-f0456103fa86b569/build-script-build` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `crossbeam-utils v0.8.19`
Caused by:
process didn't exit successfully: `/private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.9rUGsVs9xI/gsearch/target/release/build/crossbeam-utils-88214525c82bd36b/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `serde v1.0.197`
Caused by:
process didn't exit successfully: `/private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.9rUGsVs9xI/gsearch/target/release/build/serde-4dae43f57b350d13/build-script-build` (signal: 9, SIGKILL: kill) |
It reminds me a lot of this issue which was related to my linker, but I've tried removing my |
Thank for testing my repo gsearch. We rely heavily on crossbeams and rayon. @saethlin, yes I use the same one as you did. Yes I have the issue as @n8henrie did. I just did a new git clone and have the same error: error: failed to run custom build command for Caused by: Caused by: Caused by: Caused by: Caused by: Caused by: Caused by: By the way there are no problems with v1.77. Can anybody also test this repo of mine: https://github.com/jianshu93/kmerHLL I have the following error: error: failed to run custom build command for Caused by: Caused by: Again no problems on linux. Just macOS Sonoma 14.4. An operation system issue? Thanks, Jianshu |
By the way, I use LLVM clang in my system, that is all my clang are actually the LLVM clang installed via hombrew, not the default clang from the operation system. But CC is still the system default. Just curious why it works for 1.77 but not for 1.78, I see that there are many major updates in 1.78, including remove the stdsimd feature et.al. Jianshus-MBP-2:$ CC --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin |
Can you build with |
I just updated to 1.79. but still: Updating crates.io index Caused by: Jianshu |
This previous issue looks relevant: rust-lang/cargo#8913 Is your rustup/cargo/rustc x86_64? |
No. As I said 1.77 is completely ok. Must be something introduced in 1.78
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Ben Kimock ***@***.***>
Sent: Sunday, March 17, 2024 11:59:57 PM
To: rust-lang/rust ***@***.***>
Cc: Jianshu_Zhao ***@***.***>; Mention ***@***.***>
Subject: Re: [rust-lang/rust] nightly 1.78 build error on macOS for several crates (Issue #122641)
This previous issue looks relevant: rust-lang/cargo#8913<rust-lang/cargo#8913>
Is your rustup/cargo/rustc x86_64?
Is your shell x86_64?
Are you using an x86_64 terminal emulator?
—
Reply to this email directly, view it on GitHub<#122641 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJDBZJRPSD7INOX26CM6CHLYYZRD3AVCNFSM6AAAAABE2IZUACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSHA4DMMJWGI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@saethlin -- with `-j1 (same repo, same commit) $ cargo +nightly clean
Removed 11 files, 973.8KiB total
$ cargo +nightly build --release -j1
Compiling libc v0.2.153
error: failed to run custom build command for `libc v0.2.153`
Caused by:
process didn't exit successfully: `/private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.9rUGsVs9xI/gsearch/target/release/build/libc-16f682f2333933b5/build-script-build` (signal: 9, SIGKILL: kill) |
Hello All, Anybody else in addition to @n8henrie can reproduce this error? Just so curious why it happens only in my case. Does it has something to do with some specific crate that is not compatible with 1.78? Thanks, |
Running https://github.com/rust-lang/cargo-bisect-rustc to locate the nightly and PR, between 1.77.0 and now, that changed behavior on your local machine would be interesting information to help understand the issue. |
@lqd I wish I could, I can't even get it installed. Tried reinstalling my rust toolchain through homebrew to see if it was a nix issue, but I get the same error either way: $ ~/.cargo/bin/cargo --version
cargo 1.76.0 (c84b36747 2024-01-18)
$ ~/.cargo/bin/cargo install cargo-bisect-rustc
Updating crates.io index
Installing cargo-bisect-rustc v0.6.8
Updating crates.io index
Compiling libc v0.2.153
Compiling pkg-config v0.3.30
Compiling proc-macro2 v1.0.79
Compiling unicode-ident v1.0.12
Compiling autocfg v1.1.0
Compiling rustix v0.38.31
Compiling bitflags v2.5.0
Compiling core-foundation-sys v0.8.6
Compiling vcpkg v0.2.15
Compiling memchr v2.7.1
Compiling cfg-if v1.0.0
Compiling pin-project-lite v0.2.13
Compiling bytes v1.5.0
Compiling itoa v1.0.10
Compiling slab v0.4.9
error: failed to run custom build command for `proc-macro2 v1.0.79`
Caused by:
process didn't exit successfully: `/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/cargo-installXAdDcI/release/build/proc-macro2-0b733c8a10f7d0e2/build-script-build` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `libc v0.2.153`
Caused by:
process didn't exit successfully: `/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/cargo-installXAdDcI/release/build/libc-7d3c3772beff9ff0/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `libc v0.2.153`
Caused by:
process didn't exit successfully: `/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/cargo-installXAdDcI/release/build/libc-42bd635428380c8e/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `rustix v0.38.31`
Caused by:
process didn't exit successfully: `/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/cargo-installXAdDcI/release/build/rustix-3d5e68f8f5cda606/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to compile `cargo-bisect-rustc v0.6.8`, intermediate artifacts can be found at `/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/cargo-installXAdDcI`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path. |
Hello @n8henrie,I believe it is the 1.78 release problem. I use simdeez to make use of SIMD features, I saw a lot of update in 1.78 in terms of SIMD features. |
@n8henrie if this is indeed a regression, meaning that it used to work: you could maybe set your default rustup toolchain to an older version that worked e.g. 1.77.0, to allow for building the tool. Avoiding nix and homebrew if possible, just to rule them out. Same for @jianshu93. It seems that we unfortunately can't easily reproduce the issue yet, so we'd need help from the both of you to make some progress here. |
Tried a reboot, behavior persists. (EDIT: Also tried reinstalling rust toolchain with the official 1.75 also not working, so this seems more likely than every to be a "me" issue -- but I'd sure appreciate any suggestions on where to look.
Was able to build I discovered this issue when trying to work on my first PR to rust which was previously building fine -- occurred during Not having much luck with cargo-bisect-rust:
Sorry, not trying to be dense here. I wonder if this is a quirky MacOS issue similar to the 14.4 java issues that have been reported (I haven't yet updated): $ sw_vers
ProductName: macOS
ProductVersion: 14.3.1
BuildVersion: 23D60 |
Yes, in my case I think it is just MacOS wonkiness. I rebooted a few more times with no additional changes to my configuration or setup (was actually making changes to my Asahi NixOS setup which I dual boot). After the most recent boot into MacOS I was greeted with multiple permissions dialogs about bash and Terminal.app and subsequently cargo seems to be working again. No idea why this didn't happen with previous reboots (which I did intentionally, considering this a possibility). Sorry for the wild goose chase. I hope @jianshu93 finds a solution as well. |
Hello all, It turns out to be a system problem, I have no problem with 1.78 on my M2 MacBook Air. But only M1 Pro MacBook Pro. No idea why, I have exact the same setups. I will close this issue for now. I am going to reinstall my system to see what happens. Reopen if necessary. |
I see this issue too. It may be related to a bug I just filed with a minimal repro case: #122902 |
@jianshu93 @n8henrie it seems very likely to me that you’re both encountering an issue with homebrew’s strip, see #122902 (comment) and the following discussion there. |
EDIT: Updated below
I remembered that issue, I don't think it was the cause in my case.
$ type -a strip
strip is /usr/bin/strip
strip is /etc/profiles/per-user/n8henrie/bin/strip
strip is /run/current-system/sw/bin/strip Further, the issue seems to have resolved itself (without any changes to my |
Hello all, Thank you. I think it is the problem in my case. And it was solved. Why not hard coded strip for macos system so that no matter we install homebrew strip or not, it always works. Thanks, |
I stand corrected -- I think my issue was the
I don't have homebrew I found that the issue returned this afternoon in a new shell; for whatever reason, my $ type -a strip
strip is /etc/profiles/per-user/n8henrie/bin/strip
strip is /run/current-system/sw/bin/strip
strip is /usr/bin/strip Compiling like this succeeds: $ PATH=$(getconf PATH):~/.cargo/bin cargo install cargo-espflash I really wish there was a way to specify the full path to the |
Wow, this was the issue for me as well. |
Same here. Very useful, thank you so much guys. For other folks coming in that issue for the future, here's the TLDR; I wished I would have found before: You're using
|
In my case, it wasn't homebrew's strip, but Nix's (i.e. as in the PATH=(getconf PATH):(dirname (readlink -f (which cargo))) cargo install xyzzy |
i have the same issue |
rustc 1.78.0 (9b00956e5 2024-04-29)
binary: rustc
commit-hash: 9b00956e56009bab2aa15d7bff10916599e3d6d6
commit-date: 2024-04-29
host: aarch64-apple-darwin
release: 1.78.0
LLVM version: 18.1.2 I also have the same issue. I downgraded to 1.75 and rebooted and it solved the isssue. |
+1 on the issue with the conflicting removing it fixed it for me. brew uninstall binutils |
If we want to keep |
Hello Rust team,
Just found that on MacOS Rust v1.78, I cannot compile the following several crates:
error: failed to run custom build command for
serde v1.0.193
Caused by:
process didn't exit successfully:
/Users/jianshuzhao/gsearch/target/release/build/serde-fe63f8db4ee3a099/build-script-build
(signal: 9, SIGKILL: kill)warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for
libm v0.2.8
Caused by:
process didn't exit successfully:
/Users/jianshuzhao/gsearch/target/release/build/libm-911e8c3b2680f4bb/build-script-build
(signal: 9, SIGKILL: kill)error: failed to run custom build command for
crossbeam-utils v0.8.17
Caused by:
process didn't exit successfully:
/Users/jianshuzhao/gsearch/target/release/build/crossbeam-utils-afd4c2f70c7f24f1/build-script-build
(signal: 9, SIGKILL: kill)error: failed to run custom build command for
libc v0.2.151
Caused by:
process didn't exit successfully:
/Users/jianshuzhao/gsearch/target/release/build/libc-ec74996261bf3a48/build-script-build
(signal: 9, SIGKILL: kill)Any idea why?
I have no problems with v1.77.
Thanks,
Jianshu
The text was updated successfully, but these errors were encountered: