From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: ./configure --with-native-compilation on macos (11.5.2 Big Sur) Date: Sun, 5 Sep 2021 14:07:11 +0100 Message-ID: References: <4B9D846D-461B-4A97-8838-9F03D5BBC879@traduction-libre.org> <3DF825AA-2015-436F-A635-B5C4CBAA6BA0@traduction-libre.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Lq7gD711spxqtbir" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11851"; mail-complaints-to="usenet@ciao.gmane.io" To: Jean-Christophe Helary , Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 05 15:08:39 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mMrt1-0002sS-Gm for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Sep 2021 15:08:39 +0200 Original-Received: from localhost ([::1]:35400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMrsz-0007qI-JR for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Sep 2021 09:08:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMrrw-0007Ap-67 for emacs-devel@gnu.org; Sun, 05 Sep 2021 09:07:32 -0400 Original-Received: from outbound.soverin.net ([2a01:4f8:fff0:65::8:228]:42097) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMrrr-00064t-I3 for emacs-devel@gnu.org; Sun, 05 Sep 2021 09:07:31 -0400 Original-Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id BA8F14E; Sun, 5 Sep 2021 13:07:14 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1630847234; bh=qyFyLM722zeZ9IUI//QVozNegeJx1nhAWmvptGq98ok=; h=Date:From:To:Subject:References:In-Reply-To:From; b=nWXtqhbmiia6EeaLFLAD4sRHbfCSY65HxKhyQvH1HTWSlwvYars6MLUOJMHEpnNfY HcBASRa8BBaMu/J0YBrdbKUhnYJxG5gHbdTCcHLuHcNSJCblxvgWmd9DmBsrZCtK4k 9FNPDmL6QMnrLgICmkD+fjZD6NriZQYd7XyOvO5rW4YLL8s6ha4Qt9afqrAKXvcGDS V71KUzNQpkyDhR+CbS/XKOM2HHCgCZ795EwZrxVV+zsm3J5zQSrALag5P/jRnzL8ci KrvISif5hz8rFwQ8ynosegA3Ib7gbTefwgDY4nyepl07St6RfFs7vqNBjyLpbWWX7g jBuyU1XjQ23/A== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94.2) (envelope-from ) id 1mMrrb-001Byt-F1; Sun, 05 Sep 2021 14:07:11 +0100 Mail-Followup-To: Alan Third , Jean-Christophe Helary , Emacs Devel Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=2a01:4f8:fff0:65::8:228; envelope-from=alan@idiocy.org; helo=outbound.soverin.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:274014 Archived-At: --Lq7gD711spxqtbir Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 21, 2021 at 10:47:54AM +0100, Alan Third wrote: > On Sat, Aug 21, 2021 at 01:43:17PM +0900, Jean-Christophe Helary wrote: > >=20 > > Apologies. I guess I was under the influence of my second vaccine shot.= =2E. I forgot to use the --with-native-compilation when I reconfigured afte= r patching... > >=20 > > And the result, with the patch and the flag, is: > >=20 > > checking for gcc_jit_context_acquire in -lgccjit... no > > configure: error: ELisp native compiler was requested, but libgccjit wa= s not found. > > Please try installing libgccjit or a similar package. > >=20 > > :( >=20 > Can you send, I think, config.log? There should be an error message > somewhere from the compiler that may give us a better idea of where > it's going wrong. I see this in your config.log: configure:16825: checking for gcc_jit_context_acquire in -lgccjit configure:16848: gcc -o conftest -g3 -O2 -I/usr/local/Cellar/libffi/3.3_3/i= nclude -I/usr/local/Cellar/librsvg/2.50.7/include/librsvg-2.0 -I/usr/local/= Cellar/gdk-pixbuf/2.42.6/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/libpng/= 1.6.37/include/libpng16 -I/usr/local/Cellar/libtiff/4.3.0/include -I/usr/lo= cal/Cellar/glib/2.68.3/include -I/usr/local/Cellar/cairo/1.16.0_5/include/c= airo -I/usr/local/Cellar/glib/2.68.3/include -I/usr/local/Cellar/glib/2.68.= 3/include/glib-2.0 -I/usr/local/Cellar/glib/2.68.3/lib/glib-2.0/include -I/= usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.45/include -I/usr/= local/Cellar/pixman/0.40.0/include/pixman-1 -I/usr/local/Cellar/fontconfig/= 2.13.1/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cel= lar/libpng/1.6.37/include/libpng16 -I/usr/local/Cellar/libxcb/1.14_1/includ= e -I/usr/local/Cellar/libxrender/0.9.10/include -I/usr/local/Cellar/libxext= /1.3.4/include -I/usr/local/Cellar/libx11/1.7.2/include -I/usr/local/Cellar= /libxcb/1.14_1/include -I/usr/local/Cellar/libxau/1.0.9/include -I/usr/loca= l/Cellar/libxdmcp/1.1.3/include -I/usr/local/Cellar/xorgproto/2021.4/includ= e -I/usr/local/Cellar/libgccjit/11.2.0/include -I -I/usr/local/opt/readli= ne/include: -L/usr/local/opt/readline/lib: -L/usr/local/Cellar/libgccjit/11= =2E2.0/lib/gcc/11 -L conftest.c -lgccjit >&5 ld: warning: directory not found for option '-L/usr/local/opt/readline/lib:' ld: warning: -L path 'conftest.c' is not a directory ld: warning: dylib (/usr/local/Cellar/libgccjit/11.2.0/lib/gcc/11/libgccjit= =2Eso) was built for newer macOS version (11.5) than being linked (11.0) Undefined symbols for architecture x86_64: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocat= ion) It looks like there's a spare "-L" at end of the gcc flags... I have a suspicion here. You have both Homebrew and MacPorts installed. Configure is picking up that you have both of them and is trying to set up libgcc for both... Perhaps the attached patch will fix it. --=20 Alan Third --Lq7gD711spxqtbir Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Don-t-add-flags-when-MacPorts-is-installed-but-GCC-i.patch" >From 58940e1d4b53cc3e029b94e2a2e00a5d3f9ff9e1 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 5 Sep 2021 14:04:45 +0100 Subject: [PATCH] Don't add flags when MacPorts is installed but GCC isn't * configure.ac: Check whether there is any value in $PORT_PACKAGE before trying to use it. --- configure.ac | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 6d204b6103..fc4cf088ff 100644 --- a/configure.ac +++ b/configure.ac @@ -3840,12 +3840,14 @@ AC_DEFUN # instance). PORT_PACKAGE=$(port installed active | grep '^ *gcc@<:@0-9@:>@* ' | \ awk '{ print $1; }') - MACPORTS_LIBGCCJIT_INCLUDE=$(dirname $(port contents $PORT_PACKAGE | \ - grep libgccjit.h)) - MACPORTS_LIBGCCJIT_LIB=$(dirname $(port contents $PORT_PACKAGE | \ + if test -n $PORT_PACKAGE; then + MACPORTS_LIBGCCJIT_INCLUDE=$(dirname $(port contents $PORT_PACKAGE | \ + grep libgccjit.h)) + MACPORTS_LIBGCCJIT_LIB=$(dirname $(port contents $PORT_PACKAGE | \ grep libgccjit.dylib)) - CFLAGS="$CFLAGS -I${MACPORTS_LIBGCCJIT_INCLUDE}" - LDFLAGS="$LDFLAGS -L${MACPORTS_LIBGCCJIT_LIB}" + CFLAGS="$CFLAGS -I${MACPORTS_LIBGCCJIT_INCLUDE}" + LDFLAGS="$LDFLAGS -L${MACPORTS_LIBGCCJIT_LIB}" + fi fi # Check if libgccjit is available. -- 2.30.2 --Lq7gD711spxqtbir--