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

Failing to build on Mac aarch64 #2179

Closed
nadenf opened this issue Feb 21, 2024 · 6 comments
Closed

Failing to build on Mac aarch64 #2179

nadenf opened this issue Feb 21, 2024 · 6 comments

Comments

@nadenf
Copy link

nadenf commented Feb 21, 2024

error: failed to run custom build command for `openssl-sys v0.9.100`

  running cd "/opt/actions-runner/_work/search/search/search/src-tauri/target/aarch64-apple-darwin/release/build/openssl-sys-c4daf75c9d324c1c/out/openssl-build/build/src" && "make" "depend"
  running cd "/opt/actions-runner/_work/search/search/search/src-tauri/target/aarch64-apple-darwin/release/build/openssl-sys-c4daf75c9d324c1c/out/openssl-build/build/src" && MAKEFLAGS="-j --jobserver-fds=7,8 --jobserver-auth=7,8" "make" "build_libs"
  perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" crypto/params_idx.c.in > crypto/params_idx.c

  --- stderr
  make: *** read jobs pipe: Resource temporarily unavailable.  Stop.
  make: *** Waiting for unfinished jobs....
  thread 'main' panicked at /opt/cache/cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-src-300.2.3+3.2.1/src/lib.rs:611:9:



  Error building OpenSSL:
      Command: cd "/opt/actions-runner/_work/search/search/search/src-tauri/target/aarch64-apple-darwin/release/build/openssl-sys-c4daf75c9d324c1c/out/openssl-build/build/src" && MAKEFLAGS="-j --jobserver-fds=7,8 --jobserver-auth=7,8" "make" "build_libs"
      Exit status: exit status: 2
OS:  Sonoma 14.2.1
Rust: rustc 1.75.0 (stable-aarch64-apple-darwin)

@nadenf
Copy link
Author

nadenf commented Feb 21, 2024

Same issue was reported here and previously reported here.

@nadenf
Copy link
Author

nadenf commented Feb 21, 2024

I tried to set both MAKEFLAGS="-j4" and CARGO_BUILD_JOBS=4 but neither helps.

It look likes openssl-sys is forcing MAKEFLAGS="-j" ?

@sfackler
Copy link
Owner

The total parallelism should be managed by Cargo's jobserver.

@Haaroon
Copy link

Haaroon commented Feb 21, 2024

yup this update also broke my builds

@nadenf
Copy link
Author

nadenf commented Feb 21, 2024

Have tried every combination of environment variable but the MAKEFLAGS are not end user setttable.

And also tried using the latest version of make 4.4.1 on Mac via Homebrew and it doesn't work either.

Reached out to the Rust team but no response.

@nadenf
Copy link
Author

nadenf commented Feb 22, 2024

So the fix for this is:

[patch.crates-io]
zstd-sys = { git = "https://github.com/harana-oss/zstd-rs.git" }

Until this PR gets merged.

Or you will need to trace through your dependencies to see which one is enabling the CC parallel feature.

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