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

Build with MAC_CODESIGN_ID=OFF fails on ARM / Big Sur #7467

Closed
fxcoudert opened this issue Nov 8, 2020 · 6 comments
Closed

Build with MAC_CODESIGN_ID=OFF fails on ARM / Big Sur #7467

fxcoudert opened this issue Nov 8, 2020 · 6 comments
Labels

Comments

@fxcoudert
Copy link

Homebrew maintainer here, trying to make fish 3.1.2 work on ARM Big Sur. Our current build fails with:

dyld: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
  Referenced from: /usr/local/Cellar/fish/3.1.2/bin/fish
  Reason: no suitable image found.  Did find:
	/usr/local/opt/gettext/lib/libintl.8.dylib: code signature in (/usr/local/opt/gettext/lib/libintl.8.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)

I understood from #6952 that we needed to build with -DMAC_CODESIGN_ID=OFF but that makes the build fail with:

[ 88%] Linking CXX executable fish_key_reader
/usr/local/Cellar/cmake/3.18.4/bin/cmake -E cmake_link_script CMakeFiles/fish_key_reader.dir/link.txt --verbose=1
/usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++  -Wall -Wextra -Wno-implicit-fallthrough -Wno-comment -Wno-address -Wno-strict-aliasing -Wno-redundant-move  -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -mmacosx-version-min=10.9 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/fish_key_reader.dir/src/fish_key_reader.cpp.o CMakeFiles/fish_key_reader.dir/src/print_help.cpp.o -o fish_key_reader  libfishlib.a /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/lib/libcurses.tbd libpcre2-32.a /usr/local/lib/libintl.dylib 
codesign --force --deep --options runtime --sign OFF /tmp/fish-20201108-71162-1db6hn7/fish-3.1.2/fish_key_reader
error: The specified item could not be found in the keychain.
make[3]: *** [fish_key_reader] Error 1
make[3]: *** Deleting file `fish_key_reader'
make[2]: *** [CMakeFiles/fish_key_reader.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

Could you provide some guidance on how to fix this?

@faho
Copy link
Member

faho commented Nov 8, 2020

Disabling codesigining requires 3a47db7, which isn't in 3.1.2.

You'll have to backport it or wait for 3.2.0.

@fxcoudert
Copy link
Author

When is the 3.2.0 release planned?

@faho
Copy link
Member

faho commented Nov 8, 2020

"When it's done". Given the current situation we can't make any guarantees of any kind.

@fxcoudert
Copy link
Author

May I suggest a backport to the 3.1 branch if it's still active? Codesigning by default, without user input, is quite invasive

@ridiculousfish
Copy link
Member

@fxcoudert Codesigning is required for Apple Silicon, is it not? What's the plan for Homebrew - will it ad-hoc code sign everything? If so, it could just replace the signature here.

@fxcoudert
Copy link
Author

The compiler, linker, and other developer tools add an ad hoc signature to everything they produce. Homebrew will, in addition, resign the binaries it modifies itself (for example for relocation of our binary builds).

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2021
@faho faho added the question label Dec 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants