[QGIS-trac] Re: [Quantum GIS] #1548: Python gui.so links to wrong QGIS libs when more than one version of QGIS is installed

Quantum GIS qgis at qgis.org
Wed Feb 18 05:37:07 EST 2009


#1548: Python gui.so links to wrong QGIS libs when more than one version of QGIS
is installed
--------------------------------------------------------------+-------------
        Reporter:  timlinux                                   |         Owner:  wonder                  
            Type:  bug                                        |        Status:  new                     
        Priority:  critical: causes crash or data corruption  |     Milestone:  Version 1.1.0           
       Component:  Build/Install                              |       Version:  HEAD                    
      Resolution:                                             |      Keywords:  python libraries version
Platform_version:  Ubuntu Linux 8.10 x86_64                   |      Platform:  Linux                   
        Must_fix:  Yes                                        |   Status_info:  0                       
--------------------------------------------------------------+-------------
Comment (by wonder):

 Hi Tim,

 installing two version of qgis in one install prefix doesn't make much
 sense to me. The "sonames" we're using for libraries are meant to help the
 compatibility, e.g. if there's an app requiring library with soname 1.1
 and you have the library in version 1.3.2 with soname 1.1, the linker
 knows this will work.

 While this allows different versions of libraries to coexist in one path,
 we must think also of other parts of QGIS: binary "qgis" is not versioned,
 thus overwritten with a newer install, plugins are not versioned
 (overwritten too), resources can exist also only in one version... The
 same is for python bindings.

 But imagine that it would be possible to have pyqgis modules core.so.1.0
 and core.so.1.1 in the same path. When you open python console and type:
 import qgis.core - how should the interpreter know which module are you
 asking for? To my knowledge, python fails to load the module if you try to
 rename it from core.so to core.so.X.Y.

 The problem with the linking (pyqgis modules linking to both 1.0 and 1.1
 libs) is surely caused by the mixture of two different builds in your
 build directory. Doing a clean compilation will fix the problem. I don't
 know how to force the linker to choose library with right soname. As far
 as I understand it, the linker checks for soname of the shared object
 you're linking against and then dynamic linker loads the library with
 correct soname.

 I hope I have convinced you that keeping two different versions of QGIS in
 one path is a bad idea and this ticket is invalid :-)

 Martin

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/1548#comment:1>
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