[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 18:19:22 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):

 Replying to [comment:2 timlinux]:
 > I have two QGIS source directories, one for trunk and one for stable.
 Each one has its own build dir. And both install to the same prefix. When
 I want to work with QGIS 1.0.x I run a make install in the stable source
 dir build directory and then run QGIS. Same thing for QGIS 1.1. I have
 followed this practice for some time without issues. Recently things have
 changed - I guess since we started 1.1 lib name versioning and the
 possibility arrived for linking to the two libs.

 Ah ok, now I go it :-)

 > "
 > 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?"
 >
 > My expectation was that if core.so is linked to only one qgis_core lib,
 the interpreter should use the one linked to.

 That's correct expectation.


 > I appreciate that my useage is an edge case however as I mentioned
 above, my approach used to work fine until the last 3 or 4 weeks (guessing
 on timeframe here). I just deleted my build dir in trunk sources and built
 again into my standard prefix to double / triple check and I still get the
 same cross linking side effect:
 >
 > {{{
 > [qgis] ldd gui.so  | grep qgis
 >       libqgis_core.so.1.1 => /home/timlinux/apps/lib/libqgis_core.so.1.1
 (0x00007feb02f1a000)
 >       libqgis_gui.so.1.0 => /home/timlinux/apps/lib/libqgis_gui.so.1.0
 (0x00007feb020ce000)
 >       libqgis_core.so.1.0 => /home/timlinux/apps/lib/libqgis_core.so.1.0
 (0x00007feafacaa000)
 > }}}

 Ok so the linker picks for some reason the wrong libs. I don't have an
 advice for you what exactly to do. My ideas are: go to
 (build_dir)/python/core and (build_dir)/python/gui and check the generated
 makefiles - especially the LIBS variable to see what paths are used when
 searching for libraries.

 If you won't be able to find the reason, we can take a look at it on the
 hackfeast.

 Martin

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