From: Eugene Ha <eha@posteo.de>
To: 55173@debbugs.gnu.org
Subject: bug#55173: Configure --with-native-compilation does not find libgccjit.dylib when installed with Homebrew (macOS)
Date: Thu, 28 Apr 2022 19:42:28 +0000 [thread overview]
Message-ID: <D64CABC9-2CC2-4A74-8729-F0CF7C14447D@posteo.de> (raw)
Dear Emacs maintainers,
Emacs 29.0.50 (a41a181db5f3aca043ed42b228dc56a6403c21a5) fails to build on macOS 12.3.1 when configured with the following invocation:
./configure --with-native-compilation
...
usage: dirname string [...]
checking for gcc_jit_context_acquire in -lgccjit... no
configure: error: ELisp native compiler was requested, but libgccjit was not found.
Please try installing libgccjit or a similar package.
If you are sure you want Emacs be compiled without ELisp native compiler,
pass the --without-native-compilation option to configure.
make: *** [config.status] Error 1
The relevant lines in config.log are the following:
configure:19396: checking for gcc_jit_context_acquire in -lgccjit
configure:19419: gcc -o conftest -g3 -O2 -isystem [...TRUNCATED...]
-I/usr/local/Cellar/libgccjit/11.3.0/include conftest.c -lgccjit -lsqlite3 -L >&5
clang: error: argument to '-L' is missing (expected 1 value)
The clang error refers to the dangling "-L ", which should in fact reference the path of libgccjit.so or libgccjit.dylib, depending on what's installed. configure.ac, on the contrary, only checks for libgccjit.so, whereas Homebrew's (3.4.9-17-g80e5327) libgccjit 11.3.0 (bottled) installs libgccjit.dylib.
The following patch enables configure to find the Homebrew-installed libgccjit:
diff --git a/configure.ac b/configure.ac
index 7c8638a471..53e5779e2f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4126,7 +4126,7 @@ AC_DEFUN
MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \
grep libgccjit.h))"
MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit| \
- grep libgccjit.so\$))"
+ grep -E 'libgccjit\.(so|dylib)$'))"
fi
fi
Thanks,
Eugene Ha
next reply other threads:[~2022-04-28 19:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-28 19:42 Eugene Ha [this message]
2022-04-28 21:48 ` bug#55173: Configure --with-native-compilation does not find libgccjit.dylib when installed with Homebrew (macOS) Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D64CABC9-2CC2-4A74-8729-F0CF7C14447D@posteo.de \
--to=eha@posteo.de \
--cc=55173@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).