[Openmcl-devel] Codesigning a CCL based applicaiton
R. Matthew Emerson
rme at clozure.com
Tue Aug 28 18:10:50 PDT 2012
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.
More information about the Openmcl-devel