GNU bug report logs - #57015
29.0.50; macOS: libgccjit was not found: Homebrew libgccjit 12.1.0

Previous Next

Package: emacs;

Reported by: Naofumi Yasufuku <naofumi <at> yasufuku.dev>

Date: Sat, 6 Aug 2022 11:40:01 UTC

Severity: normal

Tags: patch

Merged with 57023, 57028, 57029

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57015 <at> debbugs.gnu.org
Subject: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew libgccjit 12.1.0
Date: Sun, 07 Aug 2022 01:36:39 +0900
[Message part 1 (text/plain, inline)]
Naofumi Yasufuku <naofumi <at> yasufuku.dev> writes:
[,,snip..]
> +          MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit | \
> +                                  grep -E 'current/libgccjit\.(so|dylib)$' | \
> +                                  head -1))"
> +          if test "${MAC_LIBS}" = "-L"; then
> +            # Try for Homebrew libgccjit < 12.1.0.
> +            MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit | \
> +                                    grep -E 'libgccjit\.(so|dylib)$' | \
> +                                    head -1))"

"x" is added for "${MAC_LIBS}" test, just in case.  Revised patch is
attached.  I also attach emacs-28 config.log's against both
homebrew libgccjit-12.1.0 and libgccjit-11.3.0.

[0001-Fix-libgccjit-library-path-lookup-for-Homebrew-libgc.patch (text/x-patch, inline)]
From cf149557e6d3722671d3acb90d2e9776b833eb5d Mon Sep 17 00:00:00 2001
From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Date: Sat, 6 Aug 2022 22:10:36 +0900
Subject: [PATCH] Fix libgccjit library path lookup for Homebrew libgccjit
 12.1.0 and above

* configure.ac: Choose the first match from multiple libgccjit.dylib
paths in 'brew ls -v libgccjit' output.  Prefer 'current/libgccjit.dylib'
over '${ver}/libgccjit.dylib'  (Bug#57015)
---
 configure.ac | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 57b86e8542..4636426443 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3843,8 +3843,15 @@ AC_DEFUN
         if test -n "`$BREW --prefix --installed libgccjit 2>/dev/null`"; then
           MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \
                                                 grep libgccjit.h))"
-          MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit| \
-                                            grep -E 'libgccjit\.(so|dylib)$'))"
+          MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit | \
+                                  grep -E 'current/libgccjit\.(so|dylib)$' | \
+                                  head -1))"
+          if test "x${MAC_LIBS}" = "x-L"; then
+            # Try for Homebrew libgccjit < 12.1.0.
+            MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit | \
+                                    grep -E 'libgccjit\.(so|dylib)$' | \
+                                    head -1))"
+          fi
         fi
       fi
 
-- 
2.37.1

[Message part 3 (text/plain, inline)]
Regards,
  Naofumi

[emacs-28_brew-libgccjit-12-config.log (text/plain, attachment)]
[emacs-28_brew-libgccjit-11-config.log (text/plain, attachment)]

This bug report was last modified 2 years and 257 days ago.

Previous Next


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