[QGIS-Developer] Help compiling QGIS with Qt6 on Ubuntu 24.04/24.10

Jorge Gustavo Rocha jgr at di.uminho.pt
Fri Dec 27 02:48:30 PST 2024


Hi,

I would like to start compiling QGIS with Qt6 on Ubuntu. I've looked 
into .docker/qgis3-qt6-build-deps.dockerfile, but the rules are for fedora.

Currently, I'm missing libqwt-qt6 package on Ubuntu. I have the former 
qwt-qt5 packages, but not the new qwt-qt6 ones.

dpkg -l | grep qwt

ii  libqwt-qt5-6
ii  libqwt-qt5-dev

I've found this: https://packages.debian.org/experimental/libqwt-qt6-dev 
(and libqwt-qt6-6.2). These ones are not easy to install, due to missing 
dependencies.

Are these packages for qt6 available for Ubuntu for download on some ppa 
or should I build them locally? Does anyone succeed with compiling QGIS 
with Qt6 on Ubuntu?

Regards,

Jorge

--8<-------------------

sudo apt install qt6-base-dev qt6-3d-dev qt6-svg-dev qt6-base-private-dev qt6-declarative-dev qt6-tools-dev qt6-serialport-dev qt6-positioning-dev \
qt6-5compat-dev qt6-declarative-dev qt6-multimedia-dev qt6-webengine-dev libqca-qt6-dev qtkeychain-qt6-dev \
python3-pyqt6 python3-pyqt6.sip pyqt6-dev-tools python3-pyqt6.qtmultimedia

sudo apt install python3-pyqt6.qsci libqscintilla2-qt6-15  libqscintilla2-qt6-l10n pyqt6.qsci-dev pyqt6-dev

jgr at dragon:~/dev/cpp/build-qgis$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug 
-DENABLE_TESTS=OFF -DENABLE_PGTEST=OFF -DWITH_SERVER=TRUE 
-DWITH_QSPATIALITE=TRUE -DWITH_3D=TRUE 
-DGDAL_CONFIG=/usr/local/bin/gdal-config 
-DPROJ_INCLUDE_DIR=/usr/local/include 
-DPROJ_LIBRARY=/usr/local/lib/libproj.so -DWITH_PDAL=TRUE 
-DWITH_EPT=TRUE -DBUILD_WITH_QT6=TRUE -DWITH_QTWEBKIT=FALSE ../QGIS
-- Building with system libraries --
-- QGIS version: 3.41.0 Master (34100)
-- Found OpenCL C++ headers: /usr/include
-- ccache found
-- Could not find GRASS 7
-- Could not find GRASS 8
-- Found Proj: 9.6.0 /usr/local/lib/cmake/proj
-- Found Geos: 3.14.0dev /usr/local/lib/cmake/GEOS
-- Found GDAL: 3.11.0dev /usr/local/lib/cmake/gdal
-- Found Spatialindex: /usr/lib/x86_64-linux-gnu/libspatialindex.so
-- Found libzip: /usr/lib/x86_64-linux-gnu/libzip.so
-- Could NOT find Protobuf (missing: Protobuf_DIR)
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so
-- Found zlib: /usr/lib/x86_64-linux-gnu/libz.so
-- Found exiv2: /usr/lib/x86_64-linux-gnu/libexiv2.so
-- Qt WebKit support DISABLED.
-- Using embedded laz-perf
-- Found ZSTD: /usr/lib/x86_64-linux-gnu/libzstd.so
-- Found PDAL: pdalcpp (2.8.0)
-- Found Draco: /usr/lib/x86_64-linux-gnu/libdraco.so (1.5.6)
-- PDF4Qt disabled
-- QtWebEngine support DISABLED.
-- Found Qt version: 6.6.2
-- Found QScintilla2: /usr/lib/x86_64-linux-gnu/libqscintilla2_qt6.so 
(2.14.1)
-- Found QCA: /usr/lib/x86_64-linux-gnu/libqca-qt6.so (2.3.9)
-- Found QCA OpenSSL plugin
-- Pedantic compiler settings enabled
-- Debug output enabled
-- Found Python executable: /usr/bin/python3 (version 3.12.7)
-- Python library: /usr/lib/x86_64-linux-gnu/libpython3.12.so
-- Python site-packages: /usr/local/lib/python3.12/dist-packages
-- Found SIP version: 4.19.25
-- Found PyQt6 version: 6.7.1
-- Found QScintilla2 PyQt module: 2.14.1
-- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) 
(found version "")
-- Could NOT find NetCDF (missing: NETCDF_LIBRARY NETCDF_INCLUDE_DIR)
-- Found FCGI: /usr/lib/x86_64-linux-gnu/libfcgi.so
-- Using PROJ >= 6 srs database.
-- QtGamepad not enabled - disabling bindings for derived classes
-- Configuring done (4.7s)
CMake Error: The following variables are used in this project, but they 
are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the 
CMake files:
QWT_LIBRARY
     linked by target "qgis_gui" in directory /home/jgr/dev/cpp/QGIS/src/gui
     linked by target "qgis_app" in directory /home/jgr/dev/cpp/QGIS/src/app

-- Generating done (2.0s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20241227/e439766e/attachment.htm>


More information about the QGIS-Developer mailing list