Subject: Re: bug#72838: [PATCH core-updates] gnu: ffmpeg: Fix build on i686 with binutils 2.41.

From: Ludovic Courtès <[email-masked]>
Date: Wed, 28 Aug 2024 23:15:00 +0200

Hello,

André Batista <[email-masked]> skribis:

> * gnu/packages/video.scm (ffmpeg): Add 'bypass-openal-check phase
> which breaks configure phase on i686. Unconditionally set openal
> configure check to true.

Applied with the change below to avoid a rebuild on other systems.

Thanks!

Ludo’.

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index e2720628bb..ac89562a55 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1835,15 +1835,18 @@ (define-public ffmpeg
          "--disable-mipsfpu")
       #:phases
       #~(modify-phases %standard-phases
-          (add-before 'configure 'bypass-openal-check
-            ;; configure fails linking to openal when using binutils >= 2.38
-            ;; due to openal's usage of protected visibility for its dynamic
-            ;; symbols. Bypass this configure time check for now. See:
-            ;; https://lists.gnu.org/archive/html/guix-devel/2024-08/msg00159.html
-            (lambda _
-              (substitute* "configure"
-                (("alGetError \\|\\|")
-                 "alGetError \|\| true \|\|"))))
+          #$@(if (target-x86-32?)
+                 #~((add-before 'configure 'bypass-openal-check
+                      ;; configure fails linking to openal when using binutils
+                      ;; >= 2.38 due to openal's usage of protected visibility
+                      ;; for its dynamic symbols. Bypass this configure time
+                      ;; check for now. See:
+                      ;; https://lists.gnu.org/archive/html/guix-devel/2024-08/msg00159.html
+                      (lambda _
+                        (substitute* "configure"
+                          (("alGetError \\|\\|")
+                           "alGetError \|\| true \|\|")))))
+                 #~())
           (replace 'configure
             ;; configure does not work followed by "SHELL=..." and
             ;; "CONFIG_SHELL=..."; set environment variables instead