[Qgis-developer] Qt5 and Python 3

Matthias Kuhn matthias at opengis.ch
Mon May 16 13:46:18 PDT 2016


Hi Richard,

Seems your binaries try to pick up something related to Qt4 (suspects
are qwt, qca and qscintilla).
Are you sure you did "cmake -DENABLE_QT5=ON" in an empty build folder?
Once a folder is configured for either Qt5 or Qt4, this cannot be
changed later on.

Some comments also inside

On 05/16/2016 10:05 PM, Richard Duivenvoorde wrote:
> On 15-05-16 08:23, Matthias Kuhn wrote:
>> The commands to build with Python3 and Qt5 are at the bottom of this
>> blog post:
>>
>> http://www.opengis.ch/2016/05/04/qgis-qt5-and-python3-migration-current-state/
>>
>> Apart from this, dependencies need to be installed (pyqt5-python3,
>> qwt-qt5, qwtpolar-qt5 (optional), qscintilla2-qt5, qt5 -> look for dev
>> packages for all of them)
> Ok, tried (and wrote down all so others can try):
>
> On a laptop with a crispy fresh Debian Jessie:
>
> # to be sure I used only py3 I did:
>
> alias python=python3
No need to. Really.
> # later you need:
> sudo apt-get install python3.4-dev python3-pip
> sudo pip3 install future
Works also without sudo
>
> # installed build tools:
>
> sudo apt-get install build-essential
>
> # installed all jessie dependencies:
>
> # normal ones from INSTALL.txt
> apt-get install bison cmake dh-python doxygen flex gdal-bin git graphviz
> grass-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl0-dev
> libopenscenegraph-dev libosgearth-dev libpq-dev libproj-dev libqca2-dev
> libqca2-plugin-ossl libqscintilla2-dev libqt4-dev libqt4-opengl-dev
> libqt4-sql-sqlite libqtwebkit-dev libqwt-dev libspatialindex-dev
> libspatialite-dev libsqlite3-dev lighttpd locales pkg-config
> poppler-utils pyqt4-dev-tools pyqt4.qsci-dev python-all python-all-dev
> python-gdal python-mock python-nose2 python-psycopg2 python-pyspatialite
> python-qscintilla2 python-qt4 python-qt4-dev python-qt4-sql python-sip
> python-sip-dev python-yaml qt4-doc-html spawn-fcgi txt2tags xauth
> xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb cmake-curses-gui

There's a lot of python2 and qt4 stuff left in the above list. I'd
uninstall all of this.
Then you'll probably get cmake warnings telling you what's missing
(hint: qwt, qca and qscintilla are installed in their qt4 incarnation,
look for their qt5 equivalents).

Uninstalling is only for debugging purposes. Once you have it up and
running you can also reinstall all of this and make a second build
directory for Qt4, you can have both on the same system (I do).

> # qt5 ones based on fedora list + build errors:
> apt-get install libqt5webkit5-dev libqtlocation1 libqt5scripttools5
> pyqt5-dev python3-pyqt5 pyqt5.qsci-dev python3-pyqt5.qsci python3-pyqt5
> libqt5svg5-dev libqt5xmlpatterns5-dev qtpositioning5-dev qttools5-dev
> qttools5-dev-tools qtscript5-dev pyqt5-dev-tools libqt5scintilla2-dev
> python3-pyqt5.qtxmlpatterns
that looks good
>
> # checked out qgis and build
>
> mkdir build
> cd build
> ccmake -DPORT_PLUGINS=ON -DENABLE_QT5=ON -DWITH_QWTPOLAR=OFF
> -DBUILD_TESTING=FALSE
> -DCMAKE_INSTALL_PREFIX=/home/richard/apps/qgis3/master/debug
> -DQCA_LIBRARY=/usr/lib/x86_64-linux-gnu/libqca.so
> -DQWT_LIBRARY=/usr/lib/libqwt.so
> -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.4m.so.1
> -DWITH_BINDINGS=OFF ..

If you have to specify libraries manually, that should make you
suspicious ;-)

Cheers

>
> make -j8
> make install
>
> OK: we have lift off and succesfull compilation!!
>
> BUT: now I try to run (tried both from build dir, and from install dir
> (using export LD_LIBRARY_PATH)
>
> But get segmentation fault...
>
> Using gdb:
>
> Reading symbols from ./qgis...(no debugging symbols found)...done.
> (gdb) run
> Starting program: /home/richard/dev/qgis/git/qgis/build/output/bin/qgis
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007fffeb716cdc in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
>
> Any idea?
>
> Regards,
>
> Richard
>
> ps, actually I tried WITH bindings first, but failed with those....

-- 
Matthias Kuhn
OPENGIS.ch - https://www.opengis.ch
Spatial • (Q)GIS • PostGIS • Open Source


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160516/9c446c1e/attachment.sig>


More information about the Qgis-developer mailing list