[QGIS-trac] Re: [Quantum GIS] #1950: Python binary choice on OS X (10.6) / Building bug

Quantum GIS qgis at qgis.org
Thu Sep 24 15:40:06 EDT 2009


#1950: Python binary choice on OS X (10.6) / Building bug
--------------------------------------------------------------+-------------
        Reporter:  vince                                      |         Owner:  nobody             
            Type:  bug                                        |        Status:  new                
        Priority:  critical: causes crash or data corruption  |     Milestone:                     
       Component:  Build/Install                              |       Version:  1.3.0              
      Resolution:                                             |      Keywords:  spatialite.c python
Platform_version:  10.6 (Snow Leopard)                        |      Platform:  OS X               
        Must_fix:  No                                         |   Status_info:  0                  
--------------------------------------------------------------+-------------
Comment (by vince):

 Thanks for that quick answer.

 Replying to [comment:1 kyngchaos]:
 > Works fine in the Xcode project build.  locale_charset() is a part of
 the iconv in OS X.  Maybe there are variations of libiconv (OSX uses GNU
 iconv) and you're using a different one than provided by Apple that uses
 the linux method?  In any case, this is really an issue with spatialite,
 and is not something that can be fixed in Qgis.

 Ok. MacPorts uses its own libiconv. That's why the link fails. I tried to
 link against system libiconv, but it raises other errors, so the patch is
 fine and justified (adapt a build to Macports).

 > Qgis detects Python from your PATH, so add your prefered python bin
 folder to the front of your PATH before configuring.  Also, Qgis uses an
 internal python interpreter and links directly to the python framework, so
 it happens at linking and you can't change it at runtime.

 Okay, so let me put it another way: I have two Python frameworks. One is
 the Apple default, the other is the new 2.6.2 Python release compiled
 under Macports and located elsewhere. How can I force Qgis to link with
 the latter rather than the former?

 > Qgis uses the GRASS libraries directly, not thru GDAL.  Maybe it's not
 autodetecting GRASS?  On OSX, cmake defaults to looking for an application
 build of GRASS in a default install path, so if you have a Unix build or
 have customized the install location, you must specify the
 GRASS_INCLUDE_DIR and GRASS_PREFIX when configuring Qgis.

 That's what I did, and it is fine:

 {{{
 --->  Configuring qgis
 -- The C compiler identification is GNU
 -- The CXX compiler identification is GNU
 -- Check for working C compiler: /usr/bin/gcc
 -- Check for working C compiler: /usr/bin/gcc -- works
 -- Detecting C compiler ABI info
 -- Detecting C compiler ABI info - done
 -- Check for working CXX compiler: /usr/bin/g++
 -- Check for working CXX compiler: /usr/bin/g++ -- works
 -- Detecting CXX compiler ABI info
 -- Detecting CXX compiler ABI info - done
 -- Found Iconv: /usr/pkg/lib/libiconv.dylib
 -- Found Proj: /usr/pkg/lib/libproj.dylib
 -- Found Expat: /usr/pkg/lib/libexpat.dylib
 -- Using GSL from /usr/pkg
 -- Found GEOS: /usr/pkg/lib/libgeos_c.dylib
 -- Found GDAL: /usr/pkg/lib/libgdal.dylib
 -- Found PostgreSQL: /usr/pkg/lib/postgresql84/libpq.dylib
 -- Found GRASS: /usr/pkg/apps/GRASS-6.4.app/Contents/MacOS (6.4.0svn)
 -- Looking for openpty
 -- Looking for openpty - found
 -- Found PythonLibs: -framework Python
 -- Found PythonInterp: /usr/pkg/bin/python2.6
 -- Python libraries found
 -- Python bindings enabled
 -- Looking for Q_WS_X11
 -- Looking for Q_WS_X11 - not found.
 -- Looking for Q_WS_WIN
 -- Looking for Q_WS_WIN - not found.
 -- Looking for Q_WS_QWS
 -- Looking for Q_WS_QWS - not found.
 -- Looking for Q_WS_MAC
 -- Looking for Q_WS_MAC - found
 -- Looking for QT_MAC_USE_COCOA
 -- Looking for QT_MAC_USE_COCOA - found
 -- Found Qt-Version 4.5.2
 -- Configuring done
 }}}

 but it does not seem to show up in the extensions. The libqgisgrass.dylib
 are present, BTW.

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