GNU bug report logs - #57015
29.0.50; macOS: libgccjit was not found: Homebrew libgccjit 12.1.0

Previous Next

Package: emacs;

Reported by: Naofumi Yasufuku <naofumi <at> yasufuku.dev>

Date: Sat, 6 Aug 2022 11:40:01 UTC

Severity: normal

Tags: patch

Merged with 57023, 57028, 57029

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57015 in the body.
You can then email your comments to 57015 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sat, 06 Aug 2022 11:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Naofumi Yasufuku <naofumi <at> yasufuku.dev>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 06 Aug 2022 11:40:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; macOS: libgccjit was not found: Homebrew libgccjit 12.1.0
Date: Sat, 06 Aug 2022 20:38:58 +0900
[Message part 1 (text/plain, inline)]
Hello Emacs,

'./configure --with-native-compilation' fails if Homebrew libgccjit is
updated to 12.1.0.  Attached configure.ac patch fixes this issue.
I think the same patch should be applied to emacs-28 branch.


--8<---------------cut here---------------start------------->8---
$ ./autogen.sh
$ ./configure --with-native-compilation
checking for xcrun... xcrun
checking for make... yes
checking for GNU Make... make
checking build system type... x86_64-apple-darwin21.6.0
checking host system type... x86_64-apple-darwin21.6.0
..
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.
$
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
$ less config.log
..
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 -isys
tem /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/l
ocal/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/pixma
n-1 -isystem /usr/local/Cellar/fontconfig/2.14.0/include -isystem /usr/local/opt
/freetype/include/freetype2 -isystem /usr/local/Cellar/libpng/1.6.37/include/lib
png16 -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 -isys
tem /usr/local/Cellar/libx11/1.8.1/include -isystem /usr/local/Cellar/libxcb/1.1
5/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
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
$ brew info libgccjit
libgccjit: stable 12.1.0 (bottled), HEAD
JIT library for the GNU compiler collection
https://gcc.gnu.org/
/usr/local/Cellar/libgccjit/12.1.0 (15 files, 42.5MB) *
  Poured from bottle on 2022-08-06 at 18:06:12
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/libgccjit.rb
License: GPL-3.0-or-later with GCC-exception-3.1
==> Dependencies
Required: gmp ✔, isl ✔, libmpc ✔, mpfr ✔, zstd ✔
==> Options
--HEAD
        Install HEAD version
==> Analytics
install: 3,047 (30 days), 5,426 (90 days), 15,165 (365 days)
install-on-request: 1,452 (30 days), 2,429 (90 days), 7,580 (365 days)
build-error: 32 (30 days)
$
$ brew ls -v libgccjit | grep libgccjit.h
/usr/local/Cellar/libgccjit/12.1.0/include/libgccjit.h
$
$ 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
$
$ ls -lR /usr/local/Cellar/libgccjit/12.1.0/lib/gcc
total 0
drwxr-xr-x  4 naofumi  admin  128 May  6 16:53 12
drwxr-xr-x  4 naofumi  admin  128 May  6 16:53 current

/usr/local/Cellar/libgccjit/12.1.0/lib/gcc/12:
total 0
lrwxr-xr-x  1 naofumi  admin  28 May  6 16:53 libgccjit.0.dylib -> ../current/libgccjit.0.dylib
lrwxr-xr-x  1 naofumi  admin  26 May  6 16:53 libgccjit.dylib -> ../current/libgccjit.dylib

/usr/local/Cellar/libgccjit/12.1.0/lib/gcc/current:
total 82304
-rw-r--r--  1 naofumi  admin  42138352 Aug  6 18:06 libgccjit.0.dylib
lrwxr-xr-x  1 naofumi  admin        17 May  6 16:53 libgccjit.dylib -> libgccjit.0.dylib
$
--8<---------------cut here---------------end--------------->8---


Regards,
  Naofumi

[0001-Find-real-libgccjit-path-from-Homebrew-installation-.patch (text/x-patch, inline)]
From bbdc35e256c7fe1de218c2d5a0f284aec330d32f Mon Sep 17 00:00:00 2001
From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Date: Sat, 6 Aug 2022 19:26:54 +0900
Subject: [PATCH] Find real libgccjit path from Homebrew installation file list
 on macOS

* configure.ac: Find canonicalized libgccjit dylib path from the first
match in 'brew ls -v libgccjit' output.
---
 configure.ac | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1a264275bd..77847251c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4240,8 +4240,10 @@ 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 $(readlink -f \
+                                $($BREW ls -v libgccjit | \
+                                grep -E 'libgccjit\.(so|dylib)$' | \
+                                head -1)))"
         fi
       fi
 
-- 
2.37.1

[NG_config.log (text/plain, attachment)]
[OK_config.log (text/plain, attachment)]
[Message part 5 (text/plain, inline)]

In GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.5 (Build 21G72))
 of 2022-08-06 built on hyperion.local
Repository revision: 28c01bd4841be69d01b6db661917f1be9830cc3d
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2113
System Description:  macOS 12.5

Configured using:
 'configure --prefix=/Users/naofumi/.local/emacs/head --with-ns
 --disable-ns-self-contained --with-mailutils --with-native-compilation
 --with-xwidgets'

Configured features:
ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS WEBP XIM XWIDGETS ZLIB

Important settings:
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_TIME: C
  value of $LANG: ja_JP.UTF-8
  locale-coding-system: utf-8-hfs

Major mode: Lisp Interaction

Minor modes in effect:
  magit-auto-revert-mode: t
  editorconfig-mode: t
  delete-selection-mode: t
  global-so-long-mode: t
  global-auto-revert-mode: t
  recentf-mode: t
  global-whitespace-mode: t
  winner-mode: t
  global-git-commit-mode: t
  global-git-gutter-mode: t
  projectile-mode: t
  pyvenv-tracking-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  marginalia-mode: t
  vertico-mode: t
  savehist-mode: t
  corfu-history-mode: t
  corfu-indexed-mode: t
  corfu-terminal-mode: t
  windmove-mode: t
  disable-mouse-global-mode: t
  which-key-mode: t
  doom-modeline-mode: t
  shell-dirtrack-mode: t
  global-corfu-mode: t
  corfu-mode: t
  key-chord-mode: t
  override-global-mode: t
  straight-use-package-mode: t
  straight-package-neutering-mode: t
  straight-live-modifications-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-history-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/Users/naofumi/.emacs.d/straight/build-29/cmake-mode/cmake-mode hides /usr/local/share/emacs/site-lisp/cmake/cmake-mode
/Users/naofumi/.emacs.d/straight/build-29/ninja-mode/ninja-mode hides /usr/local/share/emacs/site-lisp/ninja/ninja-mode
/Users/naofumi/.emacs.d/straight/build-29/password-store/password-store hides /usr/local/share/emacs/site-lisp/pass/password-store
/Users/naofumi/.emacs.d/straight/build-29/jsonrpc/jsonrpc hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/jsonrpc
/Users/naofumi/.emacs.d/straight/build-29/transient/transient hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/transient
/Users/naofumi/.emacs.d/straight/build-29/org/ob-exp hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-exp
/Users/naofumi/.emacs.d/straight/build-29/org/ob-emacs-lisp hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-emacs-lisp
/Users/naofumi/.emacs.d/straight/build-29/org/oc hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/oc
/Users/naofumi/.emacs.d/straight/build-29/org/ob-css hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-css
/Users/naofumi/.emacs.d/straight/build-29/org/ob-lob hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-lob
/Users/naofumi/.emacs.d/straight/build-29/org/ol-irc hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ol-irc
/Users/naofumi/.emacs.d/straight/build-29/org/ob-forth hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-forth
/Users/naofumi/.emacs.d/straight/build-29/org/org-macs hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-macs
/Users/naofumi/.emacs.d/straight/build-29/org/ob hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob
/Users/naofumi/.emacs.d/straight/build-29/org/org-version hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-version
/Users/naofumi/.emacs.d/straight/build-29/org/ob-scheme hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-scheme
/Users/naofumi/.emacs.d/straight/build-29/org/ox hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ox
/Users/naofumi/.emacs.d/straight/build-29/org/ob-C hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-C
/Users/naofumi/.emacs.d/straight/build-29/org/org-capture hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-capture
/Users/naofumi/.emacs.d/straight/build-29/org/ob-ref hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-ref
/Users/naofumi/.emacs.d/straight/build-29/org/ob-clojure hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-clojure
/Users/naofumi/.emacs.d/straight/build-29/org/org-mouse hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-mouse
/Users/naofumi/.emacs.d/straight/build-29/org/org-ctags hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-ctags
/Users/naofumi/.emacs.d/straight/build-29/org/org-entities hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-entities
/Users/naofumi/.emacs.d/straight/build-29/org/org-archive hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-archive
/Users/naofumi/.emacs.d/straight/build-29/org/ob-screen hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-screen
/Users/naofumi/.emacs.d/straight/build-29/org/ol-bibtex hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ol-bibtex
/Users/naofumi/.emacs.d/straight/build-29/org/ob-haskell hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-haskell
/Users/naofumi/.emacs.d/straight/build-29/org/org-loaddefs hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-loaddefs
/Users/naofumi/.emacs.d/straight/build-29/org/org-table hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-table
/Users/naofumi/.emacs.d/straight/build-29/org/ol-eww hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ol-eww
/Users/naofumi/.emacs.d/straight/build-29/org/ol-man hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ol-man
/Users/naofumi/.emacs.d/straight/build-29/org/ox-org hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ox-org
/Users/naofumi/.emacs.d/straight/build-29/org/org-num hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-num
/Users/naofumi/.emacs.d/straight/build-29/org/org-plot hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-plot
/Users/naofumi/.emacs.d/straight/build-29/org/ol-rmail hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ol-rmail
/Users/naofumi/.emacs.d/straight/build-29/org/ob-awk hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-awk
/Users/naofumi/.emacs.d/straight/build-29/org/ob-groovy hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-groovy
/Users/naofumi/.emacs.d/straight/build-29/org/ob-octave hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-octave
/Users/naofumi/.emacs.d/straight/build-29/org/org-faces hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-faces
/Users/naofumi/.emacs.d/straight/build-29/org/oc-biblatex hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/oc-biblatex
/Users/naofumi/.emacs.d/straight/build-29/org/org-colview hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-colview
/Users/naofumi/.emacs.d/straight/build-29/org/ob-R hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-R
/Users/naofumi/.emacs.d/straight/build-29/org/org-refile hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-refile
/Users/naofumi/.emacs.d/straight/build-29/org/org-timer hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-timer
/Users/naofumi/.emacs.d/straight/build-29/org/org-mobile hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-mobile
/Users/naofumi/.emacs.d/straight/build-29/org/ob-fortran hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-fortran
/Users/naofumi/.emacs.d/straight/build-29/org/ob-shell hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-shell
/Users/naofumi/.emacs.d/straight/build-29/org/ob-perl hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-perl
/Users/naofumi/.emacs.d/straight/build-29/org/ob-sqlite hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-sqlite
/Users/naofumi/.emacs.d/straight/build-29/org/oc-basic hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/oc-basic
/Users/naofumi/.emacs.d/straight/build-29/org/ob-sed hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-sed
/Users/naofumi/.emacs.d/straight/build-29/org/org-list hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-list
/Users/naofumi/.emacs.d/straight/build-29/org/ob-ruby hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-ruby
/Users/naofumi/.emacs.d/straight/build-29/org/ob-eval hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-eval
/Users/naofumi/.emacs.d/straight/build-29/org/org-habit hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-habit
/Users/naofumi/.emacs.d/straight/build-29/org/org-clock hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-clock
/Users/naofumi/.emacs.d/straight/build-29/org/org-goto hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-goto
/Users/naofumi/.emacs.d/straight/build-29/org/ox-html hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ox-html
/Users/naofumi/.emacs.d/straight/build-29/org/org-src hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-src
/Users/naofumi/.emacs.d/straight/build-29/org/ob-lisp hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-lisp
/Users/naofumi/.emacs.d/straight/build-29/org/ol-eshell hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ol-eshell
/Users/naofumi/.emacs.d/straight/build-29/org/ob-ditaa hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-ditaa
/Users/naofumi/.emacs.d/straight/build-29/org/org-pcomplete hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-pcomplete
/Users/naofumi/.emacs.d/straight/build-29/org/org-lint hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-lint
/Users/naofumi/.emacs.d/straight/build-29/org/ox-latex hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ox-latex
/Users/naofumi/.emacs.d/straight/build-29/org/ob-sass hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-sass
/Users/naofumi/.emacs.d/straight/build-29/org/ob-tangle hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-tangle
/Users/naofumi/.emacs.d/straight/build-29/org/ob-calc hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-calc
/Users/naofumi/.emacs.d/straight/build-29/org/ob-java hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-java
/Users/naofumi/.emacs.d/straight/build-29/org/ox-icalendar hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ox-icalendar
/Users/naofumi/.emacs.d/straight/build-29/org/ol-mhe hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ol-mhe
/Users/naofumi/.emacs.d/straight/build-29/org/org-attach-git hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-attach-git
/Users/naofumi/.emacs.d/straight/build-29/org/ox-md hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ox-md
/Users/naofumi/.emacs.d/straight/build-29/org/ox-beamer hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ox-beamer
/Users/naofumi/.emacs.d/straight/build-29/org/org-element hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-element
/Users/naofumi/.emacs.d/straight/build-29/org/oc-natbib hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/oc-natbib
/Users/naofumi/.emacs.d/straight/build-29/org/org-protocol hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-protocol
/Users/naofumi/.emacs.d/straight/build-29/org/ob-gnuplot hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-gnuplot
/Users/naofumi/.emacs.d/straight/build-29/org/org-tempo hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-tempo
/Users/naofumi/.emacs.d/straight/build-29/org/ob-latex hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-latex
/Users/naofumi/.emacs.d/straight/build-29/org/ol-w3m hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ol-w3m
/Users/naofumi/.emacs.d/straight/build-29/org/org-id hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-id
/Users/naofumi/.emacs.d/straight/build-29/org/ox-man hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ox-man
/Users/naofumi/.emacs.d/straight/build-29/org/ol-doi hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ol-doi
/Users/naofumi/.emacs.d/straight/build-29/org/org-feed hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-feed
/Users/naofumi/.emacs.d/straight/build-29/org/ob-julia hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-julia
/Users/naofumi/.emacs.d/straight/build-29/org/ob-lua hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-lua
/Users/naofumi/.emacs.d/straight/build-29/org/ob-table hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-table
/Users/naofumi/.emacs.d/straight/build-29/org/ob-ocaml hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-ocaml
/Users/naofumi/.emacs.d/straight/build-29/org/oc-csl hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/oc-csl
/Users/naofumi/.emacs.d/straight/build-29/org/ol-gnus hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ol-gnus
/Users/naofumi/.emacs.d/straight/build-29/org/org-indent hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-indent
/Users/naofumi/.emacs.d/straight/build-29/org/ob-lilypond hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-lilypond
/Users/naofumi/.emacs.d/straight/build-29/org/ob-matlab hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-matlab
/Users/naofumi/.emacs.d/straight/build-29/org/org-datetree hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-datetree
/Users/naofumi/.emacs.d/straight/build-29/org/ol-docview hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ol-docview
/Users/naofumi/.emacs.d/straight/build-29/org/ob-python hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-python
/Users/naofumi/.emacs.d/straight/build-29/org/ob-makefile hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-makefile
/Users/naofumi/.emacs.d/straight/build-29/org/org-duration hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-duration
/Users/naofumi/.emacs.d/straight/build-29/org/org-agenda hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-agenda
/Users/naofumi/.emacs.d/straight/build-29/org/ob-dot hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-dot
/Users/naofumi/.emacs.d/straight/build-29/org/ob-js hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-js
/Users/naofumi/.emacs.d/straight/build-29/org/ox-publish hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ox-publish
/Users/naofumi/.emacs.d/straight/build-29/org/org-inlinetask hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-inlinetask
/Users/naofumi/.emacs.d/straight/build-29/org/ob-org hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-org
/Users/naofumi/.emacs.d/straight/build-29/org/org-keys hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-keys
/Users/naofumi/.emacs.d/straight/build-29/org/ob-core hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-core
/Users/naofumi/.emacs.d/straight/build-29/org/org-compat hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-compat
/Users/naofumi/.emacs.d/straight/build-29/org/ol hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ol
/Users/naofumi/.emacs.d/straight/build-29/org/ox-odt hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ox-odt
/Users/naofumi/.emacs.d/straight/build-29/org/ol-info hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ol-info
/Users/naofumi/.emacs.d/straight/build-29/org/ob-plantuml hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-plantuml
/Users/naofumi/.emacs.d/straight/build-29/org/ob-eshell hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-eshell
/Users/naofumi/.emacs.d/straight/build-29/org/ox-ascii hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ox-ascii
/Users/naofumi/.emacs.d/straight/build-29/org/ox-koma-letter hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ox-koma-letter
/Users/naofumi/.emacs.d/straight/build-29/org/ob-maxima hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-maxima
/Users/naofumi/.emacs.d/straight/build-29/org/org hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org
/Users/naofumi/.emacs.d/straight/build-29/org/ol-bbdb hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ol-bbdb
/Users/naofumi/.emacs.d/straight/build-29/org/org-macro hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-macro
/Users/naofumi/.emacs.d/straight/build-29/org/ob-sql hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-sql
/Users/naofumi/.emacs.d/straight/build-29/org/org-attach hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-attach
/Users/naofumi/.emacs.d/straight/build-29/org/ob-processing hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-processing
/Users/naofumi/.emacs.d/straight/build-29/org/ox-texinfo hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ox-texinfo
/Users/naofumi/.emacs.d/straight/build-29/org/org-crypt hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-crypt
/Users/naofumi/.emacs.d/straight/build-29/org/org-footnote hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/org-footnote
/Users/naofumi/.emacs.d/straight/build-29/org/ob-comint hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/org/ob-comint
/Users/naofumi/.emacs.d/straight/build-29/let-alist/let-alist hides /Users/naofumi/.local/emacs/head/share/emacs/29.0.50/lisp/emacs-lisp/let-alist

Features:
(eudc-capf eudc cus-start eudc-vars shadow sort company-oddmuse
company-keywords company-etags etags fileloop company-gtags
company-dabbrev-code company-dabbrev company-files company-clang
company-capf company-cmake company-semantic company-template
company-bbdb company mail-extr emacsbug magit-patch ispell tramp-cmds
misearch multi-isearch skk-isearch affe consult-vertico consult
compat-28 magit-bookmark bookmark bug-reference vc-hg vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs log-view cape vc-git autoconf autoconf-mode
display-line-numbers editorconfig-core editorconfig-core-handle
editorconfig-fnmatch magit-extras magit-submodule magit-obsolete
magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull
magit-fetch magit-clone magit-remote magit-commit magit-sequence
magit-notes magit-worktree magit-tag magit-merge magit-branch
magit-reset magit-files magit-refs magit-status magit magit-repos
magit-apply magit-wip magit-log which-func magit-diff smerge-mode diff
magit-core magit-autorevert magit-margin magit-transient magit-process
magit-mode dired-aux gnus-dired vertico-directory cursor-sensor
vertico-repeat face-remap editorconfig skk-cursor ccc skk-sticky
skk-dcomp skk-comp skk-look skk-server skk-study skk-hint skk-cus
skk-emacs skk-macs skk-vars skk delsel so-long autorevert recentf-ext
recentf tree-widget whitespace winner git-commit magit-git magit-base
magit-section compat-27 compat-26 with-editor log-edit pcvs-util add-log
git-gutter projectile lisp-mnt pyvenv eshell esh-cmd generator esh-ext
esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util yasnippet
marginalia vertico savehist corfu-history corfu-indexed corfu-terminal
win-switch windmove disable-mouse which-key doom-modeline
doom-modeline-segments doom-modeline-env doom-modeline-core
all-the-icons all-the-icons-faces data-material data-weathericons
data-octicons data-fileicons data-faicons data-alltheicons shrink-path f
f-shortdoc shortdoc tramp tramp-loaddefs trampver tramp-integration
tramp-compat parse-time iso8601 ls-lisp doom-tomorrow-night-theme
doom-themes doom-themes-base doom-themes-autoloads
base16-tomorrow-night-theme base16-theme base16-theme-autoloads
doom-modeline-autoloads shrink-path-autoloads all-the-icons-autoloads
vlf-setup vlf-autoloads helpful-autoloads elisp-refs-autoloads
which-key-autoloads disable-mouse-autoloads multiple-cursors-autoloads
shell-pop term disp-table shell pcomplete ehelp shell-pop-autoloads
win-switch-autoloads w3m-autoloads multi-vterm-autoloads vterm-autoloads
multi-term-autoloads ace-link avy ace-link-autoloads
ace-jump-buffer-autoloads affe-autoloads cape-autoloads kind-icon
svg-lib color svg xml kind-icon-autoloads svg-lib-autoloads
corfu-terminal-autoloads popon popon-autoloads corfu-quick corfu-info
corfu corfu-autoloads vertico-autoloads orderless orderless-autoloads
embark-consult-autoloads embark-autoloads consult-yasnippet-autoloads
consult-lsp-autoloads consult-eglot-autoloads consult-dir-autoloads
consult-ag-autoloads consult-autoloads marginalia-autoloads migemo
migemo-autoloads visual-regexp-steroids-autoloads
visual-regexp-autoloads symbol-overlay-autoloads wgrep-ag-autoloads
ag-autoloads rg files-x vc vc-dispatcher rg-info-hack rg-menu transient
compat rg-ibuffer rg-result wgrep-rg wgrep rg-history rg-header ibuf-ext
ibuffer ibuffer-loaddefs grep cus-edit cus-load rg-autoloads
wgrep-autoloads smart-jump-lisp-mode smart-jump-elisp-mode smart-jump
smart-jump-autoloads dumb-jump popup dash s hydra advice lv
dumb-jump-autoloads popup-autoloads dap-mode-autoloads
lsp-docker-autoloads yaml-autoloads lsp-treemacs-autoloads
treemacs-autoloads cfrs-autoloads posframe-autoloads hydra-autoloads
pfuture-autoloads ace-window-autoloads avy-autoloads bui-autoloads
lsp-mode-autoloads lv-autoloads ht-autoloads eglot array filenotify
jsonrpc ert pp ewoc debug backtrace find-func xref flymake-proc flymake
compile comint ansi-color ring project imenu eglot-autoloads
jsonrpc-autoloads imenu-list-autoloads devdocs-autoloads
android-mode-autoloads grip-mode-autoloads
markdown-preview-mode-autoloads web-server-autoloads
markdown-toc-autoloads gradle-mode-autoloads ninja-mode-autoloads
meson-mode-autoloads cmake-mode-autoloads powershell-autoloads
csv-mode-autoloads toml-mode-autoloads yaml-mode-autoloads
groovy-mode-autoloads kotlin-mode-autoloads rng-nxml rng-valid rng-loc
rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap sgml-mode facemenu dom nxml-util nxml-enc
xmltok web-mode-autoloads go-mode-autoloads rustic-autoloads
xterm-color-autoloads spinner-autoloads markdown-mode-autoloads
let-alist-autoloads rust-mode-autoloads haskell-mode-autoloads
ein-autoloads polymode-autoloads deferred-autoloads request-autoloads
anaphora-autoloads websocket-autoloads elpy-autoloads
yasnippet-autoloads highlight-indentation-autoloads company-autoloads
pipenv-autoloads load-env-vars-autoloads pyvenv-autoloads
slime-autoloads macrostep-autoloads editorconfig-autoloads
projectile-autoloads git-timemachine-autoloads git-modes-autoloads
git-gutter-autoloads magit-autoloads git-commit-autoloads
transient-autoloads mu4e-maildirs-extension-autoloads mu4e-autoloads
notmuch notmuch-tree notmuch-jump notmuch-hello wid-edit notmuch-show
notmuch-print notmuch-crypto notmuch-mua notmuch-message notmuch-draft
notmuch-maildir-fcc notmuch-address notmuch-company notmuch-parser
format-spec notmuch-wash diff-mode coolj goto-addr thingatpt icalendar
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs notmuch-tag crm
notmuch-lib notmuch-version notmuch-compat hl-line mm-view mml-smime
smime gnutls dig notmuch-autoloads pcase message yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 gnus-util
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils ox-gfm-autoloads
org-tree-slide-autoloads toc-org-autoloads org-roam-autoloads
magit-section-autoloads org-superstar-autoloads org-contrib-autoloads
pass-autoloads f-autoloads dash-autoloads password-store-otp-autoloads
password-store-autoloads with-editor-autoloads s-autoloads
auth-source-pass epg-config sr-speedbar-autoloads recentf-ext-autoloads
cua-base dabbrev w32-ime-autoloads ddskk-autoloads cdb-autoloads
ccc-autoloads edmacro kmacro exec-path-from-shell
exec-path-from-shell-autoloads finder-inf epkg-autoloads
closql-autoloads emacsql-sqlite-autoloads emacsql-autoloads
package-utils package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie generate-lisp-file url-domsuf
url-util mailcap url-handlers url-parse auth-source eieio eieio-core
password-cache json map byte-opt url-vars package-utils-autoloads
restart-emacs desktop frameset server restart-emacs-autoloads
use-package-chords bind-chord use-package-chords-autoloads
bind-chord-autoloads key-chord comp comp-cstr warnings icons rx
key-chord-autoloads diminish diminish-autoloads compat-autoloads
use-package use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core
use-package-autoloads bind-key-autoloads straight-x straight-autoloads
cl-seq info cl-extra help-mode straight subr-x cl-macs gv bytecomp
byte-compile cconv cl-loaddefs cl-lib japan-util rmc iso-transl tooltip
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads
xwidget-internal kqueue cocoa ns lcms2 multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 865696 208878)
 (symbols 48 41599 39)
 (strings 32 210249 108090)
 (string-bytes 1 8651906)
 (vectors 16 142871)
 (vector-slots 8 2833978 134218)
 (floats 8 1438 2225)
 (intervals 56 18670 7917)
 (buffers 992 49))

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sat, 06 Aug 2022 12:14:02 GMT) Full text and rfc822 format available.

Message #8 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Cc: 57015 <at> debbugs.gnu.org
Subject: Re: bug#57015: 29.0.50;
 macOS: libgccjit was not found: Homebrew libgccjit 12.1.0
Date: Sat, 06 Aug 2022 15:13:36 +0300
> From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
> Date: Sat, 06 Aug 2022 20:38:58 +0900
> 
> './configure --with-native-compilation' fails if Homebrew libgccjit is
> updated to 12.1.0.  Attached configure.ac patch fixes this issue.
> I think the same patch should be applied to emacs-28 branch.

I don't mind installing this on master, but I'd rather document that
Emacs 28 cannot be built on macOS with such a new libgccjit than
destabilize the release branch, even if it's only for macOS.  E.g.,
who says that 'readlink' will always be available on macOS?

Is it really a problem to use only libgccjit 12.0 and older for the
release branch?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sat, 06 Aug 2022 15:05:01 GMT) Full text and rfc822 format available.

Message #11 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jacob Faibussowitsch <jacob.fai <at> gmail.com>
Cc: 57015 <at> debbugs.gnu.org
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sat, 06 Aug 2022 18:03:32 +0300
Resending to the list:

> From: Jacob Faibussowitsch <jacob.fai <at> gmail.com>
> Date: Sat, 6 Aug 2022 09:56:27 -0400
> 
> > E.g., who says that 'readlink' will always be available on macOS?
> 
> 
> It’s not, see here https://stackoverflow.com/questions/7665/how-to-resolve-symbolic-links-in-a-shell-script. Though I suppose it may not be a big deal for emacs to require that coreutils are installed via brew since this libgccjit check is *already* using brew.
> 
> Other alternatives to resolving paths are:
> 
> $ perl -MCwd -e 'print Cwd::abs_path shift’ /path/to/file
> 
> Or
> 
> $ python -c 'import os, sys; print(os.path.realpath(sys.argv[1]))’ /path/to/file
> 
> Both perl and python (in some form) have always come preinstalled on macOS.
> 
> P.S. I couldn’t immediately see how to cc the mailing list, I replied using the “reply via email to” button here https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-08/msg00589.html so please resend this with proper cc if it doesn’t get attached.
> 
> Best regards,
> 
> Jacob Faibussowitsch
> (Jacob Fai - booss - oh - vitch)
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sat, 06 Aug 2022 15:14:01 GMT) Full text and rfc822 format available.

Message #14 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57015 <at> debbugs.gnu.org
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sun, 07 Aug 2022 00:13:23 +0900
[Message part 1 (text/plain, inline)]
Hi Eli,

Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
>> Date: Sat, 06 Aug 2022 20:38:58 +0900
>> 
>> './configure --with-native-compilation' fails if Homebrew libgccjit is
>> updated to 12.1.0.  Attached configure.ac patch fixes this issue.
>> I think the same patch should be applied to emacs-28 branch.
>
> I don't mind installing this on master, but I'd rather document that
> Emacs 28 cannot be built on macOS with such a new libgccjit than
> destabilize the release branch, even if it's only for macOS.  E.g.,
> who says that 'readlink' will always be available on macOS?

Thank you for your indication.  readlink '-f' option is not supported
by BSD-based readlink shipped with old macOS.  Revised patch is
attached.  This patch just choose 'current/libgccjit.dylib' from
multiple libgccjit.dylib paths.

--8<---------------cut here---------------start------------->8---
$ 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
$
$ ls -lR /usr/local/Cellar/libgccjit/12.1.0/lib/gcc
total 0
drwxr-xr-x  4 naofumi  admin  128 May  6 16:53 12
drwxr-xr-x  4 naofumi  admin  128 May  6 16:53 current

/usr/local/Cellar/libgccjit/12.1.0/lib/gcc/12:
total 0
lrwxr-xr-x  1 naofumi  admin  28 May  6 16:53 libgccjit.0.dylib -> ../current/libgccjit.0.dylib
lrwxr-xr-x  1 naofumi  admin  26 May  6 16:53 libgccjit.dylib -> ../current/libgccjit.dylib

/usr/local/Cellar/libgccjit/12.1.0/lib/gcc/current:
total 82304
-rw-r--r--  1 naofumi  admin  42138352 Aug  6 18:06 libgccjit.0.dylib
lrwxr-xr-x  1 naofumi  admin        17 May  6 16:53 libgccjit.dylib -> libgccjit.0.dylib
$
--8<---------------cut here---------------end--------------->8---

[0001-Fix-libgccjit-library-path-lookup-for-Homebrew-libgc.patch (text/x-patch, inline)]
From 3757f2e69c8aeb392377a83b7b1d06fc401cc8ff Mon Sep 17 00:00:00 2001
From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Date: Sat, 6 Aug 2022 22:10:36 +0900
Subject: [PATCH] Fix libgccjit library path lookup for Homebrew libgccjit
 12.1.0 and above

* configure.ac: Choose the first match from multiple libgccjit.dylib
paths in 'brew ls -v libgccjit' output.  Prefer 'current/libgccjit.dylib'
over '${ver}/libgccjit.dylib'  (Bug#57015)
---
 configure.ac | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1a264275bd..55dcb93f9a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4240,8 +4240,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 "${MAC_LIBS}" = "-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
 
-- 
2.37.1

[Message part 3 (text/plain, inline)]
>
> Is it really a problem to use only libgccjit 12.0 and older for the
> release branch?
>

No.  This libgccjit.dylib path problem is specific for the situation of
Homebrew libgccjit 12.1.0 and above.  I found that this problem is
caused by the following Homebrew change:

https://github.com/Homebrew/homebrew-core/commit/eb60b7d88a5bc4ffdff8859e88c4c11f5f403167#diff-14dead016a29e43c6e17b0e951d2a23e62156cf732e7d6d2cf603934397e8670R52

--8<---------------cut here---------------start------------->8---
eb60b7d88a5bc4ffdff8859e88c4c11f5f403167
Author:     Francois-Xavier Coudert <fxcoudert <at> gmail.com>
AuthorDate: Fri Apr 29 23:47:04 2022 +0200
Commit:     BrewTestBot <1589480+BrewTestBot <at> users.noreply.github.com>
CommitDate: Fri Aug 5 14:27:51 2022 +0000

Parent:     39c1b9e gcc 12.1.0
Contained:  master

libgccjit 12.1.0

- align with GCC lib dir
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
+    # Use `lib/gcc/current` to align with the GCC formula.
     args = %W[
       --prefix=#{prefix}
-      --libdir=#{lib}/gcc/#{version.major}
+      --libdir=#{lib}/gcc/current
--8<---------------cut here---------------end--------------->8---


But, unfortunately, macOS Homebrew users have no way to keep installing
libgccjit 11.x at the moment.  Yes, its just a matter of maintaining 
Homebrew libgccjit package... :-< 

gcc packages are maintaned as gcc <at> VERSION, but libgccjit is not:

--8<---------------cut here---------------start------------->8---
$ brew search gcc
==> Formulae
aarch64-elf-gcc     gcc <at> 5               i686-elf-gcc        scc
gcc ✔               gcc <at> 6               libgccjit ✔         tcc
gcc <at> 10              gcc <at> 7               x86_64-elf-gcc      ncc
gcc <at> 11              gcc <at> 8               grc
gcc <at> 4.9             gcc <at> 9               ghc ✔

==> Casks
gcc-aarch64-embedded                     gcs
gcc-arm-embedded                         icc
$
--8<---------------cut here---------------start------------->8---


--8<---------------cut here---------------start------------->8---
$ ./emacs/28/bin/emacs-28.1.91
dyld[40808]: Library not loaded: '/usr/local/opt/libgccjit/lib/gcc/11/libgccjit.0.dylib'
  Referenced from: '/Users/naofumi/.local/emacs/28/bin/emacs-28.1.91'
  Reason: tried: '/usr/local/opt/libgccjit/lib/gcc/11/libgccjit.0.dylib' (no such file), '/usr/local/lib/libgccjit.0.dylib' (no such file), '/usr/lib/libgccjit.0.dylib' (no such file)
zsh: abort      ./emacs/28/bin/emacs-28.1.91
$
$ otool -L ./emacs/28/bin/emacs-28.1.91
emacs/28/bin/emacs-28.1.91:
        /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 2113.40.126)
        /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
        /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 165.0.0)
        /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface (compatibility version 1.0.0, current version 1.0.0)
        /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1.11.0)
        /usr/local/opt/libtiff/lib/libtiff.5.dylib (compatibility version 14.0.0, current version 14.0.0)
        /usr/local/opt/jpeg/lib/libjpeg.9.dylib (compatibility version 15.0.0, current version 15.0.0)
        /usr/local/opt/libpng/lib/libpng16.16.dylib (compatibility version 54.0.0, current version 54.0.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
        /usr/local/opt/giflib/lib/libgif.dylib (compatibility version 0.0.0, current version 7.2.0)
        /usr/local/opt/librsvg/lib/librsvg-2.2.dylib (compatibility version 51.0.0, current version 51.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
        /usr/local/opt/glib/lib/libgio-2.0.0.dylib (compatibility version 7201.0.0, current version 7201.3.0)
        /usr/local/opt/gdk-pixbuf/lib/libgdk_pixbuf-2.0.0.dylib (compatibility version 4201.0.0, current version 4201.8.0)
        /usr/local/opt/glib/lib/libgobject-2.0.0.dylib (compatibility version 7201.0.0, current version 7201.3.0)
        /usr/local/opt/glib/lib/libglib-2.0.0.dylib (compatibility version 7201.0.0, current version 7201.3.0)
        /usr/local/opt/gettext/lib/libintl.8.dylib (compatibility version 11.0.0, current version 11.0.0)
        /usr/local/opt/cairo/lib/libcairo.2.dylib (compatibility version 11603.0.0, current version 11603.0.0)
        /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit (compatibility version 1.0.0, current version 613.1.17)
        /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.9.0)
        /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
        /usr/local/opt/gnutls/lib/libgnutls.30.dylib (compatibility version 64.0.0, current version 64.1.0)
        /usr/local/opt/little-cms2/lib/liblcms2.2.dylib (compatibility version 3.0.0, current version 3.13.0)
        /usr/local/opt/jansson/lib/libjansson.4.dylib (compatibility version 19.0.0, current version 19.0.0)
        /usr/local/opt/gmp/lib/libgmp.10.dylib (compatibility version 15.0.0, current version 15.1.0)
        /usr/local/opt/libgccjit/lib/gcc/11/libgccjit.0.dylib (compatibility version 0.0.0, current version 0.0.1)
        /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork (compatibility version 1.0.0, current version 1331.0.7)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)
        /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 1557.5.4)
        /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1141.1.0)
        /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText (compatibility version 1.0.0, current version 1.0.0)
        /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1858.112.0)
        /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
$
--8<---------------cut here---------------end--------------->8---


Regards,
  Naofumi

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sat, 06 Aug 2022 16:38:02 GMT) Full text and rfc822 format available.

Message #17 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57015 <at> debbugs.gnu.org
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sun, 07 Aug 2022 01:36:39 +0900
[Message part 1 (text/plain, inline)]
Naofumi Yasufuku <naofumi <at> yasufuku.dev> writes:
[,,snip..]
> +          MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit | \
> +                                  grep -E 'current/libgccjit\.(so|dylib)$' | \
> +                                  head -1))"
> +          if test "${MAC_LIBS}" = "-L"; then
> +            # Try for Homebrew libgccjit < 12.1.0.
> +            MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit | \
> +                                    grep -E 'libgccjit\.(so|dylib)$' | \
> +                                    head -1))"

"x" is added for "${MAC_LIBS}" test, just in case.  Revised patch is
attached.  I also attach emacs-28 config.log's against both
homebrew libgccjit-12.1.0 and libgccjit-11.3.0.

[0001-Fix-libgccjit-library-path-lookup-for-Homebrew-libgc.patch (text/x-patch, inline)]
From cf149557e6d3722671d3acb90d2e9776b833eb5d Mon Sep 17 00:00:00 2001
From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Date: Sat, 6 Aug 2022 22:10:36 +0900
Subject: [PATCH] Fix libgccjit library path lookup for Homebrew libgccjit
 12.1.0 and above

* configure.ac: Choose the first match from multiple libgccjit.dylib
paths in 'brew ls -v libgccjit' output.  Prefer 'current/libgccjit.dylib'
over '${ver}/libgccjit.dylib'  (Bug#57015)
---
 configure.ac | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 57b86e8542..4636426443 100644
--- 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
 
-- 
2.37.1

[Message part 3 (text/plain, inline)]
Regards,
  Naofumi

[emacs-28_brew-libgccjit-12-config.log (text/plain, attachment)]
[emacs-28_brew-libgccjit-11-config.log (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sat, 06 Aug 2022 16:46:02 GMT) Full text and rfc822 format available.

Message #20 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Cc: 57015 <at> debbugs.gnu.org
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sat, 06 Aug 2022 19:44:56 +0300
> From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
> Cc: 57015 <at> 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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sat, 06 Aug 2022 18:31:02 GMT) Full text and rfc822 format available.

Message #23 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57015 <at> debbugs.gnu.org
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sun, 07 Aug 2022 03:30:08 +0900
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
>> Cc: 57015 <at> 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




Merged 57015 57028. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 07 Aug 2022 06:30:03 GMT) Full text and rfc822 format available.

Merged 57015 57028 57029. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 07 Aug 2022 06:51:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sun, 07 Aug 2022 09:59:01 GMT) Full text and rfc822 format available.

Message #30 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Cc: 57015 <at> debbugs.gnu.org
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sun, 7 Aug 2022 04:57:57 -0500
Eli Zaretskii <eliz <at> gnu.org> writes:

> Is it really a problem to use only libgccjit 12.0 and older for the
> release branch?

I'm afraid that it's a serious problem.

Homebrew has an eager upgrade policy akin to a rolling release
distribution.  AFAIU, every macOS user running Homebrew will be unable
to build Emacs after having run "brew upgrade", which many users do
routinely.

See:

    https://formulae.brew.sh/formula/libgccjit#default

[I unfortunately don't use an up-to-date Homebrew on my macOS machine so
I can't help test any solution.]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sun, 07 Aug 2022 10:25:01 GMT) Full text and rfc822 format available.

Message #33 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 57015 <at> debbugs.gnu.org, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sun, 07 Aug 2022 13:24:25 +0300
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Sun, 7 Aug 2022 04:57:57 -0500
> Cc: 57015 <at> debbugs.gnu.org
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Is it really a problem to use only libgccjit 12.0 and older for the
> > release branch?
> 
> I'm afraid that it's a serious problem.
> 
> Homebrew has an eager upgrade policy akin to a rolling release
> distribution.  AFAIU, every macOS user running Homebrew will be unable
> to build Emacs after having run "brew upgrade", which many users do
> routinely.

I'm sorry, but either someone will have to come up with a _very_ safe
fix, or users of macOS will need to delay upgrading or live with Emacs
27 (or patch their sources manually on their own risk).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sun, 07 Aug 2022 10:59:01 GMT) Full text and rfc822 format available.

Message #36 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57015 <at> debbugs.gnu.org, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sun, 7 Aug 2022 05:57:56 -0500
Eli Zaretskii <eliz <at> gnu.org> writes:

> I'm sorry, but either someone will have to come up with a _very_ safe
> fix, or users of macOS will need to delay upgrading or live with Emacs
> 27 (or patch their sources manually on their own risk).

That's a maintainer decision, but note that Homebrew is by far the
most popular package manager on macOS.  It seems important to ensure
things work there, if we want to pay more than lip service to
supporting macOS.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sun, 07 Aug 2022 11:33:02 GMT) Full text and rfc822 format available.

Message #39 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 57015 <at> debbugs.gnu.org, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sun, 07 Aug 2022 14:32:19 +0300
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Sun, 7 Aug 2022 05:57:56 -0500
> Cc: naofumi <at> yasufuku.dev, 57015 <at> debbugs.gnu.org
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > I'm sorry, but either someone will have to come up with a _very_ safe
> > fix, or users of macOS will need to delay upgrading or live with Emacs
> > 27 (or patch their sources manually on their own risk).
> 
> That's a maintainer decision, but note that Homebrew is by far the
> most popular package manager on macOS.  It seems important to ensure
> things work there, if we want to pay more than lip service to
> supporting macOS.

I have nothing against making the macOS build work, but where's the
solution of the problem that you think is fine for installing on the
release branch?  Up until now, I saw no such solution, so accusing me
of paying lip service sounds quite unfair to me.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sun, 07 Aug 2022 12:04:02 GMT) Full text and rfc822 format available.

Message #42 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57015 <at> debbugs.gnu.org, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sun, 7 Aug 2022 07:03:21 -0500
Eli Zaretskii <eliz <at> gnu.org> writes:

> I have nothing against making the macOS build work, but where's the
> solution of the problem that you think is fine for installing on the
> release branch?  Up until now, I saw no such solution, so accusing me
> of paying lip service sounds quite unfair to me.

I did not intend to accuse, but was trying to express the importance I
attach to this issue.  I'm sorry if it came off as harsh.

(I'm not in a good position to look for a fix, as I only have access to
a very out-of-date macOS where "brew upgrade" refuses to run.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sun, 07 Aug 2022 12:57:01 GMT) Full text and rfc822 format available.

Message #45 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 57015 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sun, 07 Aug 2022 20:55:50 +0800
Stefan Kangas <stefankangas <at> gmail.com> writes:

> That's a maintainer decision, but note that Homebrew is by far the
> most popular package manager on macOS.  It seems important to ensure
> things work there, if we want to pay more than lip service to
> supporting macOS.

FWIW, I think macOS Emacs users can do without a package manager.  I
built Emacs and its dependencies manually on a Mac using only the
built-in Command Line Developer Tools.  I guess I should write the
instructions down in nextstep/INSTALL.

Recommending a package manager that breaks so often to our macOS users
is doing them a disservice.  I think there have already been several bug
reports during the past year related to Homebrew changing their
libgccjit package.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sun, 07 Aug 2022 12:59:02 GMT) Full text and rfc822 format available.

Message #48 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Sun, 07 Aug 2022 14:58:14 +0200
Stefan Kangas <stefankangas <at> gmail.com> writes:

>> Is it really a problem to use only libgccjit 12.0 and older for the
>> release branch?
>
> I'm afraid that it's a serious problem.

Yes, I think we have to put a fix for this on the release branch, but as
Eli says, it must be safe.  (And this has been a surprisingly difficult
thing to get right -- it seems so simple, but the differences between
brew/Macports/versions of the basic utilities have led to numerous
breakages here.)






Forcibly Merged 57015 57023 57028 57029. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 07 Aug 2022 13:00:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sun, 07 Aug 2022 13:16:01 GMT) Full text and rfc822 format available.

Message #53 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 57015 <at> debbugs.gnu.org, stefankangas <at> gmail.com, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sun, 07 Aug 2022 16:14:44 +0300
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  57015 <at> debbugs.gnu.org,  naofumi <at> yasufuku.dev
> Date: Sun, 07 Aug 2022 20:55:50 +0800
> 
> FWIW, I think macOS Emacs users can do without a package manager.  I
> built Emacs and its dependencies manually on a Mac using only the
> built-in Command Line Developer Tools.  I guess I should write the
> instructions down in nextstep/INSTALL.

If we have instructions in the tarball that allow building Emacs 28
with bold "good" and "bad" versions of libgccjit, that'd from my POV
be a sufficient solution for the release branch.

Of course, if someone finds a reliable solution that doesn't need
manual procedures, that'd be even better.

> Recommending a package manager that breaks so often to our macOS users
> is doing them a disservice.

Agreed.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sun, 07 Aug 2022 13:53:02 GMT) Full text and rfc822 format available.

Message #56 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57015 <at> debbugs.gnu.org, stefankangas <at> gmail.com, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sun, 07 Aug 2022 21:52:04 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> If we have instructions in the tarball that allow building Emacs 28
> with bold "good" and "bad" versions of libgccjit, that'd from my POV
> be a sufficient solution for the release branch.
>
> Of course, if someone finds a reliable solution that doesn't need
> manual procedures, that'd be even better.

Okay.  The next time I get access to a Mac (which could take a week or
so) I'll try to work out exactly what I did and write it down.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sun, 07 Aug 2022 14:27:01 GMT) Full text and rfc822 format available.

Message #59 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Po Lu <luangruo <at> yahoo.com>
Cc: 57015 <at> debbugs.gnu.org, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sun, 7 Aug 2022 09:26:23 -0500
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Recommending a package manager that breaks so often to our macOS users
>> is doing them a disservice.
>
> Agreed.

Does Homebrew "break" often, or is it just that they happen to have more
recent versions of things and that we struggle to keep up?  And do we
even recommend Homebrew as it is?

In any case, this seems rather academic to me as our recommendations in
this regard will have little bearing on what users do in practice.
Especially if our recommendation will be to compile the entire build
environment manually: realistically, that's just not going to happen.

OTOH, if we want to recommend MacPorts or some other alternative package
manager, that's fine by me.  But even that would be an uphill battle,
and would also do little to solve our immediate issues (as the majority
continue using Homebrew).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Sun, 07 Aug 2022 14:34:01 GMT) Full text and rfc822 format available.

Message #62 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: luangruo <at> yahoo.com, 57015 <at> debbugs.gnu.org, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Sun, 07 Aug 2022 17:32:53 +0300
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Sun, 7 Aug 2022 09:26:23 -0500
> Cc: 57015 <at> debbugs.gnu.org, naofumi <at> yasufuku.dev
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> Recommending a package manager that breaks so often to our macOS users
> >> is doing them a disservice.
> >
> > Agreed.
> 
> Does Homebrew "break" often, or is it just that they happen to have more
> recent versions of things and that we struggle to keep up?

AFAIU, the solution we have for different ways ion which macOS
provides libgccjit is fragile and tends to break with new releases of
whatever macOS software that affects this.  We fixed this already
twice during the recent weeks.

> In any case, this seems rather academic to me as our recommendations in
> this regard will have little bearing on what users do in practice.
> Especially if our recommendation will be to compile the entire build
> environment manually: realistically, that's just not going to happen.
> 
> OTOH, if we want to recommend MacPorts or some other alternative package
> manager, that's fine by me.  But even that would be an uphill battle,
> and would also do little to solve our immediate issues (as the majority
> continue using Homebrew).

There's only this much we can do in this matter.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Mon, 08 Aug 2022 06:04:01 GMT) Full text and rfc822 format available.

Message #65 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org,
 Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Mon, 08 Aug 2022 08:03:45 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> -          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

The 'x' is kind of confusing here because MAC_LIBS can't be empty at
this point.

> Is 'dirname' guaranteed to be available?

Yes (POSIX).  And it was used already.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Mon, 08 Aug 2022 06:24:02 GMT) Full text and rfc822 format available.

Message #68 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, 57029 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz <at> gnu.org>, naofumi <at> yasufuku.dev, 57015 <at> debbugs.gnu.org
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Mon, 08 Aug 2022 08:23:39 +0200
Stefan Kangas <stefankangas <at> gmail.com> writes:

> In any case, this seems rather academic to me as our recommendations in
> this regard will have little bearing on what users do in practice.

+1




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Mon, 08 Aug 2022 08:10:02 GMT) Full text and rfc822 format available.

Message #71 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> suse.de>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Subject: Re: bug#57015: bug#57029: macos cannot build emacs after updated
 gcc and libgccjit to 12.1
Date: Mon, 08 Aug 2022 10:08:49 +0200
On Aug 08 2022, Gerd Möllmann wrote:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> -          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
>
> The 'x' is kind of confusing here because MAC_LIBS can't be empty at
> this point.

This x prefix is not about emptyness, but preventing a pre-POSIX test
utility from being confused by the leading dash.

-- 
Andreas Schwab, SUSE Labs, schwab <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Mon, 08 Aug 2022 12:59:01 GMT) Full text and rfc822 format available.

Message #74 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Andreas Schwab <schwab <at> suse.de>
Cc: 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Mon, 08 Aug 2022 14:57:52 +0200
Andreas Schwab <schwab <at> suse.de> writes:

> This x prefix is not about emptyness, but preventing a pre-POSIX test
> utility from being confused by the leading dash.

Ah right, I forgot that.  Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Tue, 09 Aug 2022 15:34:02 GMT) Full text and rfc822 format available.

Message #77 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
To: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Cc: 57015 <at> debbugs.gnu.org
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Tue, 09 Aug 2022 17:33:31 +0200
Naofumi Yasufuku <naofumi <at> yasufuku.dev> writes:

> './configure --with-native-compilation' fails if Homebrew libgccjit is
> updated to 12.1.0.  Attached configure.ac patch fixes this issue.
> I think the same patch should be applied to emacs-28 branch.

As an alternative to your patch and the general approach based on
running `grep` over the output of `brew ls`, one can also use

    % brew ruby -e 'puts "#{:libgccjit.f.lib}/gcc/#{:gcc.f.any_installed_version.major}"'
    /usr/local/opt/libgccjit/lib/gcc/12

for MAC_LIBS, and

    % brew ruby -e 'puts :libgccjit.f.include'
    /usr/local/opt/libgccjit/include

for MAC_CFLAGS.  This will work with both versions 11 and 12 of
Homebrew's `libgccjit`.

Best regards,
Dario




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Wed, 10 Aug 2022 14:43:02 GMT) Full text and rfc822 format available.

Message #80 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
To: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
Cc: 57015 <at> debbugs.gnu.org
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Wed, 10 Aug 2022 23:42:21 +0900
Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com> writes:

> Naofumi Yasufuku <naofumi <at> yasufuku.dev> writes:
>
>> './configure --with-native-compilation' fails if Homebrew libgccjit is
>> updated to 12.1.0.  Attached configure.ac patch fixes this issue.
>> I think the same patch should be applied to emacs-28 branch.
>
> As an alternative to your patch and the general approach based on
> running `grep` over the output of `brew ls`, one can also use
>
>     % brew ruby -e 'puts "#{:libgccjit.f.lib}/gcc/#{:gcc.f.any_installed_version.major}"'
>     /usr/local/opt/libgccjit/lib/gcc/12
>
> for MAC_LIBS, and
>
>     % brew ruby -e 'puts :libgccjit.f.include'
>     /usr/local/opt/libgccjit/include
>
> for MAC_CFLAGS.  This will work with both versions 11 and 12 of
> Homebrew's `libgccjit`.
>

Great.  That makes sense to me.  I think 'brew ruby' way is clearly
preferable over my attempt.

Regards,
  Naofumi




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Wed, 10 Aug 2022 15:53:02 GMT) Full text and rfc822 format available.

Message #83 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Cc: 57015 <at> debbugs.gnu.org, dario.gjorgjevski <at> gmail.com
Subject: Re: bug#57015: 29.0.50;
 macOS: libgccjit was not found: Homebrew libgccjit 12.1.0
Date: Wed, 10 Aug 2022 18:52:30 +0300
> Cc: 57015 <at> debbugs.gnu.org
> From: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
> Date: Wed, 10 Aug 2022 23:42:21 +0900
> 
> Great.  That makes sense to me.  I think 'brew ruby' way is clearly
> preferable over my attempt.

Why, is ruby guaranteed to be available on every macOS system?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Wed, 10 Aug 2022 16:15:01 GMT) Full text and rfc822 format available.

Message #86 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Cc: 57015 <at> debbugs.gnu.org, dario.gjorgjevski <at> gmail.com
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Wed, 10 Aug 2022 09:14:29 -0700
Eli Zaretskii <eliz <at> gnu.org> writes:

> Why, is ruby guaranteed to be available on every macOS system?

Homebrew itself is written in Ruby, so AFAIK unless the installation is
broken it should always be available when the "brew" command is.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Thu, 11 Aug 2022 16:21:02 GMT) Full text and rfc822 format available.

Message #89 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 57015 <at> debbugs.gnu.org, dario.gjorgjevski <at> gmail.com, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Thu, 11 Aug 2022 19:20:42 +0300
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Wed, 10 Aug 2022 09:14:29 -0700
> Cc: 57015 <at> debbugs.gnu.org, dario.gjorgjevski <at> gmail.com
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Why, is ruby guaranteed to be available on every macOS system?
> 
> Homebrew itself is written in Ruby, so AFAIK unless the installation is
> broken it should always be available when the "brew" command is.

But does this problem only happen when building Emacs under Homebrew?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Tue, 16 Aug 2022 13:30:02 GMT) Full text and rfc822 format available.

Message #92 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57015 <at> debbugs.gnu.org, Stefan Kangas <stefankangas <at> gmail.com>,
 naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Tue, 16 Aug 2022 15:28:26 +0200
On Thu, Aug 11, 2022 at 6:20 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> But does this problem only happen when building Emacs under Homebrew?

Yes, this happens only with Homebrew and it started happening when
Homebrew upgraded libgccjit (and gcc) to version 12.

Previously, Homebrew was installing the libgccjit libraries in

    $HOMEBREW_PREFIX/opt/libgccjit/lib/gcc/${major_version}

Whereas it now installs them in

    $HOMEBREW_PREFIX/opt/libgccjit/lib/gcc/current
    $HOMEBREW_PREFIX/opt/libgccjit/lib/gcc/${major_version}

with the latter being a symlink to the former.  This breaks the
configure script which expects only a single libdir to be found; it
now finds two and ends up with an erroneous invocation (i.e.
`-L${libdir1} ${libdir2}' as opposed to `-L${libdir}').

Best regards,
Dario




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Tue, 16 Aug 2022 13:45:02 GMT) Full text and rfc822 format available.

Message #95 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
Cc: 57015 <at> debbugs.gnu.org, stefankangas <at> gmail.com, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Tue, 16 Aug 2022 16:44:06 +0300
> From: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
> Date: Tue, 16 Aug 2022 15:28:26 +0200
> Cc: Stefan Kangas <stefankangas <at> gmail.com>, naofumi <at> yasufuku.dev, 57015 <at> debbugs.gnu.org
> 
> On Thu, Aug 11, 2022 at 6:20 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > But does this problem only happen when building Emacs under Homebrew?
> 
> Yes, this happens only with Homebrew and it started happening when
> Homebrew upgraded libgccjit (and gcc) to version 12.

Are you saying that the other macOS development environments will not
upgrade libgccjit to v12.x?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Tue, 16 Aug 2022 13:59:02 GMT) Full text and rfc822 format available.

Message #98 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57015 <at> debbugs.gnu.org, stefankangas <at> gmail.com, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Tue, 16 Aug 2022 15:58:10 +0200
On Tue, Aug 16, 2022 at 3:44 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> Are you saying that the other macOS development environments will not
> upgrade libgccjit to v12.x?

Sorry for not being clear enough.

The issue was not caused by libgccjit (and gcc) being upgraded to
version 12.  It was caused by Homebrew changing the directory
structure in the way I described, which just happened to coincide with
the upgrade from version 11 to version 12.

On a side note, I have no idea why Homebrew chose to make
lib/gcc/${major_version} a symlink to lib/gcc/current as opposed to
the other way around.

Best regards,
Dario




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Tue, 16 Aug 2022 14:09:02 GMT) Full text and rfc822 format available.

Message #101 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
Cc: 57015 <at> debbugs.gnu.org, stefankangas <at> gmail.com, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Tue, 16 Aug 2022 17:08:38 +0300
> From: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
> Date: Tue, 16 Aug 2022 15:58:10 +0200
> Cc: stefankangas <at> gmail.com, naofumi <at> yasufuku.dev, 57015 <at> debbugs.gnu.org
> 
> On Tue, Aug 16, 2022 at 3:44 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > Are you saying that the other macOS development environments will not
> > upgrade libgccjit to v12.x?
> 
> Sorry for not being clear enough.
> 
> The issue was not caused by libgccjit (and gcc) being upgraded to
> version 12.  It was caused by Homebrew changing the directory
> structure in the way I described, which just happened to coincide with
> the upgrade from version 11 to version 12.

And no other development environment on macOS is likely to do the
same?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Tue, 16 Aug 2022 14:19:01 GMT) Full text and rfc822 format available.

Message #104 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57015 <at> debbugs.gnu.org, stefankangas <at> gmail.com, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Tue, 16 Aug 2022 16:17:59 +0200
On Tue, Aug 16, 2022 at 4:08 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
> > Date: Tue, 16 Aug 2022 15:58:10 +0200
> > Cc: stefankangas <at> gmail.com, naofumi <at> yasufuku.dev, 57015 <at> debbugs.gnu.org
> >
> > On Tue, Aug 16, 2022 at 3:44 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > >
> > > Are you saying that the other macOS development environments will not
> > > upgrade libgccjit to v12.x?
> >
> > Sorry for not being clear enough.
> >
> > The issue was not caused by libgccjit (and gcc) being upgraded to
> > version 12.  It was caused by Homebrew changing the directory
> > structure in the way I described, which just happened to coincide with
> > the upgrade from version 11 to version 12.
>
> And no other development environment on macOS is likely to do the
> same?

I have no idea, sorry.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Tue, 16 Aug 2022 14:33:02 GMT) Full text and rfc822 format available.

Message #107 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>,
 Eli Zaretskii <eliz <at> gnu.org>
Cc: 57015 <at> debbugs.gnu.org, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Tue, 16 Aug 2022 07:32:49 -0700
Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com> writes:

> The issue was not caused by libgccjit (and gcc) being upgraded to
> version 12.  It was caused by Homebrew changing the directory
> structure in the way I described, which just happened to coincide with
> the upgrade from version 11 to version 12.
>
> On a side note, I have no idea why Homebrew chose to make
> lib/gcc/${major_version} a symlink to lib/gcc/current as opposed to
> the other way around.

Should this perhaps be considered a bug in Homebrew, instead?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Tue, 16 Aug 2022 15:10:01 GMT) Full text and rfc822 format available.

Message #110 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 57015 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Tue, 16 Aug 2022 17:08:29 +0200
On Tue, Aug 16, 2022 at 4:32 PM Stefan Kangas <stefankangas <at> gmail.com> wrote:
>
> Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com> writes:
>
> > The issue was not caused by libgccjit (and gcc) being upgraded to
> > version 12.  It was caused by Homebrew changing the directory
> > structure in the way I described, which just happened to coincide with
> > the upgrade from version 11 to version 12.
> >
> > On a side note, I have no idea why Homebrew chose to make
> > lib/gcc/${major_version} a symlink to lib/gcc/current as opposed to
> > the other way around.
>
> Should this perhaps be considered a bug in Homebrew, instead?

This was an intentional change, so I doubt they would reconsider it.
It is, in my opinion, not a very good one, but it is what it is.

Best regards,
Dario




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Tue, 16 Aug 2022 15:49:02 GMT) Full text and rfc822 format available.

Message #113 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
Cc: 57015 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Tue, 16 Aug 2022 08:48:50 -0700
Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com> writes:

> This was an intentional change, so I doubt they would reconsider it.
> It is, in my opinion, not a very good one, but it is what it is.

Do we know that?  Is it not possible that this was merely an oversight?

Even if it was intentional, it might be worth opening a bug report to
discuss the issue with the maintainers.  While libgccjit is not that
commonly used, others might be in a similar boat as Emacs.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Tue, 16 Aug 2022 15:53:02 GMT) Full text and rfc822 format available.

Message #116 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 57015 <at> debbugs.gnu.org, dario.gjorgjevski <at> gmail.com, naofumi <at> yasufuku.dev
Subject: Re: bug#57015: 29.0.50; macOS: libgccjit was not found: Homebrew
 libgccjit 12.1.0
Date: Tue, 16 Aug 2022 18:52:23 +0300
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Tue, 16 Aug 2022 07:32:49 -0700
> Cc: naofumi <at> yasufuku.dev, 57015 <at> debbugs.gnu.org
> 
> Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com> writes:
> 
> > The issue was not caused by libgccjit (and gcc) being upgraded to
> > version 12.  It was caused by Homebrew changing the directory
> > structure in the way I described, which just happened to coincide with
> > the upgrade from version 11 to version 12.
> >
> > On a side note, I have no idea why Homebrew chose to make
> > lib/gcc/${major_version} a symlink to lib/gcc/current as opposed to
> > the other way around.
> 
> Should this perhaps be considered a bug in Homebrew, instead?

We could, but that won't help our users.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Fri, 19 Aug 2022 07:25:02 GMT) Full text and rfc822 format available.

Message #119 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org, dario.gjorgjevski <at> gmail.com,
 Stefan Kangas <stefankangas <at> gmail.com>, naofumi <at> yasufuku.dev
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Fri, 19 Aug 2022 09:24:27 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> We could, but that won't help our users.

Any objections to a fix in master?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Fri, 19 Aug 2022 07:39:02 GMT) Full text and rfc822 format available.

Message #122 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org, dario.gjorgjevski <at> gmail.com,
 stefankangas <at> gmail.com, naofumi <at> yasufuku.dev
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Fri, 19 Aug 2022 10:38:21 +0300
> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
> Cc: Stefan Kangas <stefankangas <at> gmail.com>,  57029 <at> debbugs.gnu.org,
>   57015 <at> debbugs.gnu.org,  dario.gjorgjevski <at> gmail.com,
>   naofumi <at> yasufuku.dev
> Date: Fri, 19 Aug 2022 09:24:27 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > We could, but that won't help our users.
> 
> Any objections to a fix in master?

Not on master, no.  My problem is what to do with the release branch.
If you think the solution based on Ruby is fine and safe, please
install that on the release branch (and it will be soon merged to
master).

Otherwise, which of the other solutions proposed here and in related
discussions do you recommend that is safe enough for the release
branch?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Fri, 19 Aug 2022 09:07:01 GMT) Full text and rfc822 format available.

Message #125 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org, dario.gjorgjevski <at> gmail.com,
 stefankangas <at> gmail.com, naofumi <at> yasufuku.dev
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Fri, 19 Aug 2022 11:05:57 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> If you think the solution based on Ruby is fine and safe, please
> install that on the release branch (and it will be soon merged to
> master).

Thanks!  I've done that on emacs-28.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57015; Package emacs. (Mon, 05 Sep 2022 18:45:01 GMT) Full text and rfc822 format available.

Message #128 received at 57015 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: naofumi <at> yasufuku.dev, 57029 <at> debbugs.gnu.org, 57015 <at> debbugs.gnu.org,
 dario.gjorgjevski <at> gmail.com, stefankangas <at> gmail.com,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#57029: macos cannot build emacs after updated gcc and
 libgccjit to 12.1
Date: Mon, 05 Sep 2022 20:43:54 +0200
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:

>> If you think the solution based on Ruby is fine and safe, please
>> install that on the release branch (and it will be soon merged to
>> master).
>
> Thanks!  I've done that on emacs-28.

And I guess that fixed this bug?  So I'm closing this bug report now.

(If I misunderstood, please respond to the debbugs address and we'll
reopen.)




bug marked as fixed in version 29.1, send any further explanations to 57029 <at> debbugs.gnu.org and ccqpein <ccqpein <at> protonmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 05 Sep 2022 18:45:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 04 Oct 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 197 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.