Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling a PyObjC application for 10.5 (Leopard) into xcode 10.6 (Snow Leopard)

I'm trying to deploy on 10.5 a PyObjC (or Cocoa-Python) application developed on Xcode 3.2.X (Snow Leopard) which runs perfectly fine on 10.6 systems.

The application doesn't launch on 10.5;it crashes at launch giving this error message (found on Crash Report):

Dyld Error Message: Library not loaded: /System/Library/Frameworks/Python.framework/Versions/2.6/Python Referenced from: /Users/myuser/Documents/myApp.app/Contents/MacOS/myApp Reason: image not found

Seems that somewhere Xcode hardcodes the Versions/2.6 python framework path (instead of setting it as Versions/Current, for example).

However, I was not able to find where this link path could be modified to be set to Current (or to 2.5, maybe conditionally)...

like image 702
Fabio Cionini Avatar asked Jul 19 '10 14:07

Fabio Cionini


1 Answers

The path you're seeing may very well be a legitimate path to the version of the Python framework you linked against. That's the correct path for the most recent version of SnowLeopard (10.6.5), at least. You may very well have set up the path to the framework correctly in your Xcode project.

If I had to guess, I would say that when you experience this crash you are running it on a different version of Mac OS X, where the 2.6 version of the Python framework doesn't exist. To explore the issue, try navigating into the Python framework and listing the versions available on the system on which you experience this error:

cd /System/Library/Frameworks/Python.framework/Versions
ls -al

What output does that give? I'm guessing it doesn't show a version 2.6 directory. Which version of Mac OS X are you running this on? You may need to compile and link your application against an earlier version of the system in order to get it to run on whatever system you're seeing this error on.

like image 125
Ryan Avatar answered Oct 06 '22 16:10

Ryan