Releasing a C++ PCL module for Mac (code signing issue?)

Palmito

Well-known member
Hi everyone!

Me again 😂 ... I am struggling to release a module I am developing on Mac.

I had this 0x0006 error on dlopen() together with 13 error on open().
I have renewed my Apple Developer Program subscription, generated a "Developer ID Application" certificate and imported it into Keychain access (into "System"), but I still get the same errors.
(The code signed fine at the end of the build and I used unmodified makefiles generated with MakefileGenerator to which I fed my developer id)

Any hints on what I missed? Have I used the wrong certificate type, and if so which to use?
Sorry if this is obvious, it is my first Mac, bought specifically for compiling my module 😅

Many thanks, cheers and CS!

Carl

PS: At this point in time, alas, I can't reveal the name of my module, so I had to censor it on the screenshot...
PPS: Oh forgot to mention, if any importance, I have an M2 iMac mini running on Ventura (13.6)

Screen Shot 2024-02-16 at 20.31.55 PM_censored_crop.png
 
Last edited:
So looking into this further and finally fixed it.

While checking if the dylib was properly signed and notarized, you can check with archichect or in command line using codesign or spctl,
I found out two stupid mistakes:
  1. At first I was copying the file from the macosx/g++/x64/Release, which is NOT signed. The signed file is in $PCLBINDIR

    Took me a while to figure why it still produced the same error though ... 😅

  2. Long story short I was copying my module binary and producing my distribution zip file on a NAS folder

    Basically the dylib file had permissions 700 instead of 755

    Using a local folder on my Mac for preparing the distribution zip fixed the issue
 
Last edited:
Back
Top