[Qgis-developer] QGIS Python support in a library
Tim Sutton
tim at linfiniti.com
Sat May 31 00:27:20 EDT 2008
Hi
I got the python stuff building and my mac post build scripts fix up
all the lib paths (see below) in the libqgispython.dylib, core and
gui python libs, but python stuff still wont load at runtime...not
sure what to do next.
Debug: /Users/timlinux/dev/cpp/qgis/src/app/qgisapp.cpp: 385:
(QgisApp) Couldn't load Python support library.
Regards
Tim
otool dumps for libqgispython.dylib, core and gui python libs:
Tim-Laptop:~/dev/cpp/qgis/build timlinux$ otool -L /Applications/
qgis0.11.0.app/Contents/MacOS/lib/libqgispython.dylib
/Applications/qgis0.11.0.app/Contents/MacOS/lib/libqgispython.dylib:
@executable_path/lib/libqgispython.dylib (compatibility
version 0.0.0, current version 0.0.0)
@executable_path/lib/libqgis_core.0.11.dylib (compatibility
version 0.0.0, current version 0.0.0)
@executable_path/../Frameworks/QtCore.framework/Versions/4/
QtCore (compatibility version 4.3.0, current version 4.3.3)
@executable_path/../Frameworks/QtGui.framework/Versions/4/
QtGui (compatibility version 4.3.0, current version 4.3.3)
/System/Library/Frameworks/Python.framework/Versions/2.3/
Python (compatibility version 2.3.0, current version 2.3.5)
@executable_path/../Frameworks/QtXml.framework/Versions/4/
QtXml (compatibility version 4.3.0, current version 4.3.3)
@executable_path/../Frameworks/QtSvg.framework/Versions/4/
QtSvg (compatibility version 4.3.0, current version 4.3.3)
@executable_path/../Frameworks/QtNetwork.framework/Versions/
4/QtNetwork (compatibility version 4.3.0, current version 4.3.3)
@executable_path/lib/libproj.dylib (compatibility version
6.0.0, current version 6.4.0)
@executable_path/lib/libgeos.dylib (compatibility version
5.0.0, current version 5.3.0)
@executable_path/lib/libgdal.1.dylib (compatibility version
14.0.0, current version 14.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0,
current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.3.9)
Tim-Laptop:~/dev/cpp/qgis/build timlinux$ otool -L /Applications/
qgis0.11.0.app/Contents/MacOS/share/qgis/python/qgis/core.so
/Applications/qgis0.11.0.app/Contents/MacOS/share/qgis/python/qgis/
core.so:
/System/Library/Frameworks/Python.framework/Versions/2.3/
Python (compatibility version 2.3.0, current version 2.3.5)
@executable_path/lib/libqgis_core.0.11.dylib (compatibility
version 0.0.0, current version 0.0.0)
@executable_path/lib/libgeos.dylib (compatibility version
5.0.0, current version 5.3.0)
@executable_path/lib/libgdal.1.dylib (compatibility version
14.0.0, current version 14.0.0)
@executable_path/../Frameworks/QtCore.framework/Versions/4/
QtCore (compatibility version 4.3.0, current version 4.3.3)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current
version 1.2.3)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.3.9)
/System/Library/Frameworks/ApplicationServices.framework/
Versions/A/ApplicationServices (compatibility version 1.0.0, current
version 22.0.0)
@executable_path/../Frameworks/QtGui.framework/Versions/4/
QtGui (compatibility version 4.3.0, current version 4.3.3)
/System/Library/Frameworks/Carbon.framework/Versions/A/
Carbon (compatibility version 2.0.0, current version 128.0.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/
AppKit (compatibility version 45.0.0, current version 824.42.0)
/usr/lib/libiconv.2.dylib (compatibility version 5.0.0,
current version 5.0.0)
@executable_path/../Frameworks/QtNetwork.framework/Versions/
4/QtNetwork (compatibility version 4.3.0, current version 4.3.3)
@executable_path/../Frameworks/QtSvg.framework/Versions/4/
QtSvg (compatibility version 4.3.0, current version 4.3.3)
@executable_path/../Frameworks/QtXml.framework/Versions/4/
QtXml (compatibility version 4.3.0, current version 4.3.3)
@executable_path/../Frameworks/QtSql.framework/Versions/4/
QtSql (compatibility version 4.3.0, current version 4.3.3)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0,
current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)
Tim-Laptop:~/dev/cpp/qgis/build timlinux$ otool -L /Applications/
qgis0.11.0.app/Contents/MacOS/share/qgis/python/qgis/gui.so
/Applications/qgis0.11.0.app/Contents/MacOS/share/qgis/python/qgis/
gui.so:
/System/Library/Frameworks/Python.framework/Versions/2.3/
Python (compatibility version 2.3.0, current version 2.3.5)
@executable_path/lib/libqgis_core.0.11.dylib (compatibility
version 0.0.0, current version 0.0.0)
@executable_path/lib/libgeos.dylib (compatibility version
5.0.0, current version 5.3.0)
@executable_path/lib/libgdal.1.dylib (compatibility version
14.0.0, current version 14.0.0)
@executable_path/lib/ (compatibility version 0.0.0, current
version 0.0.0)
@executable_path/../Frameworks/QtCore.framework/Versions/4/
QtCore (compatibility version 4.3.0, current version 4.3.3)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current
version 1.2.3)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.3.9)
/System/Library/Frameworks/ApplicationServices.framework/
Versions/A/ApplicationServices (compatibility version 1.0.0, current
version 22.0.0)
@executable_path/../Frameworks/QtGui.framework/Versions/4/
QtGui (compatibility version 4.3.0, current version 4.3.3)
/System/Library/Frameworks/Carbon.framework/Versions/A/
Carbon (compatibility version 2.0.0, current version 128.0.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/
AppKit (compatibility version 45.0.0, current version 824.42.0)
/usr/lib/libiconv.2.dylib (compatibility version 5.0.0,
current version 5.0.0)
@executable_path/../Frameworks/QtNetwork.framework/Versions/
4/QtNetwork (compatibility version 4.3.0, current version 4.3.3)
@executable_path/../Frameworks/QtSvg.framework/Versions/4/
QtSvg (compatibility version 4.3.0, current version 4.3.3)
@executable_path/../Frameworks/QtXml.framework/Versions/4/
QtXml (compatibility version 4.3.0, current version 4.3.3)
@executable_path/../Frameworks/QtSql.framework/Versions/4/
QtSql (compatibility version 4.3.0, current version 4.3.3)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0,
current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)
Em May 29, 2008, às 1:06 PM, Tom Elwertowski escreveu:
> A full path seems to be needed for QLibrary to find libqgispython
> on a Mac. I don't know if this is a Qt deficiency but did notice
> other QLibrary instances are using full paths.
>
> After loading libqgispython, I get "Import error: No module named
> qgis.core" The Python path included with this message did not
> contain a path to the Mac qgis bundle. I assume it was looking for
> share/qgis/python/qgis/core.so
>
> All paths for all components probably need to be checked for the
> Mac. I may not have time to get through everything for at least a day.
>
> I also had problems building the Mac libqgispython. A quick look at
> CMakeLists.txt suggests this shouldn't be necessary but I needed to
> manually add the path to libgeos to the generated Makefiles.
>
> Tom
>
>
> John C. Tull wrote:
>> On May 28, 2008, at 4:28 PM, Martin Dobias wrote:
>>> On Thu, May 29, 2008 at 12:04 AM, John C. Tull
>>> <john.tull at wildnevada.org> wrote:
>>>> With some patches from Jurgen, it is now building.
>>>> Unfortunately, python is
>>>> disabled in the running binary that I built.
>>>
>>> If you build debug version, at some stage during initialization it
>>> shows information about success / failure of loading the qgispython
>>> library and initializing python. Could you check what does it say?
>>>
>>> Martin
>> This is reported:
>> 5/28/08 5:38:10 PM [0x0-0x4d04d].org.qgis.qgis[7306] Debug: /Users/
>> jctull/sources/qgis/trunk/src/app/qgisapp.cpp: 385: (QgisApp)
>> Couldn't load Python support library.
>> John
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
Tim Sutton
QGIS Project Steering Committee Member - Release Manager
Visit http://qgis.org for a great open source GIS
openModeller Desktop Developer
Visit http://openModeller.sf.net for a great open source ecological
niche modelling tool
Home Page: http://tim.linfiniti.com
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
More information about the Qgis-developer
mailing list