GNU bug report logs - #76736
[PATCH] gnu: gdal: Update to 3.10.2 and fix rpaths.

Previous Next

Package: guix-patches;

Reported by: Lars Bilke <lars.bilke <at> ufz.de>

Date: Tue, 4 Mar 2025 07:25:02 UTC

Severity: normal

Tags: patch

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#76736: closed ([PATCH] gnu: gdal: Update to 3.10.2 and fix
 rpaths.)
Date: Fri, 07 Mar 2025 20:52:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 07 Mar 2025 20:50:56 +0000
with message-id <87msdwtvin.fsf <at> gmail.com>
and subject line [PATCH] gnu: gdal: Update to 3.10.2 and fix rpaths.
has caused the debbugs.gnu.org bug report #76736,
regarding [PATCH] gnu: gdal: Update to 3.10.2 and fix rpaths.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
76736: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76736
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Lars Bilke <lars.bilke <at> ufz.de>
To: guix-patches <at> gnu.org
Cc: Lars Bilke <lars.bilke <at> ufz.de>
Subject: [PATCH] gnu: gdal: Update to 3.10.2 and fix rpaths.
Date: Tue, 04 Mar 2025 08:22:41 +0100
* gnu/packages/geo.scm (gdal): Update to 3.10.2.
* gnu/packages/geo.scm (gdal): Add fix-rpath phase from https://issues.guix.gnu.org/68606

Change-Id: I973e04af737d757329adfbfa37d255386143a21c
---
 gnu/packages/geo.scm | 124 ++++++++++++++++++++++++-------------------
 1 file changed, 68 insertions(+), 56 deletions(-)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 251ef5ced9..943de4586f 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -1408,68 +1408,80 @@ (define-public pdal
 (define-public gdal
   (package
     (name "gdal")
-    (version "3.6.1")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                     "http://download.osgeo.org/gdal/" version "/gdal-"
-                     version ".tar.gz"))
-              (sha256
-               (base32
-                "1qckwnygszxkkq40bf87s3m1sab6jj9jyakdvskh0qf7dq8zjarf"))
-              (modules '((guix build utils)))
-              (snippet
-                `(begin
+    (version "3.10.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://download.osgeo.org/gdal/" version "/gdal-"
+                           version ".tar.gz"))
+       (sha256
+        (base32 "1nmh92vbcrp9qnld98vkxsvaw0mrska06kxxbn7n6kgbh6mhlwfa"))
+       (modules '((guix build utils)))
+       (snippet `(begin
                    ;; TODO: frmts contains a lot more bundled code.
                    (for-each delete-file-recursively
-                     ;; bundled code
-                     '("frmts/png/libpng"
-                       "frmts/gif/giflib"
-                       "frmts/jpeg/libjpeg"
-                       "frmts/jpeg/libjpeg12"
-                       "frmts/gtiff/libtiff"
-                       "frmts/gtiff/libgeotiff"
-                       "frmts/zlib"
-                       "ogr/ogrsf_frmts/geojson/libjson"))))))
+                             ;; bundled code
+                             '("frmts/png/libpng" "frmts/gif/giflib"
+                               "frmts/jpeg/libjpeg"
+                               "frmts/jpeg/libjpeg12"
+                               "frmts/gtiff/libtiff"
+                               "frmts/gtiff/libgeotiff"
+                               "ogr/ogrsf_frmts/geojson/libjson"))))))
     (build-system cmake-build-system)
     (arguments
-     `(#:tests? #f
-       #:configure-flags
-       (list "-DGDAL_USE_INTERNAL_LIBS=WHEN_NO_EXTERNAL"
-             "-DGDAL_USE_JPEG12_INTERNAL=OFF")))
-    (inputs
-     (list curl
-           expat
-           freexl
-           geos
-           giflib
-           json-c
-           libgeotiff
-           libjpeg-turbo
-           libjxl
-           libpng
-           libtiff
-           libwebp
-           lz4
-           netcdf
-           openssl
-           openjpeg
-           pcre2
-           postgresql ; libpq
-           proj
-           qhull
-           sqlite
-           swig
-           zlib
-           zstd))
-    (native-inputs
-     (list pkg-config
-           python))
-    (propagated-inputs
-     (list python-numpy))
+     (list
+      #:tests? #f
+      #:configure-flags
+      #~(list "-DGDAL_USE_INTERNAL_LIBS=WHEN_NO_EXTERNAL"
+              "-DGDAL_USE_JPEG12_INTERNAL=OFF")
+      #:modules '((guix build cmake-build-system)
+                  (guix build utils)
+                  (ice-9 rdelim)
+                  (ice-9 popen))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'fix-rpath
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let ((libdir (string-append (assoc-ref outputs "out") "/lib")))
+                (for-each (lambda (file)
+                            (let* ((pipe (open-pipe* OPEN_READ "patchelf"
+                                                     "--print-rpath" file))
+                                   (line (read-line pipe)))
+                              (and (zero? (close-pipe pipe))
+                                   (invoke "patchelf" "--set-rpath"
+                                           (string-append libdir ":" line)
+                                           file))))
+                          (find-files libdir ".*\\.so$"))))))))
+    (inputs (list curl
+                  expat
+                  freexl
+                  geos
+                  giflib
+                  json-c
+                  libgeotiff
+                  libjpeg-turbo
+                  libjxl
+                  libpng
+                  libtiff
+                  libwebp
+                  lz4
+                  netcdf
+                  openssl
+                  openjpeg
+                  pcre2
+                  postgresql ;libpq
+                  proj
+                  qhull
+                  sqlite
+                  swig
+                  zlib
+                  zstd))
+    (native-inputs (list patchelf pkg-config python))
+    (propagated-inputs (list python-numpy))
     (home-page "https://gdal.org/")
     (synopsis "Raster and vector geospatial data format library")
-    (description "GDAL is a translator library for raster and vector geospatial
+    (description
+     "GDAL is a translator library for raster and vector geospatial
 data formats.  As a library, it presents a single raster abstract data model
 and single vector abstract data model to the calling application for all
 supported formats.  It also comes with a variety of useful command line

base-commit: f203028ef869945b3d44f0f2f7b16d61d064190c
-- 
2.46.1



[Message part 3 (message/rfc822, inline)]
From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 76736-done <at> debbugs.gnu.org
Subject: [PATCH] gnu: gdal: Update to 3.10.2 and fix rpaths.
Date: Fri, 07 Mar 2025 20:50:56 +0000
[Message part 4 (text/plain, inline)]
Hi,

I've checked issues for the same reason python-geopandas was broken for
me.

Closing as no longer required.

--
Oleg
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.