Homebrew-emacs-plus: Could not run doom sync with native-comp option on Big Sur

Created on 22 Dec 2020  路  14Comments  路  Source: d12frosted/homebrew-emacs-plus

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

Kicking the tires on the newly merged --with-native-comp option, I ran doom sync to compile eln modules and it errors at the compilation step. I'm reporting it here because if I use the native-comp branch and compile by hand, eln works and compiles.

What happened (include command output)

$ brew install emacs-plus@28 --with-xwidgets --with-dbus --with-native-comp --with-modern-icon


Command output

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 63 formulae.
==> Updated Casks
Updated 3 casks.

Warning: Calling depends_on :x11 is deprecated! Use depends_on specific X11 formula(e) instead.
Please report this issue to the d12frosted/emacs-plus tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
/usr/local/Homebrew/Library/Taps/d12frosted/homebrew-emacs-plus/Formula/[email protected]:38

==> Installing emacs-plus@28 from d12frosted/emacs-plus
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/fe10dba71a5a9f8fef6f4534268970b2b0ae0f941e515daed7ae88465083c287--fix-window-role.patch
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/aaa0da80d33eac9e551adf7faf404e565c71e86c02ea4659200474fd6d899f5a--system-appearance.patch
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/eb27034a93614c5890164569ad3b62ac58e76ef0a01d1f002c60dfcbb56826a1--EmacsIcon1.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/03c143a12e03202b37c1696cf3dd9d535d0d9685573d963b9a88b53b35b7f04d--EmacsIcon2.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/cc36835b90ae3f5dceeca486c1a748f238462e426b74c3500d96499052c93690--EmacsIcon3.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/789430283b2f795681c720a0c362df3cc55079d1bbeb6089aa8f158b7b305618--EmacsIcon4.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/458acac289e84e1923d0ab03c395997504a099e30a2d3662c2273cc16c5cd942--EmacsIcon5.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/35327c618b96cea3422d45fde52bfad20baebe56da44a7de1a9914c5f0a1b498--EmacsIcon6.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/c71daceea95ff60aa80b3b47e23382a39ed74f2a52cabd9b5f4ca6291a22b1c8--EmacsIcon7.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/b9701777d059c3427883063797b3c3e941d9f641cad5a16765453f07a4ab87ae--EmacsIcon8.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/0fd1ae80eefa53745a88715dd48db9dd28fab876d835e5946890b524efe92c6b--EmacsIcon9.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/4c84a8ed282f7fe6c9af801f51f14664baba413054ac1c576925443dca653a0b--emacs-card-blue-deep.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/f2b8c760dc98d9d177434e6648c621a198d9aaf0337ed03f7e4a2d9b160294bf--emacs-card-british-racing-green.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/1435824e93396928ca6c6acf566f957c0182b284b90426a37087fbb9ca9f071b--emacs-card-carmine.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/e58c484668bff6062f7f094f6af7252073247fd3c65ab18f0b35639559348133--emacs-card-green.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/5d0c663d4bf52e83f87a92a70e3dd140bedae40bfe5a4f26622e179d3f848921--spacemacs.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/4c78c128a04ac996f8d64efae68c4a34c9f84b1187e5ad208f38b94970d6f837--gnu-head.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/0249aa043c1318a5ca14c31678f7bed8dd3f09ecde5879aefe5e342eaa87b80b--retro-sink-bw.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/9ba6c9a4b2f3e9befac6f948f756a407897f90e6c6c96c43be08ac4f634eab5f--retro-sink.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/793faf4d8801cdcff99373bedbad455953884ba9c17937b7823a66e5b4982398--modern.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/c0d37433bcdfbdcbd7e18f8b36b38cdaf7c67162f5f9573a4149af63caddaea4--modern-cg433n.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/5cbf20baac2387bef1d6767368d19a7ef8116565a073eba568dbdeccf73dcd31--modern-sjrmanning.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/d85501e5117cc403635bb2737469ad662f2071a1d74010e59fc9caad73a665e9--modern-sexy-v1.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/ef2c0ceac372ee40737bee87eab114f55cd0e710b18a09bcdc90b1cc03d27956--modern-sexy-v2.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/7e2958ba4ce880c4d4f9ffa884c3e015e8d18a93790b9e5205d531185cddaf39--modern-papirus.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/0a31431f197b7a4fb3cf2c5c5e7f15e52b1716ee58dd84607453f91c2fa32794--modern-pen.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/533a176691034506a845c226c49e4ebd5c363d07faea64b03aec28df102a1ac6--modern-black-variant.icns
==> Downloading https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus
Already downloaded: /Users/sean/Library/Caches/Homebrew/downloads/468b091e9e23644d724881b3ff4850a80d54d09d78b2feefc49a9257cf272147--modern-nuvola.icns
==> Cloning https://github.com/emacs-mirror/emacs.git
Updating /Users/sean/Library/Caches/Homebrew/emacs-plus@28--git
==> Checking out branch feature/native-comp
Your branch is up to date with 'origin/feature/native-comp'.
Already on 'feature/native-comp'
HEAD is now at 433ae7b0a5 Fix --with-nativecomp Windows build (bug#45303)
Warning: Calling depends_on :x11 is deprecated! Use depends_on specific X11 formula(e) instead.
Please report this issue to the d12frosted/emacs-plus tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
/usr/local/Homebrew/Library/Taps/d12frosted/homebrew-emacs-plus/Formula/[email protected]:38

==> Patching
==> Applying fix-window-role.patch
patching file src/nsterm.m
Hunk #1 succeeded at 8796 (offset 28 lines).
==> Applying system-appearance.patch
patching file src/frame.h
patching file src/nsfns.m
patching file src/nsterm.m
Hunk #1 succeeded at 2193 (offset -1 lines).
Hunk #2 succeeded at 5749 (offset -2 lines).
Hunk #3 succeeded at 5995 (offset -2 lines).
Hunk #4 succeeded at 6045 (offset -2 lines).
Hunk #5 succeeded at 6271 (offset -2 lines).
Hunk #6 succeeded at 9127 (offset -5 lines).
Hunk #7 succeeded at 10009 (offset -5 lines).
==> ImageMagick PKG_CONFIG_PATH:
/usr/local/opt/imagemagick/lib/pkgconfig
==> ./autogen.sh
==> ./configure --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodi
==> make
==> make install
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
==> Change dylib_id of ELN files before post_install phase
Warning: Calling depends_on :x11 is deprecated! Use depends_on specific X11 formula(e) instead.
Please report this issue to the d12frosted/emacs-plus tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
/usr/local/Homebrew/Library/Taps/d12frosted/homebrew-emacs-plus/Formula/[email protected]:38

==> Caveats
Emacs.app was installed to:
/usr/local/opt/emacs-plus@28

To link the application to default Homebrew App location:
ln -s /usr/local/opt/emacs-plus@28/Emacs.app /Applications

To have launchd start d12frosted/emacs-plus/emacs-plus@28 now and restart at login:
brew services start d12frosted/emacs-plus/emacs-plus@28
Or, if you don't want/need a background service you can just run:
emacs
==> Summary
馃嵑 /usr/local/Cellar/emacs-plus@28/28.0.50: 4,176 files, 154.9MB, built in 14 minutes 13 seconds


Output of brew config

$ brew config
HOMEBREW_VERSION: 2.7.0
ORIGIN: https://github.com/Homebrew/brew
HEAD: 993bf95877143afe1cede022083499e0b4fe336c
Last commit: 2 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: a34d217780851ca27702adb6322b92e5d751ac64
Core tap last commit: 17 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: emacsclient
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit kabylake
Clang: 12.0 build 1200
Git: 2.29.2 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 11.1-x86_64
CLT: 12.3.0.0.1.1607026830
Xcode: 12.3

Output of brew doctor

$ brew doctor
Warning: Calling depends_on :x11 is deprecated! Use depends_on specific X11 formula(e) instead.
Please report this issue to the d12frosted/emacs-plus tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/d12frosted/homebrew-emacs-plus/Formula/[email protected]:38

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: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  dep

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

Output of doom sync

$ bin/doom sync                                                               
x There was an unexpected error
  Message: Native compiler error
  Data: (native-compiler-error lambda (arg3 &rest arg4) (let ((f #'message)) (apply f arg3 arg4)))
  Backtrace:
    (signal native-compiler-error ((lambda (arg3 &rest arg4) (let ((f #'messag
    (comp--native-compile (lambda (arg3 &rest arg4) (let ((f #'message)) (appl
    (comp-trampoline-compile message)
    (comp-subr-trampoline-install message)
    (fset message (closure ((message . #) (log-buffer . #)
    (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-prot
    (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer l
    (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &
    (let* ((log-buffer (generate-new-buffer " *doom log*")) (standard-output #
    (condition-case e (let* ((log-buffer (generate-new-buffer " *doom log*")) 
! Extended backtrace logged to .local/doom.error.log
install error

All 14 comments

Related issue - #187 (just for reference).

This built and worked for me. It looks like this is intermittent.

WOW! I am very happy that it works for you! Did you do anything special to make it working?

Almost certainly this is a Big Sur issue (see my comment in that other thread) with gcc. Going to build gcc from source and see how that works (but will take a long time, I guess).

Recompiling gcc from source didn't help.

$ cat jittest.c
     #include <libgccjit.h>
     #include <stdlib.h>
     #include <stdio.h>
     int
     main (int argc, char **argv)
     {
       gcc_jit_context *ctxt;
       gcc_jit_result *result;
       ctxt = gcc_jit_context_acquire ();
       if (!ctxt)
         exit (1);
       gcc_jit_type *int_type =
         gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
       gcc_jit_function *func =
         gcc_jit_context_new_function (ctxt, NULL,
                                       GCC_JIT_FUNCTION_EXPORTED,
                                       int_type, "foo", 0, NULL, 0);
       gcc_jit_block *block = gcc_jit_function_new_block (func, "foo");
       gcc_jit_block_end_with_return (
         block,
         NULL,
         gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 1));
       result = gcc_jit_context_compile (ctxt);
       if (!result)
         exit (1);
       typedef int (*fn_type) (void);
       fn_type foo =
         (fn_type)gcc_jit_result_get_code (result, "foo");
       if (!foo)
         exit (1);
       if (foo () != 1)
         exit (1);
       gcc_jit_context_release (ctxt);
       gcc_jit_result_release (result);
       return 0;
     }

Compile jittest.c

$ gcc -o jittest -I/usr/local/include -L/usr/local/lib/gcc/10 jittest.c -lgccji

Run:

$ ./jittest
ld: library not found for -lSystem
collect2: error: ld returned 1 exit status
libgccjit.so: error: error invoking gcc driver

Since this test doesn't involve any emacs or doom code, I think it's safe to safe gcc jit is somehow misconfigured on Big Sur. Perhaps it's Apple changing the system search path or perhaps gcc is assuming something incorrectly; I don't know.

Aha! I made some progress by recompiling libgccjit!

$ brew reinstall gcc --build-from-source --force
$ brew reinstall libgccjit --build-from-source --force

I will try to recompile emacs now and see how far I get.

Had the same issue as you @seanfarley , I also did gcc and libgccjit reinstall, reinstall of @28 , and it actually fixed it for me 馃憤 thank you!

WOW! I am very happy that it works for you! Did you do anything special to make it working?

I wasn't sure it would work, so I did a local build. Otherwise it just worked out of the box. I'm using doom, and after running doom sync it works fine, both from the command line and from finder.

Yes, so the solution was to reinstall gcc. Happy that it works.

Closing this ticket in favour of #187 :)

Yep, I just tested and it works now :-). FYI, you also need to rebuild libgccjit from source on Big Sur.

I'm experiencing similar issues and rebuilding gcc and ... doesn't help. doom sync produces:

Native compiler error: (lambda (arg15 &rest arg16) (let ((f #'message)) (apply f arg15 arg16))), "Compiling /Users/ashkanaleali/.emacs.d/.local/cache/eln/28.0.50-8728ed69/subr--trampoline-6d657373616765_message_0.eln...
FATAL:/nix/store/izl3id7c8iknp9yjsrh7i4hx2khq278p-cctools-port-949.0.1/libexec/as/x86_64/as: I don't understand 'm' flag!
libgccjit.so: error: error invoking gcc driver
Debugger entered--Lisp error: (native-ice \"failed to compile\" \"/Users/ashkanaleali/.emacs.d/.local/cache/eln/28.0...\" \"error invoking gcc driver\")
  comp--compile-ctxt-to-file(\"/Users/ashkanaleali/.emacs.d/.local/cache/eln/28.0...\")
  comp-compile-ctxt-to-file(\"/Users/ashkanaleali/.emacs.d/.local/cache/eln/28.0...\")
  comp-final1()
  load-with-code-conversion(\"/var/folders/sv/6lspm2p55lz1bs_xflqjrw2h0000gn/T/e...\" \"/var/folders/sv/6lspm2p55lz1bs_xflqjrw2h0000gn/T/e...\" nil t)
  command-line-1((\"-l\" \"/var/folders/sv/6lspm2p55lz1bs_xflqjrw2h0000gn/T/e...\"))
  command-line()

When I try to rebuild gccand libgccjit I get:

if test "" != "yes" ; then \
  rm -f /nix/store/80kgw8spyllzacqbwmr20r9mw7y8xq53-libgccjit-10.2.0/bin/g++; \
  /nix/store/5y6lcfjghk5kbv4782vi7w79vz60gsyn-bash-4.4-p23/bin/bash ../../gcc-10.2.0/gcc/../install-sh -c -s xg++ /nix/store/80kgw8spyllzacqbwmr20r9mw7y8xq53-libgccjit-10.2.0/bin/g++; \
  chmod a+x /nix/store/80kgw8spyllzacqbwmr20r9mw7y8xq53-libgccjit-10.2.0/bin/g++; \
  rm -f /nix/store/80kgw8spyllzacqbwmr20r9mw7y8xq53-libgccjit-10.2.0/bin/c++; \
  ( cd /nix/store/80kgw8spyllzacqbwmr20r9mw7y8xq53-libgccjit-10.2.0/bin && \
    ln g++ c++ ); \
  if [ -f cc1plus ] ; then \
    if [ ! -f g++-cross ] ; then \
      rm -f /nix/store/80kgw8spyllzacqbwmr20r9mw7y8xq53-libgccjit-10.2.0/bin/x86_64-apple-darwin-g++; \
      ( cd /nix/store/80kgw8spyllzacqbwmr20r9mw7y8xq53-libgccjit-10.2.0/bin && \
        ln g++ x86_64-apple-darwin-g++ ); \
      rm -f /nix/store/80kgw8spyllzacqbwmr20r9mw7y8xq53-libgccjit-10.2.0/bin/x86_64-apple-darwin-c++; \
      ( cd /nix/store/80kgw8spyllzacqbwmr20r9mw7y8xq53-libgccjit-10.2.0/bin && \
        ln c++ x86_64-apple-darwin-c++ ); \
    fi ; \
  fi; \
fi
/nix/store/5y6lcfjghk5kbv4782vi7w79vz60gsyn-bash-4.4-p23/bin/bash ../../gcc-10.2.0/gcc/../install-sh -c -s libgccjit.so.0.0.1 \
  //nix/store/80kgw8spyllzacqbwmr20r9mw7y8xq53-libgccjit-10.2.0/lib/libgccjit.so.0.0.1
strip: error: symbols referenced by indirect symbol table entries that can't be stripped in: /nix/store/80kgw8spyllzacqbwmr20r9mw7y8xq53-libgccjit-10.2.0/lib/_inst.46441_

Any help is appreciated

Since you're using nix, you might want to open a new issue with your OS and emacs versions. No idea otherwise :-/

@ashkan-leo I am not sure what's happening there and I am not sure that what you are doing with nix is relevant to emacs-plus, which is brew formula. emacs-plus depends on gcc and libgccjit and expects them to be installed via brew:

https://github.com/d12frosted/homebrew-emacs-plus/blob/d6a2ec936aefbc666cb464a4abe53df069b2feb8/Formula/emacs-plus%4028.rb#L45-L50

Could you please share the command you used to install emacs-plus?

And regarding rebuilding libgccjit mentioned in this thread by @seanfarley , it actually means to rebuild it via brew :)

$ brew uninstall gcc libgccjit
$ brew install gcc libgccjit

Haha, I got confused to which repo I was replying to (I thought this was doom)!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ilovezfs picture ilovezfs  路  3Comments

agzam picture agzam  路  6Comments

jonathanj picture jonathanj  路  3Comments

frankjonen picture frankjonen  路  3Comments

d12frosted picture d12frosted  路  6Comments