homebrew-emacs-plus: Installation fails with libgccjit (and possibly gcc) 12.1.0 recent release
Please make sure to follow these steps (and mark the checkboxes):
- run
brew updateand try to reproduce the issue again - run
brew doctor, fix all issues and try to reproduce your issue again - run
brew configandbrew doctorand 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/openssl@1.1/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/emacs-plus@28.rb ==> 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/openssl@1.1/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/openssl@1.1/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/openssl@1.1:/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/openssl@1.1/share/pkgconfig:/opt/homebrew/opt/openssl@1.1/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/openssl@1.1/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/openssl@1.1/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 .
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 7
- Comments: 58 (21 by maintainers)
Commits related to this issue
- fix(native-comp): Add libgccjit paths to build environment When installed with Homebrew, libgccjit 12 writes header files to the Homebrew `include` directory and DLLs to Homebrew's `lib/gcc/current` ... — committed to jidicula/homebrew-emacs-plus by jidicula 2 years ago
- ci: Re-enable native comp in build matrix for 29 and 30 Since this PR addresses the breakage with native compilation build flags, we can now re-enable this flag in the CI build matrix to verify the f... — committed to jidicula/homebrew-emacs-plus by jidicula 2 years ago
- fix(native-comp): Add libgccjit paths to build environment When installed with Homebrew, libgccjit 12 writes header files to the Homebrew `include` directory and DLLs to Homebrew's `lib/gcc/current` ... — committed to d12frosted/homebrew-emacs-plus by jidicula 2 years ago
- ci: Re-enable native comp in build matrix for 29 and 30 Since this PR addresses the breakage with native compilation build flags, we can now re-enable this flag in the CI build matrix to verify the f... — committed to d12frosted/homebrew-emacs-plus by jidicula 2 years ago
@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.
Generalized answer at https://stackoverflow.com/a/73254186/6310633 (feel free to upvote 😁)
hi all, i was able to get emacs 29 with native comp built on an M1 mac running Ventura with the following:
Clean up existing installation and build artifacts
Install latest libgccjit and symlink
<small>Note: this is using libgccjit version 12 at the time of writing.</small>
Install emacs-plus
Thanks to @jidicula we have a fix in master. Please do
brew updateand give it a try. Thanks everyone!@jidicula Johanan, you just saved hours of frustration for so many people. Thank you for being so awesome!
Worked on M1 Mac with:
The last step fails when it isn’t passed
LIBRARY_PATH. I suppose I should add this variable setting to my dotfiles 😁edit: doesn’t seem to work consistently on all my machines… continuing to troubleshoot, but the above at least worked on one of my machines
Update from me:
brew install emacs-plus@30 --with-native-comp --without-cocoasucceeds on a fresh install of MacOS Ventura 13.1 without any additional steps 👍I confirm the above steps also worked for me on a M1 Mac running Ventura.
Adding
ENV.append "LIBRARY_PATH", "#{HOMEBREW_PREFIX}/lib"at line 120 ofemacs-plus@28seems to fix this problem for Emacs 28.2, too: mybrew upgradesuceeds with that change.Actually, I think it may be more straightforward to just modify the formulae here with something like:
rather than modifying the homebrew-core libgccjit formula to add an extra linkage step.
I also just did a re-read of this thread and realized that @rprimus already found this solution 🙂
For me, native-comp offers noticeable improvements in performance when opening files or working in larger codebases, particularly with any hooks, linting etc…
I understand we can downgrade the
gcctoolchain but this shouldn’t really be considered a viable option as it will break any tools on your system that have been built against the current installed version.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
@28and@29with native compilation.@jidicula PR is welcome 😃
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-cocoaThanks a lot. I had to run
brew uninstall libgccjit gccinstead ofbrew unlink libgccjit gccto make it work for me.Shouldn’t there be a
$in front of(brew --prefix)?The method @andrew-hm gave recently in https://github.com/d12frosted/homebrew-emacs-plus/issues/485#issuecomment-1314550854 above worked for me yesterday on an M1 mac (~Big Sur~ Montery) with Emacs 29 and Xcode 13.4.1. I did not do the symlinking step.
It looks like I just got bad luck and got hit by this issue https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-10/msg01805.html
Fix is already on master, will try again later, as I’m currently building Emacs from source (no emacs-plus)
@d12frosted When I compiled with gcc I wasn’t able to get my golang lsp working. After running into this problem, I dropped the compile and it started working fine.
I haven’t noticed anything substantial wrt performance improvements on my M1 Air. +1 for the JIT warning annoyance
Hi everyone. Sorry for not tackling this issue. I just don’t have enough time and mental power to dig into it. Hopefully, I will get back to it soon.
Meanwhile, I am really curious, does anyone notice real performance improvements with native comp? In my experience it didn’t improve performance during daily tasks, but added new troubles due to JIT popping in the most inappropriate time (e.g. when I am on a meeting or presenting something), despite me compiling everything (?).
Intel MacOS 12.5. Direct
brew install emacs-plus@28 --HEAD --with-native-compleads to the same error withlibgccjit.brew uninstall libgccjit gccand thenbrew install emacs-plus@28 --with-native-compsolved the problem.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:
It works on Apple Silicon here.
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
#492 is merged. In order to test it, performa a combination of
brew updateandbrew install emacs-plus@29 --with-native-comp [options]. Let me know if it doesn’t work.@jidicula You are a life saver. I followed your steps and I have Emacs running again. Infinite thanks!