[Csnd-dev] Code signing on MacOS?
Date | 2021-12-25 09:24 |
From | Rory Walsh |
Subject | [Csnd-dev] Code signing on MacOS? |
The beta releases of Cabbage, built with Azure DevOps no longer work due to problems accessing the Csound library:
Dyld Error Message: Library not loaded: /Library/Frameworks/CsoundLib64.framework/CsoundLib64 Referenced from: /Applications/Cabbage.app/Contents/MacOS/Cabbage Reason: no suitable image found. Did find: /Library/Frameworks/CsoundLib64.framework/CsoundLib64: code signature in (/Library/Frameworks/CsoundLib64.framework/CsoundLib64) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. /Library/Frameworks/CsoundLib64.framework/CsoundLib64: stat() failed with errno=1 /Library/Frameworks/CsoundLib64.framework/CsoundLib64: code signature in (/Library/Frameworks/CsoundLib64.framework/CsoundLib64) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. /Library/Frameworks/CsoundLib64.framework/Versions/6.0/CsoundLib64: code signature in (/Library/Frameworks/CsoundLib64.framework/Versions/6.0/CsoundLib64) not valid for use in process using Library Validation This only started happening in the past few days. I suspect the build system on Azure for MacOS has changed somehow, but all attempts at signing the library myself have failed, with the same error. Anyone have any ideas on how I can resolve this? I can build locally without any such problems. |
Date | 2021-12-25 10:56 |
From | Rory Walsh |
Subject | Re: [Csnd-dev] Code signing on MacOS? |
Signing the Cabbage.app resolves the issue. I should have thought of that 🙊 On Sat, 25 Dec 2021 at 10:24, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2022-01-06 10:48 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Code signing on MacOS? |
I am running into this now. I upgraded to Monterrey and can’t seem to get this to work now. If I build with RPATH as before,
I get
dyld[24082]: Library not loaded: @rpath/CsoundLib64.framework/Versions/6.0/CsoundLib64
Referenced from: /Users/victor/bin/csound
Reason: tried: '/Library/Frameworks/CsoundLib64.framework/Versions/6.0/CsoundLib64' (no such file), '/System/Library/Frameworks/CsoundLib64.framework/Versions/6.0/CsoundLib64' (no such file)
zsh: abort csound
It just doesn’t find the one in ~/Library
Now, if I set CMAKE_MACOSX_RPATH to 0
I get
dyld[25697]: Library not loaded: CsoundLib64.framework/Versions/6.0/CsoundLib64
Referenced from: /Users/victor/bin/csound
Reason: tried: 'CsoundLib64.framework/Versions/6.0/CsoundLib64' (code signature in <7576A741-3467-3CDF-884A-70A7A6251181> '/Users/victor/src/csound/debug/CsoundLib64.framework/Versions/6.0/CsoundLib64'
not valid for use in process: library load disallowed by system policy), '/Library/Frameworks/CsoundLib64.framework/Versions/6.0/CsoundLib64' (no such file), '/System/Library/Frameworks/CsoundLib64.framework/Versions/6.0/CsoundLib64' (no such file), '/Users/victor/src/csound/debug/CsoundLib64.framework/Versions/6.0/CsoundLib64'
(code signature in <7576A741-3467-3CDF-884A-70A7A6251181> '/Users/victor/src/csound/debug/CsoundLib64.framework/Versions/6.0/CsoundLib64' not valid for use in process: library load disallowed by system policy), '/Library/Frameworks/CsoundLib64.framework/Versions/6.0/CsoundLib64'
(no such file), '/System/Library/Frameworks/CsoundLib64.framework/Versions/6.0/CsoundLib64' (no such file)
zsh: abort csound
If, however I set the link name by hand
install_name_tool -change CsoundLib64.framework/Versions/6.0/CsoundLib64 /Users/victor/Library/Frameworks/CsoundLib64.framework/Versions/6.0/CsoundLib64 ~/bin/csound
… but with lldb, it doesn’t!
This is a major pain, I can’t do any development or releases until I can fix this. Any suggestions are very welcome.
|
Date | 2022-01-06 11:45 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Code signing on MacOS? |
This seems to be related
but no answers so far
|
Date | 2022-01-06 13:15 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Code signing on MacOS? |
Basically my issue boils down to that problem, ~/Library/Frameworks not being in the search path for frameworks.
For now, I can put a symlink in /Library/Frameworks and that lets me debug. Not ideal but works.
Not sure whether this will have any implications for producing releases, but we'll soon find our.
|
Date | 2022-01-06 16:29 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Code signing on MacOS? |
Another update on this saga. I can set the rpath on the executables to find the framework I am building locally in
~/Library/Framework.
For this I use in Custom.cmake
set(CMAKE_INSTALL_RPATH "$ENV{HOME}/Library/Frameworks")
and then all programs have that rpath added. That solves it for running and debugging, no need to set up
symlinks.
To run other frontends like CsoundQT, I had to edit the links and add the rpath with install_name_tool,
instructions here
I don't think this will have any bearing on producing release packages, but we'll see.
|