From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57028: 29.0.50; Build error with configure when brew installed 12.1 libgccjit on macos Date: Sun, 07 Aug 2022 09:29:04 +0300 Message-ID: <83les0y3bj.fsf@gnu.org> References: <8D1D4879-6FBF-4787-8227-D78BB662348C@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5418"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57028@debbugs.gnu.org To: Mark Barton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 07 08:32:45 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oKZq8-0001Fj-WF for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Aug 2022 08:32:45 +0200 Original-Received: from localhost ([::1]:37410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oKZq7-0005CC-IN for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Aug 2022 02:32:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKZnc-0004Sy-KB for bug-gnu-emacs@gnu.org; Sun, 07 Aug 2022 02:30:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46164) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oKZnX-0006ki-Cf for bug-gnu-emacs@gnu.org; Sun, 07 Aug 2022 02:30:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oKZnX-0005b1-3X for bug-gnu-emacs@gnu.org; Sun, 07 Aug 2022 02:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Aug 2022 06:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57028 X-GNU-PR-Package: emacs Original-Received: via spool by 57028-submit@debbugs.gnu.org id=B57028.165985377421444 (code B ref 57028); Sun, 07 Aug 2022 06:30:03 +0000 Original-Received: (at 57028) by debbugs.gnu.org; 7 Aug 2022 06:29:34 +0000 Original-Received: from localhost ([127.0.0.1]:35911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKZn3-0005Zm-Bp for submit@debbugs.gnu.org; Sun, 07 Aug 2022 02:29:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKZmw-0005ZP-In; Sun, 07 Aug 2022 02:29:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50076) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKZmr-0006bn-A1; Sun, 07 Aug 2022 02:29:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9Sp9fCSW60KMixLsL8pcvJbbXd+j1/MgVzAysrpRArs=; b=SZIZ0b1tUkOG mqw6YXRagBvs0zHSqNlrGXI9DDr4oZwgJJfnEZZL1eQQPyZ6K8jV5+Y1gjoXt6kaMteNVd97v+aTF yNBuvfBF50eUtazTP6ewlK618VBD945IXQq2fgxYPcgddLmpyvJZAr/Ctu7knO9UFSIwmd+eSdwCV falXLiYy5l4/jP+cwXNGdg6QFvnd5yUkQHUDmQwp+BJbLM2G6ATZVSvbxafVKO8xfjfFOu34zlNCm 1WeMBY2BUgJCpiAmw0bXsTP/D4aVlpAfQWfFA/7tV0fPlnJ0aIbOTdrDSAoshfuojEk3MYPc2U9TJ v01Wk0m9x2K1/O70HTdB1A==; Original-Received: from [87.69.77.57] (port=4464 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKZmq-0002c0-NI; Sun, 07 Aug 2022 02:29:21 -0400 In-Reply-To: <8D1D4879-6FBF-4787-8227-D78BB662348C@gmail.com> (message from Mark Barton on Sat, 6 Aug 2022 22:22:55 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:239032 Archived-At: merge 57028 57015 thanks > From: Mark Barton > Date: Sat, 6 Aug 2022 22:22:55 -0700 > > Documenting my resolution to a build error caused when the brew update process upgraded me from libgccjit 11.3 to 12.1. > > Error message from configure > ============================ > > ,---- > | 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 > `---- > > > config.log section showing linker can't map file > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ,---- > | configure:19555: checking for gcc_jit_context_acquire in -lgccjit > | configure:19578: gcc -o conftest -g3 -O2 -isystem /usr/local/Cellar/libffi/3.4.2/include -isystem /usr/local/Cellar/librsvg/2.54.4/include/librsvg-2.0 -isystem /usr/local/Cellar/gdk-pixbuf/2.42.8_1/include/gdk-pixbuf-2.0 -isystem /usr/local/Cellar/jpeg/9e/include -isystem /usr/local/Cellar/libtiff/4.4.0_1/include -isystem /usr/local/Cellar/glib/2.72.3/include -isystem /usr/local/Cellar/cairo/1.16.0_5/include/cairo -isystem /usr/local/Cellar/glib/2.72.3/include -isystem /usr/local/Cellar/glib/2.72.3/include/glib-2.0 -isystem /usr/local/Cellar/glib/2.72.3/lib/glib-2.0/include -isystem /usr/local/opt/gettext/include -isystem /usr/local/Cellar/pcre/8.45/include -isystem /usr/local/Cellar/pixman/0.40.0/include/pixman-1 -isystem /usr/local/Cellar/fontconfig/2.14.0/include -isystem /usr/loc al/opt/freetype/include/freetype2 -isystem /usr/local/Cellar/libpng/1.6.37/include/libpng16 -isystem /usr/local/Cellar/libxcb/1.15/include -isystem /usr/local/Cellar/libxrender/0.9.10/include -isystem /usr/local/Cellar/libxext/1.3.4/include -isystem /usr/local/Cellar/libx11/1.8.1/include -isystem /usr/local/Cellar/libxcb/1.15/include -isystem /usr/local/Cellar/libxau/1.0.9/include -isystem /usr/local/Cellar/libxdmcp/1.1.3/include -isystem /usr/local/Cellar/xorgproto/2022.1/include -isystem /usr/local/Cellar/webp/1.2.3_1/include -I/usr/local/Cellar/libgccjit/12.1.0/include conftest.c -lgccjit -lsqlite3 -L/usr/local/Cellar/libgccjit/12.1.0/lib/gcc/current > | /usr/local/Cellar/libgccjit/12.1.0/lib/gcc/12 >&5 > | ld: warning: dylib (/usr/local/Cellar/libgccjit/12.1.0/lib/gcc/current/libgccjit.dylib) was built for newer macOS version (12.4) than being linked (12.0) > | ld: can't map file, errno=22 file '/usr/local/Cellar/libgccjit/12.1.0/lib/gcc/12' for architecture x86_64 > | clang: error: linker command failed with exit code 1 (use -v to see invocation) > | configure:19578: $? = 1 > `---- > > > configure.ac test for brew installed libgccjit > ============================================== > > In the example below the test in configure.ac returns two lines and > this appears to be the cause of the linker can't map file error. > ,---- > | (python_training) bartm002@C02FM1E2MD6T ~ % brew ls -v libgccjit | grep -E 'libgccjit\.(so|dylib)$' > | /usr/local/Cellar/libgccjit/12.1.0/lib/gcc/current/libgccjit.dylib > | /usr/local/Cellar/libgccjit/12.1.0/lib/gcc/12/libgccjit.dylib > `---- > > Here is the listing to show that both paths are really the same with > symbolic links. > ,---- > | /usr/local/Cellar/libgccjit/12.1.0/lib/gcc: > | drwxr-xr-x 4 bartm002 admin 128 May 6 00:53 . > | drwxr-xr-x 3 bartm002 admin 96 May 6 00:53 .. > | drwxr-xr-x 4 bartm002 admin 128 May 6 00:53 12 > | lrwxr-xr-x 1 bartm002 admin 28 May 6 00:53 libgccjit.0.dylib -> ../current/libgccjit.0.dylib > | lrwxr-xr-x 1 bartm002 admin 26 May 6 00:53 libgccjit.dylib -> ../current/libgccjit.dylib > | drwxr-xr-x 4 bartm002 admin 128 May 6 00:53 current > | -rw-r--r-- 1 bartm002 admin 41M Aug 6 18:47 libgccjit.0.dylib > | lrwxr-xr-x 1 bartm002 admin 17 May 6 00:53 libgccjit.dylib -> libgccjit.0.dylib > `---- > > Here I modify the test to return only the first line and the build > succeeds after this change. > ,---- > | (python_training) bartm002@C02FM1E2MD6T ~ % brew ls -v libgccjit | grep -E 'libgccjit\.(so|dylib)$' | head -n 1 > | /usr/local/Cellar/libgccjit/12.1.0/lib/gcc/current/libgccjit.dylib > `---- > > ,---- > | diff --git a/configure.ac b/configure.ac > | index 1a264275bd..2d88d0ac15 100644 > | --- a/configure.ac > | +++ b/configure.ac > | @@ -4241,7 +4241,8 @@ AC_DEFUN > | MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \ > | grep libgccjit.h))" > | MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit| \ > | - grep -E 'libgccjit\.(so|dylib)$'))" > | + grep -E 'libgccjit\.(so|dylib)$'| \ > | + head -n 1))" > | fi > | fi > | > `---- This is the same issue as in bug#57015; I've now merged these two bug reports. Other than that, I confess to be utterly confused by the actual issue that's the root cause of this, and I have no idea which of the possible suggested solutions we should use, both on master and on the release branch. Updated proposals tend to be posted at high frequency, which doesn't contribute to my sense of reliability of the solutions. I hope some macOS expert could chime in and clarify the issues enough for us to make the decisions.