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

Quantum GIS qgis at qgis.org
Thu Aug 6 06:19:31 EDT 2009


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

  * status:  closed => reopened
  * resolution:  fixed =>

Comment:

 Patch against qgis 1.1 (I couldn't find any information on how to checkout
 svn tarball)
 {{{
 --- src/core/CMakeLists.txt~    2009-04-14 05:03:52.000000000 -0400
 +++ src/core/CMakeLists.txt     2009-08-06 05:51:15.000000000 -0400
 @@ -272,7 +272,7 @@
      TARGET_LINK_LIBRARIES(qgis_core ${ICONV_LIBRARY})
    ENDIF (WIN32 OR APPLE)
    IF (UNIX)
 -    TARGET_LINK_LIBRARIES(qgis_core pthread)
 +    TARGET_LINK_LIBRARIES(qgis_core pthread dl)
    ENDIF (UNIX)
  ELSE (WITH_INTERNAL_SPATIALITE)
    TARGET_LINK_LIBRARIES(qgis_core ${SQLITE3_LIBRARY})
 --- python/qgisconfig.py.in~    2007-01-08 21:39:15.000000000 -0500
 +++ python/qgisconfig.py.in     2009-08-06 05:57:33.000000000 -0400
 @@ -1,4 +1,5 @@
  import PyQt4.pyqtconfig
 +import sys

  # These are installation specific values created when QGIS was
 configured.
  # The following line will be replaced when this template is used to
 create
 @@ -34,6 +35,7 @@
          # Make sure our C++ library is linked.
          self.extra_libs.append("qgis_core")
          self.extra_libs.append("qgis_gui")
 +       self.extra_libs.append("python"+sys.version[0:3])

          # Let the super-class do what it needs to.
          pyqtconfig.QtModuleMakefile.finalise(self)
 --- python/configure.py.in~     2009-02-25 14:15:23.000000000 -0500
 +++ python/configure.py.in      2009-08-06 05:58:43.000000000 -0400
 @@ -126,6 +126,7 @@

  # common settings for both core and gui libs
  for mk in [ makefile_core, makefile_gui ]:
 +  mk.extra_lflags = ["@CMAKE_MODULE_LINKER_FLAGS@"]
    mk.extra_libs = ["qgis_core"]
    if geos_library!="":
      mk.extra_libs.append(geos_library)
 @@ -144,7 +145,8 @@
                             build_path, # qgsconfig.h, qgssvnversion.h
                             gdal_inc_dir,
                             geos_inc_dir]
 -  mk.extra_cxxflags = ["-DCORE_EXPORT="+export]
 +  mk.extra_cxxflags = ["-DCORE_EXPORT="+export, "@CMAKE_CXX_FLAGS@"]
 +  mk.extra_libs.append("python"+sys.version[0:3])

  # more settings for gui lib
  makefile_gui.extra_libs.append("qgis_gui")

 }}}

 if you wont' accept the patch, and think it is a packaging problem, just
 close this as won't fix, but not fixed, please.

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/1518#comment:23>
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