[Qgis-developer] Python build problem on OSX

Tom Elwertowski telwertowski at comcast.net
Wed Dec 19 00:48:44 EST 2007


William Kyngesburye wrote:
> I found a build problem (unnoticed back in 0.9.0) with the Python  
> support on OSX - it will NOT build universal, or with an SDK (which  
> means I can't build *on* Leopard *for* Tiger, due to some library  
> version incompatibilities).

I work around the problem by editing the two generated Makefiles in 
build/python/core and build/python/gui after the C++ generation step is 
finished.

To CFLAGS and CXXFLAGS add
-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc

To LFLAGS add
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc

This can be done after the build is done or you can interrupt the build 
as soon as you see the message that it's starting compilation of 
core.so. I also delete any .o in the two directories. Running 'make' 
again will (re)build Universal modules.

The problem is that the QGIS Python modules are completely managed by a 
Python script. If the generated files were directly compiled by CMake, 
the problem would disappear. This would also solve the problem of all 
C++ files being regenerated and recompiled whenever any file, not just 
those which have a modified Python binding, is modified. It would make 
more sense to me if each sipxxx.cpp depended upon xxx.sip and Python was 
invoked only to generate the .cpp file leaving CMake to take care of 
compiling and linking C++ files.

Tom




More information about the Qgis-developer mailing list