[Qgis-developer] QGIS Python support in a library
Tim Sutton
tim at linfiniti.com
Wed May 28 12:45:21 EDT 2008
Hi
I tested under Ubuntu with r8535 and everything builds fine so it
seems mac specific.
Regards
Tim
2008/5/28 John C. Tull <john.tull at wildnevada.org>:
> I had a similar failure in most r8535:
>
> [ 67%] Building CXX object
> src/python/CMakeFiles/qgispython.dir/qgspythonutilsimpl.o
> Linking CXX shared library libqgispython.dylib
> Undefined symbols:
> "QgsApplication::pkgDataPath()", referenced from:
> QgsPythonUtilsImpl::pythonPath() in qgspythonutilsimpl.o
> "QgsMessageOutput::createMessageOutput()", referenced from:
> QgsPythonUtilsImpl::runString(QString const&, QString)in
> qgspythonutilsimpl.o
> "QgsApplication::qgisSettingsDirPath()", referenced from:
> QgsPythonUtilsImpl::homePluginsPath() in qgspythonutilsimpl.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make[2]: *** [src/python/libqgispython.0.11.dylib] Error 1
> make[1]: *** [src/python/CMakeFiles/qgispython.dir/all] Error 2
> make: *** [all] Error 2
>
> John
>
> On May 28, 2008, at 8:54 AM, Tim Sutton wrote:
>
>> Hi Martin
>>
>> Thanks for doing this change - I think it will be a nice improvement.
>> For me I get this error when trying to build on OSX:
>>
>> [ 72%] Built target python
>> Linking CXX executable qgis_help.app/Contents/MacOS/qgis_help
>> [ 74%] Built target qgis_help
>> Linking CXX shared library libqgispython.dylib
>> ld: Undefined symbols:
>> __ZN14QgsApplication11pkgDataPathEv
>> __ZN14QgsApplication19qgisSettingsDirPathEv
>> __ZN16QgsMessageOutput19createMessageOutputEv
>> __ZN9QgsLogger5debugERK7QStringiPKcS4_i
>> ld: Undefined symbols:
>> __ZN14QgsApplication11pkgDataPathEv
>> __ZN14QgsApplication19qgisSettingsDirPathEv
>> __ZN16QgsMessageOutput19createMessageOutputEv
>> __ZN9QgsLogger5debugERK7QStringiPKcS4_i
>> /usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: internal link edit
>> command failed
>> /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: internal link
>> edit command failed
>> lipo: can't figure out the architecture type of: /var/tmp//cc9EZSsS.out
>> make[2]: *** [src/python/libqgispython.0.11.dylib] Error 1
>> make[1]: *** [src/python/CMakeFiles/qgispython.dir/all] Error 2
>> make: *** [all] Error 2
>>
>> Regards
>>
>> Tim
>>
>> 2008/5/28 Martin Dobias <wonder.sk at gmail.com>:
>>>
>>> Hi all,
>>>
>>> as you probably know, until now embedding of Python to QGIS was done
>>> directly in the QGIS application sources and the support was
>>> implemented using conditional #ifdefs. So when building qgis binary,
>>> you got it with or without python. This wasn't a very good solution
>>> and was doing problems for packagers since there was no easy way to do
>>> optional installation of python support.
>>>
>>> In my recent commit to trunk (r8530) I've done the embedding in more
>>> flexible way. All python support code has been moved to src/python
>>> directory and now compiles as "qgispython" library. When QGIS
>>> application is started, it checks for the presence of this library and
>>> tries to load it and init python support. If something is wrong, the
>>> python support (i.e. python plugins and console) is disabled.
>>>
>>> I've tested this new approach on my ubuntu box with success, but other
>>> platforms are untested (I could try it on win, but I don't have access
>>> to OS X). So Mac and Win wizards please give it a try to see whether
>>> it's working fine there or not. I know that Mac makes difference
>>> between shared objects and libraries (MODULE / SHARED option in CMake)
>>> but I have no idea which one to choose there so try changing this
>>> first if you encounter some problems.
>>>
>>> Generally I hope it won't produce any great havoc, but one never knows
>>> :-) If that works fine, you shouldn't notice any change. If that
>>> doesn't work fine, nothing python-related will work. Additionally,
>>> this change has no impact on python bindings or plugins.
>>>
>>> Regards,
>>> Martin
>>> _______________________________________________
>>> 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
>> _______________________________________________
>> 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