-
Notifications
You must be signed in to change notification settings - Fork 333
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
Cannot execute binary file on Apple M1 #355
Comments
Have you compiled https://github.com/thefloweringash/sigtool as well which is required to sign arm binary. |
Thanks for the reply. I haven't, reading other issues I had assumed osxcross already signed the binaries, there was one particular issue that said stripping the binaries destroyed the embedded signature, implying osxcross did sign them out of the box. I guess I have more questions then:
|
Your association between "stripping binaries destroy signature" and "osxcross integrates binary signing" is flawed. However you build your binary - even if you do it natively on mac - stripping binary destroy signature: signature is not essential to the functioning of a binary (you can configure your system to not check signatures and run arbitrary unsigned binaries) so is removed by stripping, and a signature contains checksums of the whole binary - including debug regions etc - so stripping also invalidates any such checksums. To have a signed small sized binary without debug info, you should strip it before signing. The building part can be done natively on mac or via osxcross, and the stripping part can also be done on either too. The last time I checked, signing (or maybe notarization, which depends on signing) must be done natively... |
Am Freitag, 12. August 2022, 13:08:37 CEST schrieb HinTak:
Your association between "stripping binaries destroy signature" and
"osxcross integrates binary signing" is flawed.
However you build your binary - even if you do it natively on mac -
stripping binary destroy signature: signature is not essential to the
functioning of a binary (you can configure your system to not check
signatures and run arbitrary unsigned binaries) so is removed by stripping,
and a signature contains checksums of the whole binary - including debug
regions etc - so stripping also invalidates any such checksums. To have a
signed small sized binary without debug info, you should strip it before
signing. The building part can be done natively on mac or via osxcross, and
the stripping part can also be done on either too.
The last time I checked, signing (or maybe notarization, which depends on
signing) must be done natively...
…--
http://hitmen.eu http://ar.pokefinder.org
http://vice-emu.sourceforge.net http://magicdisk.untergrund.net
Imagination is more important than knowledge.
<Albert Einstein>
|
Extract cctools content in osxcross/temp/cctools-port |
Oh, thanks for the url! |
Finally had time to go back to this one. Thanks everyone for the answers. I tried almost everything, here are my findings:
I understand codesign_allocate comes from apple's cctools, is it not part of cctools-port then? Does that mean we can't use it on a Linux machine? Note that I have yet to try any of the signed binaries on an M1, that's the next step. Edit: I guess the rcodesign error is normal, I understand ad-hoc signing doesn't have any cryptographic proof. |
Thanks @alucryd you signing ffmpeg with that rust tool and it’s working? i Hit exactly the same problem and was baffled about the best way forward. I will try it here I assume I need to buy an apple developer license for 99 euros still ? |
@gedw99 Yeah, rcodesign is working fine for us, haven't had to purchase anything, our builds are running on M1. |
Wow @alucryd how did you do that ? Apple makes it harder and harder Says you must cough up dollars to apple. Elons musks Twitter blue badge is a charity compared to apple badge of apple fanboy Stockholm syndrome |
@gedw99 Invoking rcodesign on the resulting binaries is enough: |
Hi there, I can't seem to get working binaries for Apple M1, already had a working setup for x86_64 that I basically cloned for arm64.
I'm generating a toolchain using the git HEAD with a 11.3 SDK targeting 11.0 minimum, I'm using the
arm64-*
set of files but the resulting binaries won't run on an M1 running MacOS 12.4. Do I need to use a higher SDK and minimum OS version or am I missing something?Host is Arch Linux running LLVM 14.0.6 if that matters.
The text was updated successfully, but these errors were encountered: