Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qgis: 3.28.3 -> 3.30.1 #224805

Closed
wants to merge 1 commit into from
Closed

qgis: 3.28.3 -> 3.30.1 #224805

wants to merge 1 commit into from

Conversation

imincik
Copy link
Contributor

@imincik imincik commented Apr 5, 2023

Description of changes

Update QGIS to latest stable version.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@imincik
Copy link
Contributor Author

imincik commented Apr 5, 2023

Build fails on following error:

[11104/11129] Generating pap file for console auto-completion
FAILED: python/qsci_apis/PyQGIS.pap /build/source/build/python/qsci_apis/PyQGIS.pap
cd /build/source/build && /nix/store/syz2y6j53y5hpzbs7l0965zwxshi8iyl-python3-3.10.10/bin/python3.10 /build/source/python/qsci_apis/generate_console_pap.py -platform offscreen /build/source/build/python/qsci_apis/PyQGIS.pap /build/source/python/qsci_apis /build/source/build/python/qsci_apis
qt.qpa.plugin: Could not find the Qt platform plugin "offscreen" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx.

[11105/11129] Generating ui_DlgDbError.py
[11106/11129] Generating ui_DlgCancelTaskQuery.py
[11107/11129] Generating ui_console_compile_apis.py
[11108/11129] Generating ui_DlgAddGeometryColumn.py
[11109/11129] Generating ui_DlgCreateIndex.py
[11110/11129] Generating ui_DlgFieldProperties.py
[11111/11129] Generating ui_DlgImportVector.py
[11112/11129] Generating ui_DlgVersioning.py
[11113/11129] Generating ui_DlgCreateConstraint.py
[11114/11129] Generating ui_DlgExportVector.py
[11115/11129] Generating ui_DlgSqlLayerWindow.py
[11116/11129] Generating ui_DlgCreateTable.py
[11117/11129] Generating ui_DlgQueryBuilder.py
[11118/11129] Generating ui_DlgTableProperties.py
[11119/11129] Generating ui_DlgSqlWindow.py
ninja: build stopped: subcommand failed.
error: builder for '/nix/store/xicrjs0z2k2b8h2anx4451pval9clsma-qgis-unwrapped-3.30.1.drv' failed with exit code 1;
       last 10 log lines:
       > [11111/11129] Generating ui_DlgImportVector.py
       > [11112/11129] Generating ui_DlgVersioning.py
       > [11113/11129] Generating ui_DlgCreateConstraint.py
       > [11114/11129] Generating ui_DlgExportVector.py
       > [11115/11129] Generating ui_DlgSqlLayerWindow.py
       > [11116/11129] Generating ui_DlgCreateTable.py
       > [11117/11129] Generating ui_DlgQueryBuilder.py
       > [11118/11129] Generating ui_DlgTableProperties.py
       > [11119/11129] Generating ui_DlgSqlWindow.py
       > ninja: build stopped: subcommand failed.
       For full logs, run 'nix log /nix/store/xicrjs0z2k2b8h2anx4451pval9clsma-qgis-unwrapped-3.30.1.drv'.
error: 1 dependencies of derivation '/nix/store/562s6cdnw2bd3i98m286wz59saxd8svw-qgis-3.30.1.drv' failed to build

although configuration phase looks good (SIP, PyQt5, QScintilla2 was found)

configuring
fixing cmake files...
cmake flags: -GNinja -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/2p6ww2fkdxff9p1fqgdsp7zrhyk6j44k-qgis-unwrapped-3.30.1/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/2p6ww2fkdxff9p1fqgdsp7zrhyk6j44k-qgis-unwrapped-3.30.1/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/2p6ww2fkdxff9p1fqgdsp7zrhyk6j44k-qgis-unwrapped-3.30.1/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/2p6ww2fkdxff9p1fqgdsp7zrhyk6j44k-qgis-unwrapped-3.30.1/share/doc/qgis -DCMAKE_INSTALL_INFODIR=/nix/store/2p6ww2fkdxff9p1fqgdsp7zrhyk6j44k-qgis-unwrapped-3.30.1/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/2p6ww2fkdxff9p1fqgdsp7zrhyk6j44k-qgis-unwrapped-3.30.1/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/2p6ww2fkdxff9p1fqgdsp7zrhyk6j44k-qgis-unwrapped-3.30.1/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/2p6ww2fkdxff9p1fqgdsp7zrhyk6j44k-qgis-unwrapped-3.30.1/include -DCMAKE_INSTALL_SBINDIR=/nix/store/2p6ww2fkdxff9p1fqgdsp7zrhyk6j44k-qgis-unwrapped-3.30.1/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/2p6ww2fkdxff9p1fqgdsp7zrhyk6j44k-qgis-unwrapped-3.30.1/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/2p6ww2fkdxff9p1fqgdsp7zrhyk6j44k-qgis-unwrapped-3.30.1/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/h5003wsy3qqimqvrkn3bc5mwq4hhidag-gcc-wrapper-12.2.0/bin/strip -DCMAKE_RANLIB=/nix/store/h5003wsy3qqimqvrkn3bc5mwq4hhidag-gcc-wrapper-12.2.0/bin/ranlib -DCMAKE_AR=/nix/store/h5003wsy3qqimqvrkn3bc5mwq4hhidag-gcc-wrapper-12.2.0/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/2p6ww2fkdxff9p1fqgdsp7zrhyk6j44k-qgis-unwrapped-3.30.1 -DWITH_3D=True -DWITH_PDAL=TRUE -DWITH_QTWEBKIT=OFF -DGRASS_PREFIX8=/nix/store/kr2y5dc430l69hn1k1yka5py461lnryg-grass-8.2.0/grass82
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/h5003wsy3qqimqvrkn3bc5mwq4hhidag-gcc-wrapper-12.2.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/h5003wsy3qqimqvrkn3bc5mwq4hhidag-gcc-wrapper-12.2.0/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- QGIS version: 3.30.1 's-Hertogenbosch (33001)
-- Looking for CL_VERSION_3_0
-- Looking for CL_VERSION_3_0 - not found
-- Looking for CL_VERSION_2_2
-- Looking for CL_VERSION_2_2 - not found
-- Looking for CL_VERSION_2_1
-- Looking for CL_VERSION_2_1 - not found
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - not found
-- Looking for CL_VERSION_1_2
-- Looking for CL_VERSION_1_2 - not found
-- Looking for CL_VERSION_1_1
-- Looking for CL_VERSION_1_1 - not found
-- Looking for CL_VERSION_1_0
-- Looking for CL_VERSION_1_0 - not found
-- Could NOT find OpenCL (missing: OpenCL_LIBRARY OpenCL_INCLUDE_DIR)
-- Couldn't find OpenCL: support DISABLED
-- Could not find GRASS 7
-- Found GRASS 8: /nix/store/kr2y5dc430l69hn1k1yka5py461lnryg-grass-8.2.0/grass82 (8.2.0, off_t size = )
-- Found FLEX: /nix/store/qw69i0vd26184fwd0jswhf4z775z9f5h-flex-2.6.4/bin/flex (found suitable version "2.6.4", minimum required is "2.6")
-- Found BISON: /nix/store/7s44ywfgsp78iy6clmz6qsr0shs2m815-bison-3.8.2/bin/bison (found version "3.8.2")
-- Looking for openpty
-- Looking for openpty - found
-- Found Proj: /nix/store/qwq54bw8rs54ixnslxp6h89cczb256jl-proj-9.2.0/lib/libproj.so version 9 (9.2.0)
-- Found GEOS: /nix/store/fbf67lgc4gpmbll22w2imx8xq1g9jmc3-geos-3.11.2/lib/libgeos_c.so (3.11.2)
-- Found GDAL: /nix/store/w3fpssyr5hy001c4vdf0527r6rhppqf0-gdal-3.6.3/lib/libgdal.so (3.6.3)
-- Found Expat: /nix/store/hlvahl71n1jjdr7jlqpxwzcjpb6kwaf9-expat-2.5.0/lib/libexpat.so
-- Found Spatialindex: /nix/store/gg061614b1f6nlg0yn2k4hn8n4xgpsgj-libspatialindex-1.9.3/lib/libspatialindex.so
-- Found LibZip: /nix/store/8vxy38zm8gah9q2h2ahqmhvf5mrkq5xz-libzip-1.9.2/lib/libzip.so
-- Found libzip: /nix/store/8vxy38zm8gah9q2h2ahqmhvf5mrkq5xz-libzip-1.9.2/lib/libzip.so
-- Found Sqlite3: /nix/store/kvj4j4ssr2abq4583yc31nvswdf9vf38-sqlite-3.41.1/lib/libsqlite3.so
-- Found Protobuf: /nix/store/77ljxnz22fqgczhw45i4g0d3zdvyidyd-protobuf-3.21.12/lib/libprotobuf.so (found version "3.21.12")
-- Found Protobuf: /nix/store/77ljxnz22fqgczhw45i4g0d3zdvyidyd-protobuf-3.21.12/lib/libprotobuf.so
-- Found ZLIB: /nix/store/xfkzh15vxmxhiza2s2din1az0vzfaf56-zlib-1.2.13/lib/libz.so (found version "1.2.13")
-- Found zlib: /nix/store/xfkzh15vxmxhiza2s2din1az0vzfaf56-zlib-1.2.13/lib/libz.so
-- Found exiv2: /nix/store/rg5d1nv8fyfrv9r8ndc6lqhplyybmlgf-exiv2-0.27.6-lib/lib/libexiv2.so
-- Found PostgreSQL: /nix/store/fyhgszpd2y82qwc1zla32f06vp2x2dk9-postgresql-14.7-lib/lib/libpq.so (found version "14.7")
-- Found SpatiaLite: /nix/store/q97q5q1kj7v27f8k3wyzjgh8iswj02wk-libspatialite-5.0.1/lib/libspatialite.so
-- Qt WebKit support DISABLED.
-- Using embedded laz-perf
-- Found ZSTD: /nix/store/scl69wk3mswn05bhdxwvrlbkvq53a5ib-zstd-1.5.4/lib/libzstd.so
-- Found ZSTD: /nix/store/scl69wk3mswn05bhdxwvrlbkvq53a5ib-zstd-1.5.4/lib/libzstd.so
-- Found PDAL: /nix/store/7b3yrq14fhc49q49vmvyn2nnm9fnaip1-pdal-2.4.3/lib/libpdalcpp.so;/nix/store/7b3yrq14fhc49q49vmvyn2nnm9fnaip1-pdal-2.4.3/lib/libpdal_util.so (2.4.3)
-- Found Qt version: 5.15.8
-- Found QScintilla2: /nix/store/jf76ssx7pq46d2xgfvzln2v4h06m4pd0-qscintilla-qt5-2.13.2/lib/libqscintilla2_qt5.so (2.13.2)
-- Found Qwt: /nix/store/lbi257ay1pwbfik4g6j0qpa9qpddlmax-qwt-6.2.0/lib/libqwt.so (6.2.0)
-- Found QtKeychain: /nix/store/w6v4vww9xd1pg46yqf48xzqmcjxiwy0j-qtkeychain-0.12.0/lib/libqt5keychain.so
-- Found QCA: /nix/store/3jy3rpi4wxj0wx3yg2s7myprf8vcldzg-qca-qt5-2.3.5/lib/libqca-qt5.so (2.3.5)
-- Found QCA OpenSSL plugin
-- Pedantic compiler settings enabled
-- Found GSL: -L/nix/store/xd4s7lfx7970sp0ki8zxv8l2436lycdz-gsl-2.7.1/lib -lgsl -lgslcblas -lm
-- Found Python: /nix/store/syz2y6j53y5hpzbs7l0965zwxshi8iyl-python3-3.10.10/bin/python3.10 (found suitable version "3.10.10", minimum required is "3.7") found components: Interpreter Development Development.Module Development.Embed
-- Found Python executable: /nix/store/syz2y6j53y5hpzbs7l0965zwxshi8iyl-python3-3.10.10/bin/python3.10 (version 3.10.10)
-- Python library: /nix/store/syz2y6j53y5hpzbs7l0965zwxshi8iyl-python3-3.10.10/lib/libpython3.10.so
-- Python site-packages: /nix/store/syz2y6j53y5hpzbs7l0965zwxshi8iyl-python3-3.10.10/lib/python3.10/site-packages
-- Found SIP version: 6.7.7
-- Found PyQt5 version: 5.15.9
-- Found QScintilla2 PyQt module: 2.13.2
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Found HDF5: /nix/store/9y8g68x0cws1n5w4dsx0v6ip181z7g0i-hdf5-1.14.0/lib/libhdf5.so;/nix/store/xfkzh15vxmxhiza2s2din1az0vzfaf56-zlib-1.2.13/lib/libz.so;/nix/store/8xk4yl1r3n6kbyn05qhan7nbag7npymx-glibc-2.35-224/lib/libdl.so;/nix/store/8xk4yl1r3n6kbyn05qhan7nbag7npymx-glibc-2.35-224/lib/libm.so (found version "1.14.0")
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found NetCDF: /nix/store/jms56kdqh2f9wpyc8i7bs0fqlviicqyd-netcdf-4.9.0/lib/libnetcdf.so
-- Found LibXml2: /nix/store/ja73jc04spx5ycdfidx4v7f93vhmq3g0-libxml2-2.10.3/lib/libxml2.so (found version "2.10.3")
-- Found Threads: TRUE
-- Looking for updwtmpx
-- Looking for updwtmpx - found
-- Using PROJ >= 6 srs database.
-- Ctest Binary Directory set to: /build/source/build/output/bin
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_EXPORT_NO_PACKAGE_REGISTRY
    CMAKE_INSTALL_BINDIR
    CMAKE_INSTALL_DOCDIR
    CMAKE_INSTALL_INCLUDEDIR
    CMAKE_INSTALL_INFODIR
    CMAKE_INSTALL_LIBDIR
    CMAKE_INSTALL_LIBEXECDIR
    CMAKE_INSTALL_LOCALEDIR
    CMAKE_INSTALL_MANDIR
    CMAKE_INSTALL_OLDINCLUDEDIR
    CMAKE_INSTALL_SBINDIR
    CMAKE_POLICY_DEFAULT_CMP0025


-- Build files have been written to: /build/source/build
cmake: enabled parallel building
cmake: enabled parallel installing

Any ideas @lsix @sikmir @willcohen ?

@imincik
Copy link
Contributor Author

imincik commented Apr 5, 2023

This looks like the related QGIS change: qgis/QGIS@ff9f283

@ofborg ofborg bot requested review from lsix, willcohen and sikmir April 5, 2023 16:27
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Apr 5, 2023
@imincik
Copy link
Contributor Author

imincik commented Jun 5, 2023

@willcohen , @sikmir , @tpwrules I need help with this PR. I am struggling with correct update of pyqt-package-dirs patch.

@timlinux timlinux mentioned this pull request Aug 10, 2023
@imincik
Copy link
Contributor Author

imincik commented Aug 18, 2023

I tried to add wrapQtAppsHook in to nativeBuildInputs and set

  qtWrapperArgs = [
    "--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms"
  ];

but it didn't help.

Full diff is here:

diff --git a/pkgs/applications/gis/qgis/unwrapped.nix b/pkgs/applications/gis/qgis/unwrapped.nix
index fec318fb2cc..925ae828ab7 100644
--- a/pkgs/applications/gis/qgis/unwrapped.nix
+++ b/pkgs/applications/gis/qgis/unwrapped.nix
@@ -40,11 +40,11 @@
 , zstd
 , makeWrapper
 , wrapGAppsHook
+, wrapQtAppsHook
 , substituteAll
 }:

 let
-
   py = python3.override {
     packageOverrides = self: super: {
       pyqt5 = super.pyqt5.override {
@@ -89,6 +89,17 @@ in mkDerivation rec {
     inherit py;
   };

+  nativeBuildInputs = [
+    makeWrapper
+    wrapGAppsHook
+    wrapQtAppsHook
+
+    cmake
+    flex
+    bison
+    ninja
+  ];
+
   buildInputs = [
     openssl
     proj
@@ -122,8 +133,6 @@ in mkDerivation rec {
     ++ lib.optional withWebKit qtwebkit
     ++ pythonBuildInputs;

-  nativeBuildInputs = [ makeWrapper wrapGAppsHook cmake flex bison ninja ];
-
   patches = [
     (substituteAll {
       src = ./set-pyqt-package-dirs.patch;
@@ -142,6 +151,10 @@ in mkDerivation rec {
       in "-DGRASS_PREFIX${gmajor}=${grass}/grass${gmajor}${gminor}"
     );

+  qtWrapperArgs = [
+    "--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms"
+  ];
+
   dontWrapGApps = true; # wrapper params passed below

   postFixup = lib.optionalString withGrass ''

From nixpkgs manual:

"""
Note
wrapQtAppsHook ignores files that are non-ELF executables. This means that scripts won’t be automatically wrapped so you’ll need to manually wrap them as previously mentioned. An example of when you’d always need to do this is with Python applications that use PyQt.
"""

Above note might be exactly our case. If that's true, I am not sure which script I should wrap with QT_QPA_PLATFORM_PLUGIN_PATH to make it work. Any ideas ?

/cc @timlinux

@imincik
Copy link
Contributor Author

imincik commented Aug 21, 2023

Trying to build with

  preBuild = ''
    export QT_QPA_PLATFORM_PLUGIN_PATH=${qtbase.bin}/lib/qt-*/plugins/platforms
  '';

now.

Failed with

[11104/11129] Generating pap file for console auto-completion
FAILED: python/qsci_apis/PyQGIS.pap /build/source/build/python/qsci_apis/PyQGIS.pap
cd /build/source/build && /nix/store/syz2y6j53y5hpzbs7l0965zwxshi8iyl-python3-3.10.10/bin/python3.10 /build/source/python/qsci_apis/generate_console_pap.py -platform offscreen /build/source/build/python/qsci_apis/PyQGIS.pap /build/source/python/qsci_apis /build/source/build/python/qsci_apis
qt.qpa.plugin: Could not find the Qt platform plugin "offscreen" in "/nix/store/vjpm4nyl36fvw8pswzfzlfayw1c06135-qtbase-5.15.8-bin/lib/qt-*/plugins/platforms"
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx.

But libqoffscreen.so exists on this path

ls /nix/store/vjpm4nyl36fvw8pswzfzlfayw1c06135-qtbase-5.15.8-bin/lib/qt-*/plugins/platforms
libqeglfs.so  libqlinuxfb.so  libqminimalegl.so  libqminimal.so  libqoffscreen.so  libqvnc.so  libqxcb.so

@imincik
Copy link
Contributor Author

imincik commented Aug 21, 2023

Trying to build with

  preBuild = ''
    export QT_QPA_PLATFORM_PLUGIN_PATH=${qtbase.bin}/lib/qt-${qtbase.version}/plugins/platforms
  '';

With this setting, the build was successful ! /cc @timlinux

@imincik
Copy link
Contributor Author

imincik commented Aug 23, 2023

Replaced by #250717 .

@imincik imincik closed this Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant