[Qgis-developer] Qt5 and Python 3

Richard Duivenvoorde rdmailings at duif.net
Mon May 16 13:05:45 PDT 2016


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
# later you need:
sudo apt-get install python3.4-dev python3-pip
sudo pip3 install future

# 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

# 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

# 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 ..

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....


More information about the Qgis-developer mailing list