Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Segmentation fault: 11 when attempting to codesign .app

I haven't been able to find a definition for this error in relation to codesigning. I'm really quite stumped as of what to do.

The error occurs when attempting to execute this command line:

codesign -s "Developer ID Application: Name (ID)" -fv --deep Application.app/

System:

XCode 6.2 on Yosemite 10.10.3

I've reinstalled XCode, still without any luck. This is for a desktop application.

Apologies if this is a silly question!

like image 594
SRG3006 Avatar asked Apr 16 '15 23:04

SRG3006


2 Answers

A solution I found on the Apple forum worked for me: first, run the following command to find your identity's hex ID:

$ security find-identity -v
1) A048017A43F8C9C993128B0101B81CD07049601E "lldb_codesign"
...

Then you can use that hex identifier to sign:

codesign -s A048017A43F8C9C993128B0101B81CD07049601E /usr/local/bin/gdb

Some other tips I came across while debugging this:

  • You have to give the full path to the binary (/usr/local/bin/gdb, not just gdb). It won't look on the PATH, I assume for security reasons.
  • You have to run the codesign as root if the directory your binary is in is not user-owned.
like image 187
kristina Avatar answered Sep 20 '22 15:09

kristina


passing --timestamp=none seems to make the crash go away. In this case, check the network settings, codesign may be unable to reach e.g. the timeserver.

like image 34
Gubatron Avatar answered Sep 22 '22 15:09

Gubatron