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

libgcrypt: fix build on Apple Silicon #66728

Merged
merged 2 commits into from
Dec 11, 2020

Conversation

BrettDong
Copy link
Contributor

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

libgcrypt fails to build on Apple Silicon at make check step. Log message reveals that the process random, one of the checks in make check, was killed by the OS. System log indicates that the process is killed because of invalid signature:
random

The reason is that after make and before make check, a workaround procedure in Formula modified the binary random and broke its original code signature, so the executable was refused to run. The problem is solved by adding a step of creating an ad-hoc code signature.

# broke the validity of its code signature. Have to
# re-sign the binary so that it can be authorized to
# run on Apple Silicon.
system("codesign", "-s", "-", "#{buildpath}/tests/.libs/random")

This comment was marked as outdated.

fxcoudert
fxcoudert previously approved these changes Dec 11, 2020
Formula/libgcrypt.rb Outdated Show resolved Hide resolved
Formula/libgcrypt.rb Outdated Show resolved Hide resolved
@fxcoudert fxcoudert merged commit cd7894f into Homebrew:master Dec 11, 2020
@BrettDong BrettDong deleted the libgcrypt-fix branch December 11, 2020 16:31
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Jan 11, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Jan 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants