From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Naofumi Yasufuku Newsgroups: gmane.emacs.bugs Subject: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew libgccjit 12.1.0 Date: Sun, 07 Aug 2022 03:30:08 +0900 Message-ID: References: <834jypzi1b.fsf@gnu.org> <83sfm9xqwn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21680"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57015@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 06 20:31:18 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 1oKOZy-0005UW-D2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Aug 2022 20:31:18 +0200 Original-Received: from localhost ([::1]:51564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oKOZv-0004kg-DR for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Aug 2022 14:31:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKOZi-0004kG-Lz for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2022 14:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45672) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oKOZi-0001FF-De for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2022 14:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oKOZi-0001rK-75 for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2022 14:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Naofumi Yasufuku Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Aug 2022 18:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57015 X-GNU-PR-Package: emacs Original-Received: via spool by 57015-submit@debbugs.gnu.org id=B57015.16598106297099 (code B ref 57015); Sat, 06 Aug 2022 18:31:02 +0000 Original-Received: (at 57015) by debbugs.gnu.org; 6 Aug 2022 18:30:29 +0000 Original-Received: from localhost ([127.0.0.1]:35421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKOZA-0001qQ-Ek for submit@debbugs.gnu.org; Sat, 06 Aug 2022 14:30:28 -0400 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:48985) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKOZ5-0001px-1L for 57015@debbugs.gnu.org; Sat, 06 Aug 2022 14:30:26 -0400 Original-Received: (Authenticated sender: naofumi@yasufuku.dev) by mail.gandi.net (Postfix) with ESMTPSA id 7BCDA1C0008; Sat, 6 Aug 2022 18:30:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yasufuku.dev; s=gm1; t=1659810617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eyjvf9TTaiZXCkE2GjtxS2pcpHPjK0x1inqhqMfjSk8=; b=Drwm3ebwkX4kBjixVxkJBf8PCohryvWKoFJ2OkqPcQGN4rvJlsQRArCrYh4i3yHGcpBp7k ssfzY6iEuqdymTZnw2ykCnN7/XuSH7ZI2taLps8ejXaAoRwmI2QFFTT8JNgHfeYt7Q8Bkw jI4XaoO7lb9ZByi+x6M/DluTzFwmteF1N9wgN4s70TKuBvJmoY8P49FPD3OItTAl8ExORx P9sXy1KcfHbTWX8qjFLLjqdJG1wz3JoC00/TpPTx8WEI9JFj8PegxZezO7fM9zHpCp+V9l 8xuFoPdjnFt7iKLIugH0/om4lNI8QpeUiP+t2zs9E1vhr/4K7/KfoBHAs7a4jg== In-Reply-To: <83sfm9xqwn.fsf@gnu.org> 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:238997 Archived-At: Eli Zaretskii writes: >> From: Naofumi Yasufuku >> Cc: 57015@debbugs.gnu.org >> Date: Sun, 07 Aug 2022 01:36:39 +0900 >> >> --- a/configure.ac >> +++ b/configure.ac >> @@ -3843,8 +3843,15 @@ AC_DEFUN >> if test -n "`$BREW --prefix --installed libgccjit 2>/dev/null`"; then >> MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \ >> grep libgccjit.h))" >> - MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit| \ >> - grep -E 'libgccjit\.(so|dylib)$'))" >> + MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit | \ >> + grep -E 'current/libgccjit\.(so|dylib)$' | \ >> + head -1))" >> + if test "x${MAC_LIBS}" = "x-L"; then >> + # Try for Homebrew libgccjit < 12.1.0. >> + MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit | \ >> + grep -E 'libgccjit\.(so|dylib)$' | \ >> + head -1))" >> + fi >> fi >> fi >> > > Is 'dirname' guaranteed to be available? I suppose so, but at least Homebrew's 'brew' shell script also uses 'dirname': --8<---------------cut here---------------start------------->8--- sh-3.2$ type dirname dirname is /usr/bin/dirname sh-3.2$ sh-3.2$ type brew brew is /usr/local/bin/brew sh-3.2$ sh-3.2$ ls -l /usr/local/bin/brew lrwxr-xr-x 1 naofumi admin 28 Jan 20 2017 /usr/local/bin/brew -> /usr/local/Homebrew/bin/brew sh-3.2$ sh-3.2$ file /usr/local/Homebrew/bin/brew /usr/local/Homebrew/bin/brew: Bourne-Again shell script text executable, ASCII text sh-3.2$ sh-3.2$ grep -n dirname /usr/local/Homebrew/bin/brew 26: local target target_dirname 28: target_dirname="$(dirname "${target}")" 30: quiet_cd "${directory}" && quiet_cd "${target_dirname}" && pwd -P sh-3.2$ sh-3.2$ less /usr/local/Homebrew/bin/brew .. symlink_target_directory() { local target target_dirname target="$(readlink "$1")" target_dirname="$(dirname "${target}")" local directory="$2" quiet_cd "${directory}" && quiet_cd "${target_dirname}" && pwd -P } .. --8<---------------cut here---------------end--------------->8--- https://github.com/Homebrew/brew/blob/3.5.8/bin/brew#L25 Regards, Naofumi