homebrew-emacs-plus icon indicating copy to clipboard operation
homebrew-emacs-plus copied to clipboard

Installation fails with libgccjit (and possibly gcc) 12.1.0 recent release

Open jidicula opened this issue 1 year ago • 34 comments

Please make sure to follow these steps (and mark the checkboxes):

  • [x] run brew update and try to reproduce the issue again
  • [x] run brew doctor, fix all issues and try to reproduce your issue again
  • [x] run brew config and brew doctor and include their output

What you were trying to do

Brew updating all outdated formulas, which included libgccjit and gcc 11.3.0_1 -> 12.1.0 today. Since emacs-plus is a dependent, it got rebuilt too and failed, so I uninstalled it completely and re-ran the install command below (because its reinstall build is known to not work).

What happened (include command output)

$ brew install emacs-plus@28 --verbose --with-elrumo2-icon --with-mailutils --with-xwidgets --with-native-comp --with-imagemagick --with-no-frame-refocus
Command output

PATH value was changed to: /opt/homebrew/opt/make/libexec/gnubin /opt/homebrew/opt/autoconf/libexec/gnubin /opt/homebrew/opt/gnu-sed/libexec/gnubin /opt/homebrew/opt/gnu-tar/libexec/gnubin /opt/homebrew/opt/awk/libexec/gnubin /opt/homebrew/opt/coreutils/libexec/gnubin /opt/homebrew/opt/pkg-config/libexec/gnubin /opt/homebrew/opt/texinfo/libexec/gnubin /opt/homebrew/opt/gnutls/libexec/gnubin /opt/homebrew/opt/librsvg/libexec/gnubin /opt/homebrew/opt/little-cms2/libexec/gnubin /opt/homebrew/opt/jansson/libexec/gnubin /opt/homebrew/opt/imagemagick/libexec/gnubin /opt/homebrew/opt/dbus/libexec/gnubin /opt/homebrew/opt/mailutils/libexec/gnubin /opt/homebrew/opt/libgccjit/libexec/gnubin /opt/homebrew/opt/gcc/libexec/gnubin /opt/homebrew/opt/gmp/libexec/gnubin /opt/homebrew/opt/jpeg/libexec/gnubin /opt/homebrew/opt/zlib/libexec/gnubin /opt/homebrew/opt/make/bin /opt/homebrew/opt/autoconf/bin /opt/homebrew/opt/gnu-sed/bin /opt/homebrew/opt/gnu-tar/bin /opt/homebrew/opt/awk/bin /opt/homebrew/opt/coreutils/bin /opt/homebrew/opt/pkg-config/bin /opt/homebrew/opt/texinfo/bin /opt/homebrew/opt/gnutls/bin /opt/homebrew/opt/librsvg/bin /opt/homebrew/opt/little-cms2/bin /opt/homebrew/opt/jansson/bin /opt/homebrew/opt/imagemagick/bin /opt/homebrew/opt/dbus/bin /opt/homebrew/opt/mailutils/bin /opt/homebrew/opt/libgccjit/bin /opt/homebrew/opt/gcc/bin /opt/homebrew/opt/gmp/bin /opt/homebrew/opt/jpeg/bin /opt/homebrew/opt/zlib/bin /opt/homebrew/Library/Homebrew/shims/shared /usr/bin /bin /usr/sbin /sbin ==> which tar /opt/homebrew/opt/gnu-tar/libexec/gnubin/tar ==> which ls /opt/homebrew/opt/coreutils/libexec/gnubin/ls PATH value was changed to: /opt/homebrew/opt/make/libexec/gnubin /opt/homebrew/opt/autoconf/libexec/gnubin /opt/homebrew/opt/gnu-sed/libexec/gnubin /opt/homebrew/opt/gnu-tar/libexec/gnubin /opt/homebrew/opt/awk/libexec/gnubin /opt/homebrew/opt/coreutils/libexec/gnubin /opt/homebrew/opt/pkg-config/libexec/gnubin /opt/homebrew/opt/texinfo/libexec/gnubin /opt/homebrew/opt/gnutls/libexec/gnubin /opt/homebrew/opt/librsvg/libexec/gnubin /opt/homebrew/opt/little-cms2/libexec/gnubin /opt/homebrew/opt/jansson/libexec/gnubin /opt/homebrew/opt/imagemagick/libexec/gnubin /opt/homebrew/opt/dbus/libexec/gnubin /opt/homebrew/opt/mailutils/libexec/gnubin /opt/homebrew/opt/libgccjit/libexec/gnubin /opt/homebrew/opt/gcc/libexec/gnubin /opt/homebrew/opt/gmp/libexec/gnubin /opt/homebrew/opt/jpeg/libexec/gnubin /opt/homebrew/opt/zlib/libexec/gnubin /opt/homebrew/opt/make/bin /opt/homebrew/opt/autoconf/bin /opt/homebrew/opt/gnu-sed/bin /opt/homebrew/opt/gnu-tar/bin /opt/homebrew/opt/awk/bin /opt/homebrew/opt/coreutils/bin /opt/homebrew/opt/pkg-config/bin /opt/homebrew/opt/texinfo/bin /opt/homebrew/opt/gnutls/bin /opt/homebrew/opt/librsvg/bin /opt/homebrew/opt/little-cms2/bin /opt/homebrew/opt/jansson/bin /opt/homebrew/opt/imagemagick/bin /opt/homebrew/opt/dbus/bin /opt/homebrew/opt/mailutils/bin /opt/homebrew/opt/libgccjit/bin /opt/homebrew/opt/gcc/bin /opt/homebrew/opt/gmp/bin /opt/homebrew/opt/jpeg/bin /opt/homebrew/opt/zlib/bin /opt/homebrew/Library/Homebrew/shims/shared /usr/bin /bin /usr/sbin /sbin ==> which tar /opt/homebrew/opt/gnu-tar/libexec/gnubin/tar ==> which ls /opt/homebrew/opt/coreutils/libexec/gnubin/ls ==> Verifying checksum for 'no-frame-refocus-cocoa.patch' ==> Verifying checksum for 'fix-window-role.patch' ==> Verifying checksum for 'system-appearance.patch' ==> Verifying checksum for 'fix-MAC_LIBS-inference-on-Intel.patch' ==> Verifying checksum for 'elrumo2.icns' ==> Downloading https://ftp.gnu.org/gnu/emacs/emacs-28.1.tar.xz Already downloaded: /Users/jidicula/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz ==> Verifying checksum for '81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz' ==> Installing emacs-plus@28 from d12frosted/emacs-plus PATH value was changed to: /opt/homebrew/opt/make/libexec/gnubin /opt/homebrew/opt/autoconf/libexec/gnubin /opt/homebrew/opt/gnu-sed/libexec/gnubin /opt/homebrew/opt/gnu-tar/libexec/gnubin /opt/homebrew/opt/awk/libexec/gnubin /opt/homebrew/opt/coreutils/libexec/gnubin /opt/homebrew/opt/pkg-config/libexec/gnubin /opt/homebrew/opt/texinfo/libexec/gnubin /opt/homebrew/opt/gnutls/libexec/gnubin /opt/homebrew/opt/librsvg/libexec/gnubin /opt/homebrew/opt/little-cms2/libexec/gnubin /opt/homebrew/opt/jansson/libexec/gnubin /opt/homebrew/opt/imagemagick/libexec/gnubin /opt/homebrew/opt/dbus/libexec/gnubin /opt/homebrew/opt/mailutils/libexec/gnubin /opt/homebrew/opt/libgccjit/libexec/gnubin /opt/homebrew/opt/gcc/libexec/gnubin /opt/homebrew/opt/gmp/libexec/gnubin /opt/homebrew/opt/jpeg/libexec/gnubin /opt/homebrew/opt/zlib/libexec/gnubin /opt/homebrew/opt/make/bin /opt/homebrew/opt/autoconf/bin /opt/homebrew/opt/gnu-sed/bin /opt/homebrew/opt/gnu-tar/bin /opt/homebrew/opt/awk/bin /opt/homebrew/opt/coreutils/bin /opt/homebrew/opt/pkg-config/bin /opt/homebrew/opt/texinfo/bin /opt/homebrew/opt/gnutls/bin /opt/homebrew/opt/librsvg/bin /opt/homebrew/opt/little-cms2/bin /opt/homebrew/opt/jansson/bin /opt/homebrew/opt/imagemagick/bin /opt/homebrew/opt/dbus/bin /opt/homebrew/opt/mailutils/bin /opt/homebrew/opt/libgccjit/bin /opt/homebrew/opt/gcc/bin /opt/homebrew/opt/gmp/bin /opt/homebrew/opt/jpeg/bin /opt/homebrew/opt/zlib/bin /opt/homebrew/Library/Homebrew/shims/shared /usr/bin /bin /usr/sbin /sbin ==> which tar /opt/homebrew/opt/gnu-tar/libexec/gnubin/tar ==> which ls /opt/homebrew/opt/coreutils/libexec/gnubin/ls PATH value was changed to: /opt/homebrew/opt/make/libexec/gnubin /opt/homebrew/opt/autoconf/libexec/gnubin /opt/homebrew/opt/gnu-sed/libexec/gnubin /opt/homebrew/opt/gnu-tar/libexec/gnubin /opt/homebrew/opt/awk/libexec/gnubin /opt/homebrew/opt/coreutils/libexec/gnubin /opt/homebrew/opt/pkg-config/libexec/gnubin /opt/homebrew/opt/texinfo/libexec/gnubin /opt/homebrew/opt/gnutls/libexec/gnubin /opt/homebrew/opt/librsvg/libexec/gnubin /opt/homebrew/opt/little-cms2/libexec/gnubin /opt/homebrew/opt/jansson/libexec/gnubin /opt/homebrew/opt/imagemagick/libexec/gnubin /opt/homebrew/opt/dbus/libexec/gnubin /opt/homebrew/opt/mailutils/libexec/gnubin /opt/homebrew/opt/libgccjit/libexec/gnubin /opt/homebrew/opt/gcc/libexec/gnubin /opt/homebrew/opt/gmp/libexec/gnubin /opt/homebrew/opt/jpeg/libexec/gnubin /opt/homebrew/opt/zlib/libexec/gnubin /opt/homebrew/opt/make/bin /opt/homebrew/opt/autoconf/bin /opt/homebrew/opt/gnu-sed/bin /opt/homebrew/opt/gnu-tar/bin /opt/homebrew/opt/awk/bin /opt/homebrew/opt/coreutils/bin /opt/homebrew/opt/pkg-config/bin /opt/homebrew/opt/texinfo/bin /opt/homebrew/opt/gnutls/bin /opt/homebrew/opt/librsvg/bin /opt/homebrew/opt/little-cms2/bin /opt/homebrew/opt/jansson/bin /opt/homebrew/opt/imagemagick/bin /opt/homebrew/opt/dbus/bin /opt/homebrew/opt/mailutils/bin /opt/homebrew/opt/libgccjit/bin /opt/homebrew/opt/gcc/bin /opt/homebrew/opt/gmp/bin /opt/homebrew/opt/jpeg/bin /opt/homebrew/opt/zlib/bin /opt/homebrew/Library/Homebrew/shims/shared /usr/bin /bin /usr/sbin /sbin ==> which tar /opt/homebrew/opt/gnu-tar/libexec/gnubin/tar ==> which ls /opt/homebrew/opt/coreutils/libexec/gnubin/ls tar --extract --no-same-owner --file /Users/jidicula/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz --directory /private/tmp/d20220805-49813-ybrbtl cp -pR /private/tmp/d20220805-49813-ybrbtl/emacs-28.1/. /private/tmp/emacs-plusA28-20220805-49813-k93k2x/emacs-28.1 chmod -Rf +w /private/tmp/d20220805-49813-ybrbtl ==> Patching cp -p /opt/homebrew/Library/Taps/d12frosted/homebrew-emacs-plus/patches/emacs-28/no-frame-refocus-cocoa.patch /private/tmp/emacs-plusA28--patch-20220805-49813-18kjlxt/no-frame-refocus-cocoa.patch ==> Applying no-frame-refocus-cocoa.patch patch -g 0 -f -p1 -i /private/tmp/emacs-plusA28--patch-20220805-49813-18kjlxt/no-frame-refocus-cocoa.patch patching file src/frame.c Hunk #1 succeeded at 2118 (offset 62 lines). cp -p /opt/homebrew/Library/Taps/d12frosted/homebrew-emacs-plus/patches/emacs-28/fix-window-role.patch /private/tmp/emacs-plusA28--patch-20220805-49813-1vhjp6l/fix-window-role.patch ==> Applying fix-window-role.patch patch -g 0 -f -p1 -i /private/tmp/emacs-plusA28--patch-20220805-49813-1vhjp6l/fix-window-role.patch patching file src/nsterm.m Hunk #1 succeeded at 8583 (offset -185 lines). cp -p /opt/homebrew/Library/Taps/d12frosted/homebrew-emacs-plus/patches/emacs-28/system-appearance.patch /private/tmp/emacs-plusA28--patch-20220805-49813-1qvni9a/system-appearance.patch ==> Applying system-appearance.patch patch -g 0 -f -p1 -i /private/tmp/emacs-plusA28--patch-20220805-49813-1qvni9a/system-appearance.patch patching file src/frame.h patching file src/nsfns.m Hunk #1 succeeded at 1315 (offset 59 lines). patching file src/nsterm.m Hunk #1 succeeded at 1878 (offset -11 lines). Hunk #2 succeeded at 5389 (offset -6 lines). Hunk #3 succeeded at 5635 (offset -6 lines). Hunk #4 succeeded at 5685 (offset -6 lines). Hunk #5 succeeded at 5911 (offset -6 lines). Hunk #6 succeeded at 8916 (offset 14 lines). Hunk #7 succeeded at 10072 (offset 14 lines). cp -p /opt/homebrew/Library/Taps/d12frosted/homebrew-emacs-plus/patches/emacs-28/fix-MAC_LIBS-inference-on-Intel.patch /private/tmp/emacs-plusA28--patch-20220805-49813-185fy3h/fix-MAC_LIBS-inference-on-Intel.patch ==> Applying fix-MAC_LIBS-inference-on-Intel.patch patch -g 0 -f -p1 -i /private/tmp/emacs-plusA28--patch-20220805-49813-185fy3h/fix-MAC_LIBS-inference-on-Intel.patch patching file configure.ac Hunk #1 succeeded at 3843 (offset -282 lines). PATH value was changed to: /opt/homebrew/opt/make/libexec/gnubin /opt/homebrew/opt/autoconf/libexec/gnubin /opt/homebrew/opt/gnu-sed/libexec/gnubin /opt/homebrew/opt/gnu-tar/libexec/gnubin /opt/homebrew/opt/awk/libexec/gnubin /opt/homebrew/opt/coreutils/libexec/gnubin /opt/homebrew/opt/pkg-config/libexec/gnubin /opt/homebrew/opt/texinfo/libexec/gnubin /opt/homebrew/opt/gnutls/libexec/gnubin /opt/homebrew/opt/librsvg/libexec/gnubin /opt/homebrew/opt/little-cms2/libexec/gnubin /opt/homebrew/opt/jansson/libexec/gnubin /opt/homebrew/opt/imagemagick/libexec/gnubin /opt/homebrew/opt/dbus/libexec/gnubin /opt/homebrew/opt/mailutils/libexec/gnubin /opt/homebrew/opt/libgccjit/libexec/gnubin /opt/homebrew/opt/gcc/libexec/gnubin /opt/homebrew/opt/gmp/libexec/gnubin /opt/homebrew/opt/jpeg/libexec/gnubin /opt/homebrew/opt/zlib/libexec/gnubin /opt/homebrew/opt/make/bin /opt/homebrew/opt/autoconf/bin /opt/homebrew/opt/gnu-sed/bin /opt/homebrew/opt/gnu-tar/bin /opt/homebrew/opt/awk/bin /opt/homebrew/opt/coreutils/bin /opt/homebrew/opt/pkg-config/bin /opt/homebrew/opt/texinfo/bin /opt/homebrew/opt/gnutls/bin /opt/homebrew/opt/librsvg/bin /opt/homebrew/opt/little-cms2/bin /opt/homebrew/opt/jansson/bin /opt/homebrew/opt/imagemagick/bin /opt/homebrew/opt/dbus/bin /opt/homebrew/opt/mailutils/bin /opt/homebrew/opt/libgccjit/bin /opt/homebrew/opt/gcc/bin /opt/homebrew/opt/gmp/bin /opt/homebrew/opt/jpeg/bin /opt/homebrew/opt/zlib/bin /opt/homebrew/opt/gnu-getopt/bin /opt/homebrew/opt/icu4c/bin /opt/homebrew/opt/jpeg-turbo/bin /opt/homebrew/opt/[email protected]/bin /opt/homebrew/opt/readline/bin /opt/homebrew/opt/m4/bin /opt/homebrew/opt/libffi/bin /opt/homebrew/Library/Homebrew/shims/shared /Users/jidicula/.rbenv/shims /opt/homebrew/Cellar/pyenv-virtualenv/1.1.5/shims /Users/jidicula/.pyenv/shims /Users/jidicula/.dotnet/tools /Users/jidicula/.rbenv/bin /Users/jidicula/.nodenv/shims /Users/jidicula/.nodenv/bin /Users/jidicula/.pyenv/bin /usr/local/opt/openjdk@11/bin /Users/jidicula/.local/bin /opt/homebrew/bin /opt/homebrew/sbin /usr/local/sbin /usr/local/bin /opt/X11/bin /Library/TeX/texbin /Users/jidicula/go/bin /usr/local/plan9/bin /usr/bin /bin /usr/sbin /sbin ==> which tar /opt/homebrew/opt/gnu-tar/libexec/gnubin/tar ==> which ls /opt/homebrew/opt/coreutils/libexec/gnubin/ls ==> ImageMagick PKG_CONFIG_PATH: /opt/homebrew/opt/imagemagick/lib/pkgconfig ==> ./autogen.sh Checking whether you have the necessary tools... (Read INSTALL.REPO for more details on building Emacs) Checking for autoconf (need at least version 2.65) ... ok Your system has the required tools. Running 'autoreconf -fi -I m4' ... You can now run './configure'. ==> ./configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp --infodir=/opt/homebrew/Cellar/emacs-plus@28/28.1/share/info/emacs --prefix=/opt/homebrew/Cellar/emacs-plus@28/28.1 --with-xml2 --with-gnutls --with-native-compilation --without-dbus --with-imagemagick --with-modules --with-rsvg --without-pop --with-xwidgets --with-ns --disable-ns-self-contained configure: WARNING: unrecognized options: --disable-dependency-tracking checking for xcrun... xcrun checking for make... yes checking for GNU Make... make checking build system type... aarch64-apple-darwin21.6.0 checking host system type... aarch64-apple-darwin21.6.0 checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether /usr/bin/clang accepts -g... yes checking for /usr/bin/clang option to enable C11 features... none needed checking whether the compiler is clang... yes checking for compiler option needed when checking for declarations... -Werror=implicit-function-declaration checking for ar... ar checking whether /usr/bin/clang and cc understand -c and -o together... yes checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for wchar.h... yes checking for minix/config.h... no checking for linux/fs.h... no checking for malloc.h... no checking for sys/systeminfo.h... no checking for sys/sysinfo.h... no checking for coff.h... no checking for pty.h... no checking for sys/resource.h... yes checking for sys/utsname.h... yes checking for pwd.h... yes checking for utmp.h... yes checking for util.h... yes checking for sanitizer/lsan_interface.h... yes checking for sys/socket.h... yes checking for sys/param.h... yes checking for pthread.h... yes checking for malloc/malloc.h... yes checking for sys/un.h... yes checking for vfork.h... no checking for dirent.h... yes checking for execinfo.h... yes checking for stdio_ext.h... no checking for sys/vfs.h... no checking for sys/fs_types.h... no checking for getopt.h... yes checking for sys/cdefs.h... yes checking for sys/time.h... yes checking for ieee754.h... no checking for limits.h... yes checking for sys/select.h... yes checking for sys/random.h... yes checking whether it is safe to define EXTENSIONS... yes checking whether _XOPEN_SOURCE should be defined... no checking how to run the C preprocessor... /usr/bin/clang -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for Minix Amsterdam compiler... no checking for ranlib... ranlib checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking whether the compiler is clang... yes checking whether C compiler handles -Werror -Wunknown-warning-option... yes checking whether C compiler handles -Wno-switch... yes checking whether C compiler handles -Wno-pointer-sign... yes checking whether C compiler handles -Wno-string-plus-int... yes checking whether C compiler handles -Wno-unknown-attributes... yes checking whether C compiler handles -Wno-initializer-overrides... yes checking whether C compiler handles -Wno-tautological-compare... yes checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... yes checking for a BSD-compatible install... /opt/homebrew/opt/coreutils/libexec/gnubin/install -c checking command to symlink files in the same directory... ln -s checking for install-info... /opt/homebrew/opt/texinfo/bin/install-info checking for gzip... /opt/homebrew/bin/gzip checking for 'find' args to delete a file... -delete checking for brew... brew checking for makeinfo... /opt/homebrew/opt/texinfo/bin/makeinfo checking for port... no checking for -znocombreloc... not needed checking whether addresses are sanitized... no checking for library containing sqrt... none required checking for pkg-config... /opt/homebrew/opt/pkg-config/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for machine/soundcard.h... no checking for sys/soundcard.h... no checking for soundcard.h... no checking for mmsystem.h... no checking for _oss_ioctl in -lossaudio... no checking for alsa >= 1.0.0... no checking for ADDR_NO_RANDOMIZE... no checking for sys/wait.h that is POSIX.1 compatible... yes checking for net/if.h... yes checking for ifaddrs.h... yes checking for net/if_dl.h... yes checking for struct ifreq.ifr_flags... yes checking for struct ifreq.ifr_hwaddr... no checking for struct ifreq.ifr_netmask... no checking for struct ifreq.ifr_broadaddr... yes checking for struct ifreq.ifr_addr... yes checking for struct ifreq.ifr_addr.sa_len... yes checking whether gcc understands -MMD -MF... yes checking for X... libraries , headers checking for AppKit/AppKit.h... yes checking for Mac OS X 10.6 or newer... yes checking whether the compiler supports GNU Objective C... yes checking whether /usr/bin/clang accepts -g... yes checking if the Objective C compiler supports instancetype... yes checking if the Objective C compiler defaults to C99... yes checking whether malloc is Doug Lea style... no checking for sbrk... yes checking for getpagesize... yes checking for __lsan_ignore_object... no checking for fork... yes checking for vfork... yes checking for fchmod... yes checking for canonicalize_file_name... no checking for faccessat... yes checking for realpath... yes checking for lstat... yes checking for readlinkat... yes checking for explicit_bzero... no checking for memset_s... yes checking for fchmodat... yes checking for lchmod... yes checking for fcntl... yes checking for fdopendir... yes checking for fstatat... yes checking for fsync... yes checking for futimens... yes checking for getrandom... no checking for gettimeofday... yes checking for mkostemp... yes checking for pipe2... no checking for pselect... yes checking for pthread_sigmask... yes checking for readlink... yes checking for isblank... yes checking for iswctype... yes checking for strtoimax... yes checking for symlink... yes checking for localtime_r... yes checking for timegm... yes checking for utimensat... yes checking for getdtablesize... yes checking for futimes... yes checking for futimesat... no checking for lutimes... yes checking for working mmap... yes checking for main in -lXbsd... no checking for pthread library... none needed checking for thread support... yes checking for librsvg-2.0 >= 2.14.0... yes checking for MagickWand >= 7... yes checking for MagickRelinquishMemory... yes checking for MagickExportImagePixels... yes checking for MagickMergeImageLayers... yes checking for MagickAutoOrientImage... yes checking for getaddrinfo_a in -lanl... no checking for lgetfilecon in -lselinux... no checking for gnutls >= 2.12.2... yes checking for libsystemd >= 222... no checking for jansson >= 2.7... yes checking for sys/inotify.h... no checking for libkqueue... no checking for library containing kqueue... none required checking for jpeglib 6b or later... -ljpeg checking for lcms2... yes checking for library containing inflateEnd... -lz checking for dladdr... yes checking for dlfunc... no 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.

==> Formula Tap: d12frosted/emacs-plus Path: /opt/homebrew/Library/Taps/d12frosted/homebrew-emacs-plus/Formula/[email protected] ==> Configuration HOMEBREW_VERSION: 3.5.8 ORIGIN: https://github.com/Homebrew/brew HEAD: ff9c2500195cc357d4a06f99d462f8d8a5d37892 Last commit: 2 hours ago Core tap ORIGIN: https://github.com/Homebrew/homebrew-core Core tap HEAD: 175c052d2f820ae23db10af0fa846c99a014491f Core tap last commit: 8 minutes ago Core tap branch: master HOMEBREW_PREFIX: /opt/homebrew HOMEBREW_CASK_OPTS: [] HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.eZ6nSDv6Ln/org.xquartz:0 HOMEBREW_EDITOR: /usr/bin/env emacs HOMEBREW_GITHUB_API_TOKEN: set HOMEBREW_MAKE_JOBS: 10 Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby CPU: 10-core 64-bit arm_firestorm_icestorm Clang: 13.1.6 build 1316 Git: 2.37.1 => /opt/homebrew/bin/git Curl: 7.79.1 => /usr/bin/curl macOS: 12.5-arm64 CLT: 13.4.0.0.1.1651278267 Xcode: 13.4.1 Rosetta 2: false ==> ENV CC: /usr/bin/clang CXX: /usr/bin/clang++ OBJC: /usr/bin/clang OBJCXX: /usr/bin/clang++ CFLAGS: -Os -w -pipe -mmacosx-version-min=12 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk CXXFLAGS: -Os -w -pipe -mmacosx-version-min=12 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk CPPFLAGS: -I/opt/homebrew/opt/zlib/include -I/opt/homebrew/opt/icu4c/include -I/opt/homebrew/opt/jpeg-turbo/include -I/opt/homebrew/opt/[email protected]/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/libffi/include -isystem/opt/homebrew/include -F/opt/homebrew/Frameworks -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk LDFLAGS: -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/icu4c/lib -L/opt/homebrew/opt/jpeg-turbo/lib -L/opt/homebrew/opt/[email protected]/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/libffi/lib -L/opt/homebrew/lib -F/opt/homebrew/Frameworks -Wl,-headerpad_max_install_names -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk MAKEFLAGS: -j10 CMAKE_PREFIX_PATH: /opt/homebrew/opt/zlib:/opt/homebrew/opt/gnu-getopt:/opt/homebrew/opt/icu4c:/opt/homebrew/opt/jpeg-turbo:/opt/homebrew/opt/[email protected]:/opt/homebrew/opt/readline:/opt/homebrew/opt/m4:/opt/homebrew/opt/libffi:/opt/homebrew/opt/texinfo:/opt/homebrew:/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr CMAKE_FRAMEWORK_PATH: /opt/homebrew/Frameworks:/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks PKG_CONFIG_PATH: /opt/homebrew/opt/imagemagick/lib/pkgconfig:/opt/homebrew/opt/zlib/share/pkgconfig:/opt/homebrew/opt/zlib/lib/pkgconfig:/opt/homebrew/opt/gnu-getopt/share/pkgconfig:/opt/homebrew/opt/gnu-getopt/lib/pkgconfig:/opt/homebrew/opt/icu4c/share/pkgconfig:/opt/homebrew/opt/icu4c/lib/pkgconfig:/opt/homebrew/opt/jpeg-turbo/share/pkgconfig:/opt/homebrew/opt/jpeg-turbo/lib/pkgconfig:/opt/homebrew/opt/[email protected]/share/pkgconfig:/opt/homebrew/opt/[email protected]/lib/pkgconfig:/opt/homebrew/opt/readline/share/pkgconfig:/opt/homebrew/opt/readline/lib/pkgconfig:/opt/homebrew/opt/m4/share/pkgconfig:/opt/homebrew/opt/m4/lib/pkgconfig:/opt/homebrew/opt/libffi/share/pkgconfig:/opt/homebrew/opt/libffi/lib/pkgconfig:/opt/homebrew/opt/texinfo/share/pkgconfig:/opt/homebrew/opt/texinfo/lib/pkgconfig PKG_CONFIG_LIBDIR: /opt/homebrew/lib/pkgconfig:/opt/homebrew/share/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/12:/usr/lib/pkgconfig HOMEBREW_GIT: git ACLOCAL_PATH: /opt/homebrew/opt/zlib/share/aclocal:/opt/homebrew/opt/gnu-getopt/share/aclocal:/opt/homebrew/opt/icu4c/share/aclocal:/opt/homebrew/opt/jpeg-turbo/share/aclocal:/opt/homebrew/opt/[email protected]/share/aclocal:/opt/homebrew/opt/readline/share/aclocal:/opt/homebrew/opt/m4/share/aclocal:/opt/homebrew/opt/libffi/share/aclocal:/opt/homebrew/opt/texinfo/share/aclocal PATH: /opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/make/bin:/opt/homebrew/opt/autoconf/bin:/opt/homebrew/opt/gnu-sed/bin:/opt/homebrew/opt/gnu-tar/bin:/opt/homebrew/opt/awk/bin:/opt/homebrew/opt/coreutils/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/texinfo/bin:/opt/homebrew/opt/gnutls/bin:/opt/homebrew/opt/librsvg/bin:/opt/homebrew/opt/little-cms2/bin:/opt/homebrew/opt/imagemagick/bin:/opt/homebrew/opt/dbus/bin:/opt/homebrew/opt/mailutils/bin:/opt/homebrew/opt/gcc/bin:/opt/homebrew/opt/jpeg/bin:/opt/homebrew/opt/gnu-getopt/bin:/opt/homebrew/opt/icu4c/bin:/opt/homebrew/opt/jpeg-turbo/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/opt/m4/bin:/opt/homebrew/Library/Homebrew/shims/shared:/Users/jidicula/.rbenv/shims:/opt/homebrew/Cellar/pyenv-virtualenv/1.1.5/shims:/Users/jidicula/.pyenv/shims:/Users/jidicula/.dotnet/tools:/Users/jidicula/.nodenv/shims:/Users/jidicula/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/sbin:/usr/local/bin:/opt/X11/bin:/Library/TeX/texbin:/Users/jidicula/go/bin:/usr/bin:/bin:/usr/sbin:/sbin CPATH: /opt/homebrew/include:/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include

Error: d12frosted/emacs-plus/emacs-plus@28 28.1 did not build Logs: /Users/jidicula/Library/Logs/Homebrew/emacs-plus@28/02.which /Users/jidicula/Library/Logs/Homebrew/emacs-plus@28/04.which /Users/jidicula/Library/Logs/Homebrew/emacs-plus@28/00.options.out /Users/jidicula/Library/Logs/Homebrew/emacs-plus@28/03.which /Users/jidicula/Library/Logs/Homebrew/emacs-plus@28/01.which /Users/jidicula/Library/Logs/Homebrew/emacs-plus@28/05.autogen.sh /Users/jidicula/Library/Logs/Homebrew/emacs-plus@28/06.configure /Users/jidicula/Library/Logs/Homebrew/emacs-plus@28/config.log Do not report this issue to Homebrew/brew or Homebrew/core!

/opt/homebrew/Library/Homebrew/utils/github/api.rb:289:in `raise_error': GitHub API Error: Bad credentials (GitHub::API::AuthenticationFailedError)

Note that the final error about an API token is irrelevant to this issue - I've disabled the GitHub PAT on my machine because of work restrictions.

Output of brew config

$ brew config
HOMEBREW_VERSION: 3.5.8
ORIGIN: https://github.com/Homebrew/brew
HEAD: ff9c2500195cc357d4a06f99d462f8d8a5d37892
Last commit: 2 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 175c052d2f820ae23db10af0fa846c99a014491f
Core tap last commit: 11 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.eZ6nSDv6Ln/org.xquartz:0
HOMEBREW_EDITOR: /usr/bin/env emacs
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 13.1.6 build 1316
Git: 2.37.1 => /opt/homebrew/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.5-arm64
CLT: 13.4.0.0.1.1651278267
Xcode: 13.4.1
Rosetta 2: false

Output of brew doctor

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Putting non-prefixed coreutils in your path can cause GMP builds to fail.

I don't think this warning is relevant, it's a result of my mitigation for #466 .

jidicula avatar Aug 05 '22 16:08 jidicula

I suspect that the libgccjit update breaks something in the emacs-plus formula. For now, I'll try to downgrade libgccjit and attempt rebuilding.

jidicula avatar Aug 05 '22 16:08 jidicula

I just came across this error. Will be looking for your update on downgrading libgccjit.

slidesecurity avatar Aug 05 '22 16:08 slidesecurity

Seems to be related to gcc updating to 12.1.0 too in homebrew/homebrew-core#106755. I'll try downgrading libgccjit, but I suspect I'll also have to downgrade gcc too, which will probably be challenging 😬.

jidicula avatar Aug 05 '22 17:08 jidicula

@slidesecurity here's how to downgrade:

I didn't attempt to not downgrade gcc - I'm betting that gcc 12.1.0 breaks stuff in libgccjit 11.3.0_1 so I opted to downgrade both, re-install emacs-plus, then pin all 3 formulae for now.

brew uninstall emacs-plus
cd "$(brew --prefix)/Library/Taps/homebrew/homebrew-core/Formula"
brew uninstall libgccjit gcc # in case you already had the updated gcc and libgccjit installed
git log libgccjit.rb # examine recent commits for libgccjit.rb
git reset --hard 9ae475cc6c82beaa61402dcfffdea5c75f321d4a # reset clone to last known-good commit for libgccjit
git checkout -b libgccjit-downgrade-11.3.0_1 # prevent brew from autorefreshing local master
brew install libgccjit gcc
brew install emacs-plus # with options
brew pin libgccjit gcc emacs-plus
git checkout master
brew update

Generalized answer at https://stackoverflow.com/a/73254186/6310633 (feel free to upvote 😁)

jidicula avatar Aug 05 '22 18:08 jidicula

@jidicula Johanan, you just saved hours of frustration for so many people. Thank you for being so awesome!

agzam avatar Aug 05 '22 19:08 agzam

@jidicula You are a life saver. I followed your steps and I have Emacs running again. Infinite thanks!

maikol-solis avatar Aug 06 '22 00:08 maikol-solis

Thanks a lot. I had to run brew uninstall libgccjit gcc instead of brew unlink libgccjit gcc to make it work for me.

helinwang avatar Aug 06 '22 15:08 helinwang

Wow. I just have to say that I am happy to be part of this community 🤗 You folks rock!


@jidicula thanks for sharing your workaround 💯


@bkmit sent a PR that is now in master. It should fix emacs-plus@28 with native comp. Please give it a try and let me know if it doesn't work.


On my side I am upgrading my local machine to be able to test @28 and @29 with native compilation.

d12frosted avatar Aug 09 '22 06:08 d12frosted

See #492 for similar fix for emacs-plus@29.

d12frosted avatar Aug 09 '22 06:08 d12frosted

I am pinning this issue untill we fix compilation with nativecomp feature for Emacs 28 and Emacs 29. Fix for Emacs 28 is in master now, fix for Emacs 29 is in #492 (will merge as soon as it becomes green).

I will close once I get enough confirmations that it works for both versions.

Please use this issue to report anything related to libgccjit discovery. I am closing all other duplicates.

d12frosted avatar Aug 09 '22 06:08 d12frosted

#492 is merged. In order to test it, performa a combination of brew update and brew install emacs-plus@29 --with-native-comp [options]. Let me know if it doesn't work.

d12frosted avatar Aug 09 '22 07:08 d12frosted

Just tried. Failed once and then built on second try of brew uninstall emacs-plus@29; brew install emacs-plus@29 --with-native-comp.

edit: just for fun I tried a couple more times and got two more fails and one build

cdlm avatar Aug 09 '22 10:08 cdlm

Testing installation of emacs-plus@29.

  • First run: emacs was installed but with the following error:
Error: Failed changing dylib ID of /usr/local/Cellar/emacs-plus@29/29.0.50/Emacs.app/Contents/native-lisp/29.0.50-e74539fe/preloaded/map-ynp-990591b5-b3ff66a7.eln
  from map-ynp-990591b5-b3ff66a7.eln
    to /usr/local/opt/emacs-plus@29/Emacs.app/Contents/native-lisp/29.0.50-e74539fe/preloaded/map-ynp-990591b5-b3ff66a7.eln
Error: Failed to fix install linkage
The formula built, but you may encounter issues using it or linking other
formulae against it.
  • Second run: emacs wasn't installed:
==> ./configure --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-plus@29/29.0.50/share/info/emacs --prefix=/usr/local/
Last 15 lines from /Users/romanrudakov/Library/Logs/Homebrew/emacs-plus@29/02.configure:
checking for libsystemd >= 222... no
checking for jansson >= 2.7... yes
checking for sys/inotify.h... no
checking for libkqueue... no
checking for library containing kqueue... none required
checking for jpeglib 6b or later... -ljpeg
checking for lcms2... yes
checking for library containing inflateEnd... -lz
checking for dladdr... yes
checking for dlfunc... no
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.

Do not report this issue to Homebrew/brew or Homebrew/core!

These open issues may also help:
Could not install emacs-plus@28 because tar can't find xz  https://github.com/d12frosted/homebrew-emacs-plus/issues/481
  • third run: the same as the first one.

Despite linkage error, emacs seems to be working fine.

roman-rudakov avatar Aug 10 '22 08:08 roman-rudakov

Same for me.

Despite linkage error, emacs seems to be working fine

liangyungong avatar Aug 10 '22 09:08 liangyungong

Thanks for testing. Frankly I am disapointed by flakiness and amount of errors related to native compilation.

Will check the linkage error in the evening. Just curious of it's M1 or Intel. Seems like Intel to me.

d12frosted avatar Aug 10 '22 09:08 d12frosted

@d12frosted I'm on Intel

roman-rudakov avatar Aug 10 '22 09:08 roman-rudakov

It works on Apple Silicon here.

ngn999 avatar Aug 10 '22 09:08 ngn999

@roman-rudakov that's what I though. I am on M1 and it works for me like it works for @ngn999. Will try to get my hands on an intel mac to fix linking there as well.

d12frosted avatar Aug 10 '22 10:08 d12frosted

➕ Intel.

liangyungong avatar Aug 10 '22 11:08 liangyungong

Flakiness on M1 here 😅

cdlm avatar Aug 10 '22 11:08 cdlm

I have an Intel Mac. I unpinned gcc, libgccjit and uninstalled emacs-plus 28. When I tried to install emacs, I had the problem with the gcc linking. My workaround was brew uninstall gcc --ignore-dependencies and then install again gcc with the newest formula.

Then, reinstall, libgccjit, xz and install emacs-plus with your favorite flags.

For the moment everything is working fine so far.

maikol-solis avatar Aug 10 '22 12:08 maikol-solis

Will try to get my hands on an intel mac to fix linking there as well.

@d12frosted the loop might be a bit longer, but the GH Actions macOS runner is an Intel mac if you're not able to get your hands on a physical one easily.

jidicula avatar Aug 10 '22 18:08 jidicula

The problem is that the build was green all the time. As well as now.

On Wed, Aug 10, 2022 at 21:49, Johanan Idicula @.***> wrote:

Will try to get my hands on an intel mac to fix linking there as well.

@.***(https://github.com/d12frosted) the loop might be a bit longer, but the GH Actions macOS runner is an Intel mac if you're not able to get your hands on a physical one easily.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

d12frosted avatar Aug 10 '22 19:08 d12frosted

For reference: M1 silicon here -- even with the new patch, I've seen cases where I get the missing libgccjit build failure, even when LIBRARY_PATH was set to /opt/homebrew/lib, but if I run it a second time w/out touching anything else, it then succeeds and completes normally (afaict -- the build works).

sfraize avatar Aug 10 '22 23:08 sfraize

Now the CI is also red - https://github.com/d12frosted/homebrew-emacs-plus/runs/7871058887?check_suite_focus=true#step:4:210

d12frosted avatar Aug 17 '22 04:08 d12frosted

fwiw, i am running into this problem as well. i tried the downgrade fix that was suggested here, but it didn't work for me.

one thing i found is that libgccjit does get found when i run configure from an interactive shell via brew install -i emacs-plus@29. whatever environment is being used by my interactive shell is not the same as what homebrew normally builds with. i'm having trouble figuring out how to get a dump from homebrew's build environment to pin point the difference.

but, because i don't know all the steps the formula takes to build & install emacs, i didn't feel great doing everything from the interactive shell, so i stopped there.

visigoth avatar Aug 24 '22 03:08 visigoth

M1 macOS 12.1 here - I just did a successful clean install of libgccjit, gcc, and emacs-plus@29 --with-ctags --with-native-comp --without-cocoa

ghost avatar Aug 25 '22 06:08 ghost

@visigoth you may try again after commenting/removing this line:

https://github.com/d12frosted/homebrew-emacs-plus/blob/916b1a4d62e9d2d32020d6219d5c5b2226b58da3/Formula/emacs-plus%4029.rb#L6

d12frosted avatar Aug 25 '22 06:08 d12frosted

Intel MacOS 12.5. Direct brew install emacs-plus@28 --HEAD --with-native-comp leads to the same error with libgccjit.

brew uninstall libgccjit gcc and then brew install emacs-plus@28 --with-native-comp solved the problem.

quarkquartet avatar Aug 26 '22 23:08 quarkquartet

@slidesecurity here's how to downgrade:

I didn't attempt to not downgrade gcc - I'm betting that gcc 12.1.0 breaks stuff in libgccjit 11.3.0_1 so I opted to downgrade both, re-install emacs-plus, then pin all 3 formulae for now.

brew uninstall emacs-plus
cd "$(brew --prefix)/Library/Taps/homebrew/homebrew-core/Formula"
brew uninstall libgccjit gcc # in case you already had the updated gcc and libgccjit installed
git log libgccjit.rb # examine recent commits for libgccjit.rb
git reset --hard 9ae475cc6c82beaa61402dcfffdea5c75f321d4a # reset clone to last known-good commit for libgccjit
git checkout -b libgccjit-downgrade-11.3.0_1 # prevent brew from autorefreshing local master
brew install libgccjit gcc
brew install emacs-plus # with options
brew pin libgccjit gcc emacs-plus
git checkout master
brew update

Generalized answer at https://stackoverflow.com/a/73254186/6310633 (feel free to upvote 😁)

Thanks. I follow these procedures on 1.Macbook pro retina intel + macOS Big Sur 11.6.8 + xcode cli xcode-select version 2384 2.Mac mini M1 + macOS Monterey 12.5.1 + xcode cli xcode-select version 2395

Same errors output of both above:

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.

Solution: use brew install libgccjit --build-from-source --force instead of brew install libgccjit gcc Finally succeed!

chu- avatar Aug 29 '22 12:08 chu-