From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eugene Ha Newsgroups: gmane.emacs.bugs 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 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3280"; mail-complaints-to="usenet@ciao.gmane.io" To: 55173@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 28 22:24:10 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 1nkAgM-0000ZQ-Im for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Apr 2022 22:24:10 +0200 Original-Received: from localhost ([::1]:55704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkAgL-0007Yc-7D for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Apr 2022 16:24:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkAgE-0007YS-Pr for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2022 16:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56178) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkAgE-0006Wf-Gc for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2022 16:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nkAgE-0006GF-5k for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2022 16:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eugene Ha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Apr 2022 20:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55173 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165117744024056 (code B ref -1); Thu, 28 Apr 2022 20:24:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Apr 2022 20:24:00 +0000 Original-Received: from localhost ([127.0.0.1]:50075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkAgB-0006Fv-Cx for submit@debbugs.gnu.org; Thu, 28 Apr 2022 16:24:00 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:42088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkA2A-0005Dx-PP for submit@debbugs.gnu.org; Thu, 28 Apr 2022 15:42:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkA2A-0003dB-Iw for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2022 15:42:38 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:53769) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkA26-0000QO-IK for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2022 15:42:38 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4FFB1240028 for ; Thu, 28 Apr 2022 21:42:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1651174950; bh=GeqcJ34k5C6MBY0K2OZbCV8U8yH8S+5RFchExauMQlA=; h=From:Subject:Date:To:From; b=U7RRHmLFNrhorWKIEO4q9AIo4z85eU/Aha7ik1u2oX640NqeS/lwvxx9E9nRVywFD wtAoABlfafMFg/lO/Z223xMp60pDd+bCfI+AT+ZSMn+1SrKduQHM2WuWmAA8ifjizk jBk2GvxN7JTKvf+n4RIZaIl2R9C0yCLqGMkyFweJFgBdRovo87bDPyYt7GLPwzwavp 19MlRBpJ/DOv6j3fZ9VgH+F7RND6kT+2jY/m1+OcD/XnYjrFqS14QJUZ6weq7jAtfY k8swBspA1+zNnhjGLtlvtxsNgRJUjOi8Z7ia+WaKm00PA9qkXayc9pVGcW7GoN7YEM 474anSdEf+iSg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Kq5cP644Bz9rxG for ; Thu, 28 Apr 2022 21:42:29 +0200 (CEST) Received-SPF: pass client-ip=185.67.36.65; envelope-from=eha@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 28 Apr 2022 16:23:58 -0400 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:230910 Archived-At: 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=3D"-I$(dirname $($BREW ls -v libgccjit | \ grep libgccjit.h))" MAC_LIBS=3D"-L$(dirname $($BREW ls -v libgccjit| \ - grep libgccjit.so\$))" + grep -E = 'libgccjit\.(so|dylib)$'))" fi fi Thanks, Eugene Ha=