-
Notifications
You must be signed in to change notification settings - Fork 157
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
mac m1 + code signing == failure #257
Comments
running the below commands does not help
taken from here |
Aha, so we need to do more to sign the binary, somehow. |
@headius how can I help? |
I have not looked into what is required to sign anything... maybe you could poke around on that and slap some links on here? |
I'm also using jocl (opencl wrapper) it works just fine (shrug)
Let me see what they are doing for signing.
That said it's weird that even with signing turned off system wide it still
fails with the same error.
…On Fri, Aug 6, 2021, 08:56 Charles Oliver Nutter ***@***.***> wrote:
I have not looked into what is required to sign anything... maybe you
could poke around on that and slap some links on here?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#257 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBKKQUSC4Y24J2BTRZC2FLT3N2RBANCNFSM5BR7GVTA>
.
|
Got the same issue:
Is there some way to work around this? I've tried running with |
I have an M1 Mac Mini arriving today and will be able to investigate this mor. @zhuker Any luck figuring out what jocl is doing to sign their binaries? |
@headius couldnt find any references for code signing in jocl code so created this issue/question gpu/JOCL#41 |
If it helps, I've had reports from a user of a project I maintain with the same issue when running on a M1 Mac: batect/batect#963 (reply in thread). |
I am trying to address this error to run jRuby on M1, and it looks like macOS requires all native code on Here is some basic info for signing a dylib: As a workaround, I was able to ad-hoc-sign the library to fix this error in my local jRuby:
Edit: I'm having trouble with the native library not having correct behavior (jruby/jruby#6813), so even if this workaround fixes the load error, I suggest running jRuby with |
@headius any luck with this? It'd be great to get a fix into the library. (I'd offer to help myself, but I'm not yet lucky enough to have a M1 Mac) |
@headius I signed the dylib locally with an ad hoc identity ( |
Based on reports from users of a project I maintain (source), there are two things required for this to work:
The steps to sign the |
I've raised jnr/jffi#116 which should fix this issue. |
…e Silicon machines. This can be reverted once jnr/jnr-ffi#257 is resolved (likely with jnr/jffi#116). See #963.
This is a JFFI issue but we'll leave this one targeted at next jnr-ffi which will pull in @charleskorn fix in jnr/jffi#116. |
@headius this issue may need to be reopened. I tried using jnr-ffi:2.2.9/jffi:1.3.7 and still got the code signing error. I extracted the Darwin jnilib file from the jar and checked the signature of the file. Doesn't seem to be signed:
|
Oh shoot... perhaps I needed to rebuild on Darwin to get the signature? @pepijnve Could you give that a try and see if the resulting binary works better? I did not even think to check if the PR provided a new binary, but it makes sense that it would not (i.e. it's my job to sign and ship it). |
The PR only modifies the build script on Darwin with the command to do as hoc signing of the library. A rebuild is required indeed. The command that's added by the patch is what I did locally to get things working, so that should do the trick. I can test this locally tomorrow to make sure that extracting from the jar with a unique name doesn't break anything. Local testing so far was with an already extracted binary and setting the boot path. |
@headius I replaced libjffi-1.2.jnlib in my local copy of the jar file with a version that I manually signed with |
Okay, I'll do a local rebuild soon and get a release out early next week. If I can figure out how to sign it with my own certificate that would be even better. |
I have released jffi 1.3.8 with the rebuilt and signed binary. Please confirm? |
I'll give this a try asap. |
I can already provide you some details on how to do signing with a real certificate in the meantime. You'll need to create a 'Developer ID application' type certificate at developer.apple.com Fire up Xcode and it should show up there as well once it has been created I'm not sure how to do this part in a non-interactive environment I'm afraid. The signing identities are sourced from your keychains, so maybe it's sufficient to download the certificate bits from developer.apple.com and insert them into a keychain using You can list the available signing identities using
Finally you can then sign using the identity label from the output above as value for |
Yeah I started looking at the docs for properly signing. I will check if my Apple Dev ID is still valid and we can try to get the patches in place to sign for reals. |
Tested with my local |
@pepijnve Thank you for your confirmation and patience! I am spinning releases of the rest of the JNR stack so that versions align properly. |
I have released the rest of the stack (and updated JRuby HEADs to use them). |
running on m1
Darwin vgm1mini.lan 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:27 PDT 2021; root:xnu-7195.141.2~5/RELEASE_ARM64_T8101 arm64
jnr-ffi version 2.2.3
jvm: azul 8 for aarch64
I hear it's a macos feature, is there a workaround you know?
I get this exception
The text was updated successfully, but these errors were encountered: