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

libgit2-sys fails to build with vendored openssl because of misconfigured cc parallelism #1026

Closed
IGI-111 opened this issue Feb 23, 2024 · 4 comments

Comments

@IGI-111
Copy link

IGI-111 commented Feb 23, 2024

libgit2-sys enables the parallel feature of cc by default, however when building libgit2-sys with the vendored-openssl feature, this contaminates the cc run of openssl-sys with parallel flags and produces the following error:

 --- stderr
  make: *** read jobs pipe: Resource temporarily unavailable.  Stop.
  make: *** Waiting for unfinished jobs....
  thread 'main' panicked at /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 "/target/aarch64-unknown-linux-gnu/release/build/openssl-sys-6a5ed052a12e98be/out/openssl-build/build/src" && MAKEFLAGS="-j --jobserver-fds=7,8 --jobserver-auth=7,8" "make" "build_libs"
      Exit status: exit status: 2

This is a known issue with building openssl using parallelism:
rust-lang/cargo#13476
sfackler/rust-openssl#2179
rust-lang/cc-rs#964

In other words, cc/parallel is mutually exclusive with openssl-sys/vendored when building yet libgit2-sys potentially enables both.

@IGI-111
Copy link
Author

IGI-111 commented Feb 23, 2024

Enabled in 92491db

IGI-111 added a commit to IGI-111/git2-rs that referenced this issue Feb 23, 2024
This reverts commit 92491db.

Disable parallel feature of cc by default which breaks build of vendored
openssl on aarch64 plateform.

Fixes rust-lang#1026
IGI-111 added a commit to IGI-111/git2-rs that referenced this issue Feb 23, 2024
This reverts commit 92491db.

Disable parallel feature of cc by default which breaks build of vendored
openssl.

Fixes rust-lang#1026
@NobodyXu
Copy link

Could you try make 4.4.1 please?
I've verified that it does fix compilation on my project.

@IGI-111
Copy link
Author

IGI-111 commented Feb 23, 2024

It does indeed work with that version.

I'll close this in favor of your cc PR since it seems to fix the underlying issue.

@IGI-111 IGI-111 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 23, 2024
@NobodyXu
Copy link

cc 1.0.87 has released which should fix this

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

Successfully merging a pull request may close this issue.

2 participants