[QGIS-trac] Re: [Quantum GIS] #1518: python binding does not link with libpython

Quantum GIS qgis at qgis.org
Sat Aug 15 12:13:48 EDT 2009


#1518: python binding does not link with libpython
-------------------------------------+--------------------------------------
        Reporter:  fundawang         |         Owner:  nobody       
            Type:  patch             |        Status:  closed       
        Priority:  minor: annoyance  |     Milestone:  Version 1.0.3
       Component:  Build/Install     |       Version:  1.0.0        
      Resolution:  wontfix           |      Keywords:               
Platform_version:                    |      Platform:  All          
        Must_fix:  No                |   Status_info:  0            
-------------------------------------+--------------------------------------
Comment (by jef):

 I'm revisiting this, because Markus seems to have hit this Mandriva
 specific problem again.

 Replying to [comment:23 fundawang]:
 > Patch against qgis 1.1 (I couldn't find any information on how to
 checkout svn tarball)

 1.1 isn't part of the unstable branch and there not maintained.

 This patch still breaks the Windows build.  I didn't find a portable way
 to get the name of the python library (ie. python25 on Windows, python2.5
 and something else on MacOS).  And I dislike hardcoding that without real
 need.

 Python extensions are only useful when loaded into python and there the
 python library already exists.  So there's no real reason why extension
 must be linked explicitly with the python library.  So the usual case is,
 that the library isn't linked.  And that's probably also why sipconfig
 filters out link options that try to make this trigger an error - because
 that would break each an every extension using sipconfig.  See my comment
 above.

 What I understand is that this could mask problems when extensions are not
 only not linked to the python library, but also not linked to other
 libraries they actually use and that are not always loaded into python
 (OTOH python might be able to cope with this - dunno).

 Anyway, the applied change splits the link arguments up, so that the
 filter can actually remove the offending option.  In that way this bug is
 actually fixed:  The build doesn't break, if you pass pedantic link flags.

 If this doesn't help on Mandriva, I suspect that the filter was removed
 there from sipconfig, but in that case I don't understand why sipconfig
 wasn't also modified to link with the python library by default.  The
 Makefile class actually has a ''python'' parameter to do just that.
 Unfortunately it cannot be used through ModuleMakefile.  But a
 modification to allow that and/or make that default should not have been
 difficult.

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/1518#comment:25>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list