diff mbox series

[bug#49726,core-updates] gnu: perl: Use ‘search-input-file’ to find ‘bin/pwd’

Message ID 20210725015826.2095325-1-bauermann@kolabnow.com
State Accepted
Headers show
Series [bug#49726,core-updates] gnu: perl: Use ‘search-input-file’ to find ‘bin/pwd’ | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Thiago Jung Bauermann July 25, 2021, 1:58 a.m. UTC
A recent change makes the ‘perl’ package explicitly reference input
“coreutils” or “coreutils-minimal” by label in the ‘setup-configure’ phase
but the ‘perl-boot0’ package, which uses ‘%boot0-inputs’ as its input list,
doesn’t have such input on non-x86-linux systems. This causes the build of
‘perl-boot0’ to fail on those systems.

Therefore use ‘search-input-file’ to find ‘bin/pwd’ and avoid referencing
the input label.

* gnu/packages/perl.scm (perl)[arguments]<#:phases>: Use
‘search-input-file’ to find ‘bin/pwd’.
---

Hello,

I verified that this fixes the build failure on powerpc64le-linux reported
by the CI at https://ci.guix.gnu.org/build/691352/details .

I believe it also fixes similar build failures for armhf-linux¹ and
aarch64-linux², but I didn’t verify that yet.

I can only try non-x86 builds using emulation which is very slow, so it
will take a while to check armhf-linux and aarch64-linux but I’ll leave
the builds running, for completeness.

¹ https://ci.guix.gnu.org/build/691416/details
² https://ci.guix.gnu.org/build/691343/details

 gnu/packages/perl.scm | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

Comments

Efraim Flashner July 25, 2021, 9:24 a.m. UTC | #1
Thanks! Patch pushed.
Thiago Jung Bauermann July 25, 2021, 3:34 p.m. UTC | #2
Em domingo, 25 de julho de 2021, às 06:24:30 -03, Efraim Flashner escreveu:
> Thanks! Patch pushed.

Great! Thank you very much.
diff mbox series

Patch

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 040898b42394..99a152e0abf0 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -124,18 +124,16 @@ 
        (modify-phases %standard-phases
          (add-before 'configure 'setup-configure
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((coreutils (or (assoc-ref inputs "coreutils-minimal")
-                                  (assoc-ref inputs "coreutils"))))
-               ;; Use the right path for `pwd'.
-               (substitute* "dist/PathTools/Cwd.pm"
-                 (("'/bin/pwd'")
-                  (string-append "'" coreutils "/bin/pwd'")))
-
-               ;; Build in GNU89 mode to tolerate C++-style comment in libc's
-               ;; <bits/string3.h>.
-               (substitute* "cflags.SH"
-                 (("-std=c89")
-                  "-std=gnu89")))))
+             ;; Use the right path for `pwd'.
+             (substitute* "dist/PathTools/Cwd.pm"
+               (("'/bin/pwd'")
+                (string-append "'" (search-input-file inputs "bin/pwd") "'")))
+
+             ;; Build in GNU89 mode to tolerate C++-style comment in libc's
+             ;; <bits/string3.h>.
+             (substitute* "cflags.SH"
+               (("-std=c89")
+                "-std=gnu89"))))
          ,@(if (%current-target-system)
                `((add-after 'unpack 'unpack-cross
                    (lambda* (#:key native-inputs inputs #:allow-other-keys)