[Openmcl-devel] Codesigning a CCL based applicaiton

Michael Minerva minerva at agentsheets.com
Wed Aug 29 12:04:02 PDT 2012

On Aug 28, 2012, at 7:10 PM, R. Matthew Emerson wrote:

> On Aug 28, 2012, at 8:31 PM, Michael Minerva <minerva at agentsheets.com> wrote:
>> I have been playing around with trying to codesign a CCL based application and I have ran into some trouble and I was wondering if whoever did the codesigning for the CCL appstore apps might be able to lend me some of their wisdom.  So far I have received a code signing identity from the apple developer page, create an authenticated certificate which is in my key chain but when I execute the codesign command in the OSX terminal I get some strange errors: 
>> codesign_allocate: the __LINKEDIT segment does not cover the end of the file (can't be processed) in: /Users/Mike/Desktop/AgentCubes 1.0RC3/AgentCubes.app/Contents/MacOS/AgentCubes
>> AgentCubes.app: object file format invalid or unsuitable
>> I was wondering if you guys ran into this problem when trying to codesign CCL for the app store and if so if you knew a solution.  I was able to find some threads discussing similar issues but the thread and solution always seemed to assume that the project was an XCode project and offered little assistance for my CCL app.  
> This error happens when trying to sign a binary that is a heap image with a prepended lisp kernel.  The codesign command chokes on that, as you note.
> Sometime around the 1.7 release, I changed the lisp kernel so that it will also try to find a heap image inside .app bundles.   When it wants to load a heap image, the lisp kernel tries the following places in order:
>  * image pathname specified on command-line
>  * embedded image
>  * same directory as the lisp kernel binary
>  * ../Resources/ccl/, relative to the directory containing the lisp kernel binary.  (Since the lisp kernel would be MyApp.app/Contents/MacOS/dx8664cl, this lets us have a lisp image in MyApp.app/Contents/Resources/ccl/dx86cl64.image.)
> I wrote a crude script to construct and sign the Mac App Store version of CCL.  It's not in the trunk, but you can look at it at http://trac.clozure.com/ccl/browser/branches/1.8-appstore/source/scripts/make-store-app.  Maybe it will help you.
Hello Matthew,

Thank you very much for the info!  

I am still just a little confused about what I need to do.  It seems from your script (and from my interpretation of your message) that I need to: goto the lisp kernel directory and do a make clean, copy all of the files from ccl into MyApp.app/Contents/Resources/ccl, then finally execute the codesign command.   Does this sound about right?

I tried doing that but still get the same error.  I am wondering if maybe my problem is name related?  In your example you said the lisp kernel should be at: MyApp.app/Contents/MacOS/dx8664cl and the image should be in: MyApp.app/Contents/Resources/ccl/dx86cl64.image.  In my case my kernel is called:  MyApp.app/Contents/MacOS/MyApp and the image is: MyApp.app/Contents/Resources/ccl/dx86cl64.image do these two need to have related names? 

Thank again for your help,


More information about the Openmcl-devel mailing list