From d15dbdb79c617b8b710ef5a9502be0d5f640aaaf Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 17 Mar 2023 18:23:58 +0100 Subject: pack: "fakechroot" engine passes the recursive RUNPATH to ld.so. This is a followup to 58abd5873985e0cd9a2926867bf697c5e7bc01f9, which did not fully address . * guix/scripts/pack.scm (wrapped-package)[build](runpath): Rewrite in terms of 'file-needed/recursive'. --- guix/scripts/pack.scm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 25ac9d29d0..0dc9979194 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -1201,12 +1201,10 @@ last resort for relocation." (utf8->string bv))))) (define (runpath file) - ;; Return the RUNPATH of FILE as a list of directories. - (let* ((bv (call-with-input-file file get-bytevector-all)) - (elf (parse-elf bv)) - (dyninfo (elf-dynamic-info elf))) - (or (and=> dyninfo elf-dynamic-info-runpath) - '()))) + ;; Return the "recursive" RUNPATH of FILE as a list of + ;; directories. + (delete-duplicates + (map dirname (file-needed/recursive file)))) (define (elf-loader-compile-flags program) ;; Return the cpp flags defining macros for the ld.so/fakechroot -- cgit v1.2.3