[Qgis-user] Mac OS X: QGIS 1.0 Preview 2 Crashes

William Kyngesburye woklist at kyngchaos.com
Mon Nov 17 17:14:11 PST 2008


On Nov 15, 2008, at 12:01 PM, Martin Dobias wrote:

>> Victory!
>>
>> I patched SIP to compile as a bundle, with no direct link to Python.
>> Rebuild PyQt and it followed.  Rebuild Qgis, and the qgis-python  
>> modules
>> are also now correct.
>>
>> Then, changed libqgispython to drop the full path to Python binary  
>> (I built
>> with system Python).
>
> Glad to hear that! Thanks for the effort!


I didn't find a way to submit a bug report with Riverbank, so I left a  
patch on their mailing list.  No reply so far, so I don't know if  
anyone is looking at it.

For those Mac users that want to try it themselves (compile from  
source, that is), here is what I did:

You must start over with SIP to get the changes to trickle into PyQt  
and Qgis.  In the SIP source, siputils.py,  
ModuleMakefile().finalise(), change:

self.LFLAGS.append("-F%s" % string.join(dl, os.sep))
self.LFLAGS.append("-framework Python")

to:

self.LFLAGS.append("-undefined dynamic_lookup")

Then reconfigure and compile SIP (with the build instructions in the  
Qgis wiki).  Then reconfigure and compile PyQt.

Now configure, compile and install Qgis.

Finally fix the Qgis python library link - assuming you configured for  
the default /Applications prefix:

sudo install_name_tool -change /path/to/python/framework  
Python.framework/Versions/2.5/Python /Applications/qgis1.0.0.app/ 
Contents/MacOS/lib/libqgispython.dylib

You can check the python path as compiled with:

otool -L /Applications/qgis1.0.0.app/Contents/MacOS/lib/ 
libqgispython.dylib


Note: there is no point to do this for Python 2.6 - the system doesn't  
have it.  And if you change it to Python.framework/Python with the  
thought of catching the _current_ version, you run the risk of binary  
incompatibilities if Qgis finds a different Python version than  
compiled with.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike.  Cheating, murdering, lying,  
fighting, and all for things that the beasts of the jungle would not  
deign to possess - money to purchase the effeminate pleasures of  
weaklings.  And yet withal bound down by silly customs that make them  
slaves to their unhappy lot while firm in the belief that they be the  
lords of creation enjoying the only real pleasures of existence....

- the wisdom of Tarzan





More information about the Qgis-user mailing list