Csound Csound-dev Csound-tekno Search About

[Csnd-dev] Code signing on MacOS?

Date2021-12-25 09:24
FromRory 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. 

Date2021-12-25 10:56
FromRory Walsh
SubjectRe: [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:
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. 

Date2022-01-06 10:48
FromVictor Lazzarini
SubjectRe: [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

it runs

… 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.


On 25 Dec 2021, at 10:56, Rory Walsh <rorywalsh@ear.ie> wrote:

*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
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:
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. 


Date2022-01-06 11:45
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] Code signing on MacOS?
This seems to be related


but no answers so far


On 6 Jan 2022, at 10:48, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:

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

it runs

… 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.


On 25 Dec 2021, at 10:56, Rory Walsh <rorywalsh@ear.ie> wrote:

*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
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:
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. 



Date2022-01-06 13:15
FromVictor Lazzarini
SubjectRe: [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.

On 6 Jan 2022, at 11:45, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:

This seems to be related


but no answers so far


On 6 Jan 2022, at 10:48, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:

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

it runs

… 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.


On 25 Dec 2021, at 10:56, Rory Walsh <rorywalsh@ear.ie> wrote:

*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
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:
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. 




Date2022-01-06 16:29
FromVictor Lazzarini
SubjectRe: [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.

On 6 Jan 2022, at 13:15, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:

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.

On 6 Jan 2022, at 11:45, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:

This seems to be related


but no answers so far


On 6 Jan 2022, at 10:48, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:

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

it runs

… 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.


On 25 Dec 2021, at 10:56, Rory Walsh <rorywalsh@ear.ie> wrote:

*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
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:
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.