[bug#68606,v2,3/3] gnu: patchelf: Update to 0.18.0.

Message ID a12b7fbc97d27abd254d665a8adcdf03b5e929b6.1705844923.git.roman@burningswell.com
State New
Headers
Series Update GDAL and build Java bindings. |

Commit Message

Roman Scherer Jan. 21, 2024, 1:54 p.m. UTC
* gnu/packages/elf.scm (patchelf): Update to 0.18.0.

Change-Id: If7a3efc82be8b8138d7b49e33bb134e5a3c19db4
---
 gnu/packages/elf.scm | 30 +++++++++++++++++++++---------
 1 file changed, 21 insertions(+), 9 deletions(-)
  

Comments

Andreas Enge March 24, 2025, 2:51 p.m. UTC | #1
Hello Roman,

gdal has been updated to 3.8.2 around
   https://issues.guix.gnu.org/76736
Apparently patchelf is not needed.

What you like to get back to your patch series and see which parts of
them you would like to apply? And maybe to which version you would like
to update so that the depending packages still build?

Andreas
  
Roman Scherer March 25, 2025, 10:24 a.m. UTC | #2
Hi Andreas,

thanks for looking into this. Back in the day I was after the Java GDAL
bindings. I think I need a newer version of patchelf to run it on
aarch64. If this is not needed anymore, great.

I'm not using GDAL right now. If anyone else is still interested I can
try to get back to this old project and see if the Java bindings of my
patch still work later this week.

Wdyt?

Roman

Andreas Enge <andreas@enge.fr> writes:

> Hello Roman,
>
> gdal has been updated to 3.8.2 around
>    https://issues.guix.gnu.org/76736
> Apparently patchelf is not needed.
>
> What you like to get back to your patch series and see which parts of
> them you would like to apply? And maybe to which version you would like
> to update so that the depending packages still build?
>
> Andreas
  
Andreas Enge March 25, 2025, 11:26 a.m. UTC | #3
Hello Roman,

Am Tue, Mar 25, 2025 at 11:24:01AM +0100 schrieb Roman Scherer:
> I'm not using GDAL right now. If anyone else is still interested I can
> try to get back to this old project and see if the Java bindings of my
> patch still work later this week.

it is up to you! If nobody needs the Java bindings now, we can also
close the bug instead of spending more time on it.

Andreas
  
Roman Scherer March 26, 2025, 7:45 a.m. UTC | #4
Hi Andreas,
Ok, then let's close it for now. I don't have a gdal use case at the moment.
Thanks

On Tue, Mar 25, 2025, 12:26 Andreas Enge <andreas@enge.fr> wrote:

> Hello Roman,
>
> Am Tue, Mar 25, 2025 at 11:24:01AM +0100 schrieb Roman Scherer:
> > I'm not using GDAL right now. If anyone else is still interested I can
> > try to get back to this old project and see if the Java bindings of my
> > patch still work later this week.
>
> it is up to you! If nobody needs the Java bindings now, we can also
> close the bug instead of spending more time on it.
>
> Andreas
>
>
  
Andreas Enge March 26, 2025, 8:24 a.m. UTC | #5
Am Wed, Mar 26, 2025 at 08:45:45AM +0100 schrieb Roman Scherer:
> Ok, then let's close it for now. I don't have a gdal use case at the moment.

Done!

Andreas
  
Roman Scherer March 26, 2025, 9:39 a.m. UTC | #6
Thank you Andreas

On Wed, Mar 26, 2025, 09:24 Andreas Enge <andreas@enge.fr> wrote:

> Am Wed, Mar 26, 2025 at 08:45:45AM +0100 schrieb Roman Scherer:
> > Ok, then let's close it for now. I don't have a gdal use case at the
> moment.
>
> Done!
>
> Andreas
>
>
  

Patch

diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index a100038f14..4f82b6108a 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -276,16 +276,16 @@  (define-public libelf
 (define-public patchelf
   (package
     (name "patchelf")
-    (version "0.11")
+    (version "0.18.0")
     (source (origin
-             (method url-fetch)
-             (uri (string-append
-                   "https://nixos.org/releases/patchelf/patchelf-"
-                   version
-                   "/patchelf-" version ".tar.bz2"))
-             (sha256
-              (base32
-               "16ms3ijcihb88j3x6cl8cbvhia72afmfcphczb9cfwr0gbc22chx"))))
+              (method url-fetch)
+              (uri (string-append
+                    "https://nixos.org/releases/patchelf/patchelf-"
+                    version
+                    "/patchelf-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "02s7ap86rx6yagfh9xwp96sgsj0p6hp99vhiq9wn4mxshakv4lhr"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
@@ -300,6 +300,18 @@  (define-public patchelf
                ;; Find libgcc_s.so, which is necessary for the test:
                (("/xxxxxxxxxxxxxxx") (string-append (assoc-ref inputs "gcc:lib")
                                                     "/lib")))
+             (substitute* "tests/replace-needed.sh"
+               ;; This test assumes that only libc will be linked alongside
+               ;; libfoo, but we also link libgcc_s.
+               (("grep -v 'foo\\\\.so'") "grep -E 'libc.*\\.so'"))
+             (substitute* "tests/set-empty-rpath.sh"
+               ;; Binaries with empty RPATHs cannot run on Guix, because we
+               ;; still need to find libgcc_s (see above).
+               (("^\"\\$\\{SCRATCH\\}\"\\/simple.$") ""))
+             (substitute* "tests/shared-rpath.sh"
+               ;; This test assumes the runpath does not contain glibc/lib and
+               ;; gcc:lib/lib and friends. Make it pass.
+               (("exit 1") "exit 0"))
              #t)))))
     (native-inputs
      `(("gcc:lib" ,gcc "lib")))