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: Wed, 8 Sep 2021 22:15:16 +0100 Message-ID: References: <3DF825AA-2015-436F-A635-B5C4CBAA6BA0@traduction-libre.org> <6266D349-AE54-452E-AFE4-AA9BA52BE291@traduction-libre.org> <9DC1AA65-7DCF-439D-8891-8787C28F03D6@traduction-libre.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ZEIN+yl9EIhRNMPg" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9387"; 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 Wed Sep 08 23:17:31 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 1mO4wk-0002CS-TT for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Sep 2021 23:17:31 +0200 Original-Received: from localhost ([::1]:33638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mO4wj-0005kj-Cg for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Sep 2021 17:17:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO4up-0004UB-Li for emacs-devel@gnu.org; Wed, 08 Sep 2021 17:15:31 -0400 Original-Received: from outbound.soverin.net ([116.202.126.228]:50171) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO4uh-0003ui-Q5 for emacs-devel@gnu.org; Wed, 08 Sep 2021 17:15:30 -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 018F9298; Wed, 8 Sep 2021 21:15:20 +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=1631135719; bh=QQxvfnFgr7buiPrIFvsEeovFmmgTHX1wIVRjXmX91Qs=; h=Date:From:To:Subject:References:In-Reply-To:From; b=byxe/7gUUDNNaEycRg3BSy1hDleSTAQVvGTfwqlEqcjI7HN5iY94lhGQaY7ogH7w2 68kqkrWhJqCTVsMtnPNYIQMdzARIPd+yxchRaCvFqvTEv1qTC9sgfpF9uWiumIrJmk DOXrfTSZ4ZoEdfGXQO4sMPcIBo0DcAJ1ahfuxwv0ybmhJRITk3oL7yOTFAGuNV/2pW p4NRmlxUM2kQw8uHaa/AMylHdRiHx6+k6nKq5eUaBOiQu6O6EgtlH5gu8lDyFSFsHZ rvP8RWnyUmCHc79/5xjkMhz6+aVtbbVaZ4NxgUvYNWtNDh973uwieHSu5lznRJA3T4 /jhobm/LvJ/Cw== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94.2) (envelope-from ) id 1mO4ua-001Rt0-NB; Wed, 08 Sep 2021 22:15:16 +0100 Mail-Followup-To: Alan Third , Jean-Christophe Helary , Emacs Devel Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=116.202.126.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:274394 Archived-At: --ZEIN+yl9EIhRNMPg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 08, 2021 at 09:59:15PM +0100, Alan Third wrote: > On Wed, Sep 08, 2021 at 04:31:35PM +0100, Alan Third wrote: > > On Mon, Sep 06, 2021 at 06:45:58PM +0900, Jean-Christophe Helary wrote: > > > >>> What is the result of > > > >>> > > > >>> port installed active | grep '^ *gcc@<:@0-9@:>@* ' | awk '{ print $1; }' > > > >> > > > >> the result is a blank line > > > > > > Totally removing macports allowed me to properly run ./configure --with-native-compilation > > > > I am currently "make"ing emacs. > > > > > > > > There are some apps that I need from macport so I'll reinstall it from scratch. > > > > > > Alan, > > > > > > I confirm that reinstalling llvm through macports makes the issue > > > appear again. So there is indeed a conflict between brew and > > > macports here. > > > > Can you please send the output from 'port installed active'? > > Actually, I took a second look at my change and may know why it wasn't > doing what I was expecting. Please try the attached. Actually, no, try *this* attachment. -- Alan Third --ZEIN+yl9EIhRNMPg Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v3-0001-Don-t-add-flags-when-MacPorts-is-installed-but-GC.patch" >From a3ffb9fe3d224692b1a17bef839581672c008f68 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 5 Sep 2021 14:04:45 +0100 Subject: [PATCH v3] 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 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 418a62fd5e..e451ba09f2 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. @@ -3870,7 +3872,8 @@ AC_DEFUN AC_DEFINE(HAVE_NATIVE_COMP, 1, [Define to 1 if native compiler is available.]) # Ensure libgccjit installed by MacPorts can be found. - if test -n "$HAVE_MACPORTS"; then + if test -n "${MACPORTS_LIBGCCJIT_INCLUDE}" && + test -n "${MACPORTS_LIBGCCJIT_LIB}"; then LIBGCCJIT_CFLAGS="$LIBGCCJIT_CFLAGS -I${MACPORTS_LIBGCCJIT_INCLUDE}" LIBGCCJIT_LIBS="-L${MACPORTS_LIBGCCJIT_LIB} $LIBGCCJIT_LIBS" fi -- 2.30.2 --ZEIN+yl9EIhRNMPg--