[Qgis-developer] Building qgis fails (qwt, expat, python), config solutions

Martin Weis martin.weis.newsadress at gmx.de
Fri Dec 23 10:21:04 EST 2011


Hello!

I just ran into some issues compiling qgis, and here are my solutions.
Maybe there are some checks missing/going wrong?

Issues already discussed in [1] and [2] on a debian squeeze as well as
under ubuntu natty (errors logged here on: natty 64-bit):

------------QWT------------------
Linking CXX executable ../../output/bin/qgis
CMakeFiles/qgis.dir/qgsrasterlayerproperties.cpp.o: In function
`QgsRasterLayerProperties::refreshHistogram()':
/home/martin/soft/gis/qgis_git/Quantum-GIS/src/app/qgsrasterlayerproperties.cpp:1896:
undefined reference to `QwtPlotDict::setAutoDelete(bool)'
/home/martin/soft/gis/qgis_git/Quantum-GIS/src/app/qgsrasterlayerproperties.cpp:1898:
undefined reference to `QwtLegend::QwtLegend(QWidget*)'
/home/martin/soft/gis/qgis_git/Quantum-GIS/src/app/qgsrasterlayerproperties.cpp:1898:
undefined reference to `QwtPlot::insertLegend(QwtLegend*,
QwtPlot::LegendPosition, double)'
[...]

Due to linking against libqwt-dev: /usr/lib/libqwt.so, which is the
wrong version:

LANG=C apt-cache policy libqwt-dev
libqwt-dev:
  Installed: 4.2.0-6
  Candidate: 4.2.0-6
  Version table:
 *** 4.2.0-6 0
        500 http://ftp-stud.hs-esslingen.de/ubuntu/ natty/universe amd64
Packages

Should be linked against /usr/lib/libqwt-qt4.so:

LANG=C apt-cache policy libqwt5-qt4
libqwt5-qt4:
  Installed: 5.2.0-1build1
  Candidate: 5.2.0-1build1

ccmake config:
QWT_LIBRARY                      /usr/lib/libqwt-qt4.so

-------------Python-------------------

[ 62%] Building CXX object
python/CMakeFiles/python_module_qgis_analysis.dir/analysis/sipanalysispart0.cpp.o
In file included from
/home/martin/soft/gis/qgis_unstable/build/python/analysis/sipAPIanalysis.h:11:0,
                 from
/home/martin/soft/gis/qgis_unstable/build/python/analysis/sipanalysispart0.cpp:7:
/usr/include/python2.6/sip.h:32:20: fatal error: Python.h: Datei oder
Verzeichnis nicht gefunden
compilation terminated.

apt-get install python2.6-dev

------------expat-------------------------
[ 67%] Building CXX object
src/providers/gpx/CMakeFiles/gpxprovider.dir/moc_qgsgpxprovider.cxx.o
make[2]: *** Keine Regel vorhanden, um das Target »/usr/lib/libexpat.so«,
  benötigt von »src/providers/gpx/libgpxprovider.so«, zu erstellen.
Schluss.
make[1]: *** [src/providers/gpx/CMakeFiles/gpxprovider.dir/all] Fehler 2
make: *** [all] Fehler 2

apt-file search libexpat.so
ia32-libs: /lib32/libexpat.so
ia32-libs: /lib32/libexpat.so.1
ia32-libs: /lib32/libexpat.so.1.5.2
libexpat1: /lib/x86_64-linux-gnu/libexpat.so.1
libexpat1: /lib/x86_64-linux-gnu/libexpat.so.1.5.2
libexpat1-dev: /usr/lib/x86_64-linux-gnu/libexpat.so

ccmake config:
EXPAT_LIBRARY                 /usr/lib/x86_64-linux-gnu/libexpat.so

------------------------------------
I ran dpkg-buildpackage -b, as suggested in [3] and that worked, but it
did not solve the qwt dependency correctly:
dpkg-buildpackage: Quellversion 1.9.90
-- Found Qwt: /usr/lib/libqwt.so
-- Found Expat: /usr/lib/x86_64-linux-gnu/libexpat.so
-- Found PythonInterp: /usr/bin/python2.7
-- Found Python executable: /usr/bin/python2.7
-- Found Python version: 2.7.1+

Maybe this helps somebody getting such errors.
Martin

[1] http://www.osgeo.org/pipermail/qgis-user/2011-August/013337.html
[2] http://lists.osgeo.org/pipermail/qgis-developer/2010-October/011130.html
[3] http://lists.osgeo.org/pipermail/qgis-developer/2010-October/011137.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : http://lists.osgeo.org/pipermail/qgis-developer/attachments/20111223/e4ad49b5/signature-0001.bin


More information about the Qgis-developer mailing list