Unix tool. Compiling on Leopard, deploying on Tiger, using Python

Christiaan Hofman cmhofman at gmail.com
Sun Jun 8 03:37:07 PDT 2008


Have you tried adding an -dylib_file option to OTHER_LD_FLAGS?

Christiaan

On 8 Jun 2008, at 9:03 AM, Gerben Wierda wrote:

> OK, here is my problem. I want to create a binary (compiled from  
> open source on Leopard) that works on both Tiger and Leopard, so  
> backward compatible. Most of the time, this is no problem, but now  
> it is. I compile and link the binary by giving this to configure:
>
> 				CFLAGS="-mmacosx-version-min=10.4"
> 				LDFLAGS="-mmacosx-version-min=10.4"
>
> which normally is all I have to do. But now I have a binary that  
> uses Python. And though python is available in /usr/lib as symlink
>
> $ ls -l /usr/lib/*pyth*
> lrwxr-xr-x  1 root  wheel  16 Dec 31 13:21 /usr/lib/libpython.dylib - 
> > libpython2.dylib
> lrwxr-xr-x  1 root  wheel  16 Dec 31 13:21 /usr/lib/ 
> libpython2.5.dylib -> libpython2.dylib
> lrwxr-xr-x  1 root  wheel  68 Dec 31 13:21 /usr/lib/libpython2.dylib  
> -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/ 
> Python
> lrwxr-xr-x  1 root  wheel  75 Dec 31 13:31 /usr/lib/python2.5 - 
> > ../../System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
> python2.5
>
> the resulting binary is linked hard against the python 2.5 library.  
> Basically, at this stage I do not care if it is compiled and linked  
> against 2.5 and when run on Tiger it is running against 2.3 (which  
> may give problems).
>
> The resulting library is linked against
>
> 	/System/Library/Frameworks/Python.framework/Versions/2.5/Python  
> (compatibility version 2.5.0, current version 2.5.1)
>
> which is not avaiable on Tiger and not against
>
> 	/usr/lib/libpython2.dylib
>
> which is.
>
> Is there a way to tell the binary to link against /usr/lib/ 
> libpython2.dylib and not have it turn that into the actual 2.5 lib  
> in /System?
>
> Thanks,
>
> G
> _______________________________________________
> MacOSX-dev mailing list
> MacOSX-dev at omnigroup.com
> http://www.omnigroup.com/mailman/listinfo/macosx-dev



More information about the MacOSX-dev mailing list