New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find /usr/local/lib/gcc/11/libgcc_s.1.dylib #11
Comments
Interesting. The eln file in question is in your The eln files bundled into the app are relinked against a embedded copy of the shared lib as of about two weeks ago with v0.4.16 of the build script. But I haven’t checked what user made eln files are linked to. If you trash the However, this does highlight that user-cached eln files could cause problems, so I’ll do a bit of digging and put some information together in the readme. This also highlights the need for some basic automated tests to be part of the build process, which I’ve been meaning to write up an issue for since a few weeks back. |
@jimeh Remove /Users/allendang/.emacs.d/.local doesn't help, error msg remains as below.
|
Okay, now that is a lot more interesting. I'm gonna need to do some digging to figure out if I can get native-comp produced files to link elsewhere. For now only workaround I can think of is |
@jimeh I've done |
@AllenDang interesting, do you have |
@jimeh
gcc version is
|
That doesn't seem right. It shouldn't symlink to the libgccjit package, it should be symlinking to gcc. This is what my machine looks like with
|
@jimeh Aha! Case solved after |
From what I can tell, this is still an issue. Tried using this on m1 with Ventura. It only works If I put a gcc 11 for x86 in my path, I't seems to be unable to use the system gcc (which is AFAIK just a clang wrapper?). Complains about a version 13.00.00. Output running doom
x There was an unexpected runtime error
Message: Native compiler error
Details: ((lambda (arg47 &rest arg48) (let ... ...)) "Compiling /Users/kloenk/.emacs.d/.local/cache/eln/29_0_50-9d1a6069/subr--trampoline-6d657373616765_message_0.eln...\nx86_64-apple-darwin19-gcc-11: warning: could not understand version 13.00.00\nld: library not found for -ldylib1.o\nlibgccjit.so: error: error invoking gcc driver\nInternal native compiler error: \"failed to compile\", \"/Users/kloenk/.emacs.d/.local/cache/eln/29_0_50-9d1a6069/subr--trampoline-6d657373616765_message_0.eln\", \"error invoking gcc driver\"\n\nError: native-ice (\"failed to compile\" \"/Users/kloenk/.emacs.d/.local/cache/eln/29_0_50-9d1a6069/subr--trampoline-6d657373616765_message_0.eln\" \"error invoking gcc driver\")\n debug-early-backtrace()\n debug-early(error (native-ice \"failed to compile\" \"/Users/kloenk/.emacs.d/.local/cache/eln/29_0_50-9d1a6069/subr--trampoline-6d657373616765_message_0.eln\" \"error invoking gcc driver\"))\n comp--compile-ctxt-to-file(\"/Users/kloenk/.emacs.d/.local/cache/eln/29_0_50-9d1a6069/subr--trampoline-6d657373616765_message_0.eln\")\n comp-compile-ctxt-to-file(\"/Users/kloenk/.emacs.d/.local/cache/eln/29_0_50-9d1a6069/subr--trampoline-6d657373616765_message_0.eln\")\n comp-final1()\n load-with-code-conversion(\"/private/var/folders/3z/8gkxf5k97ng3tswrp5dh548w0000gn/T/emacs-int-comp-subr--trampoline-6d657373616765_message_0-RHn6na.el\" \"/private/var/folders/3z/8gkxf5k97ng3tswrp5dh548w0000gn/T/emacs-int-comp-subr--trampoline-6d657373616765_message_0-RHn6na.el\" nil t)\n command-line-1((\"-l\" \"/var/folders/3z/8gkxf5k97ng3tswrp5dh548w0000gn/T/emacs-int-comp-subr--trampoline-6d657373616765_message_0-RHn6na.el\"))\n command-line()\n normal-top-level()\n")
Backtrace:
(signal native-compiler-error ((lambda (arg47 &rest arg48) (let ((f #'me...
(comp--native-compile (lambda (arg47 &rest arg48) (let ((f #'message)) (...
(comp-trampoline-compile message)
(comp-subr-trampoline-install message)
(fset message #[128 "\302\301\303\300\"\"\207" [(#s(doom-cli-context (...
(progn (fset #'message vnew) (progn (if (or init-file-debug noninteracti...
(unwind-protect (progn (fset #'message vnew) (progn (if (or init-file-de...
(let* ((vnew (doom-partial #'doom-cli--redirect-output-a context)) (old ...
(let ((standard-output (doom-rpartial #'doom-cli--output context))) (let...
(let ((debug-on-error t)) (let ((standard-output (doom-rpartial #'doom-c...
(let ((debugger (doom-rpartial #'doom-cli-debugger context))) (let ((deb...
(let ((show-benchmark-fn (doom-partial #'doom-cli--output-benchmark-h co...
! Wrote extended backtrace to ~/.emacs.d/.local/logs/cli.doom.220720145053.34691.error
Not yet fluently enough with emacs/elisp, to check if this only occurs with doom Version tested is |
@Kloenk That's interesting, this should no longer be an issue as the builds have been usingu versions of gcc and libgccjit which are embedded into the .app bundle itself since late November last year. That said, I'm don't have any first-hand experience of using these builds on M1-based machines myself yet. And the builds here are Intel-only for now, as GitHub does not yet have M1-based GitHub Actions runners available. But yeah, if it somehow is trying to use the system gcc, that would definitely not work if it's the clang wrapper, as libgccjit specifically requires actual GCC. But, in theory it should be both libgccjit and GCC bundled into the app, admittedly running it all via Rosetta2 on an M1 machine, but still. What's the value of the It should include a couple of paths within your Emacs.app, for example, mine is:
|
My value is (Doom uses an env file, to restore a known environment. |
The Xcode Command Line Tools are required. But on a Intel-based macs you'll be prompted by macOS to install them first time Emacs tries to perform any native compilation. Possibly that doesn't happen on M1-based machines as these builds would be running through Rosetta2. So if you don't already have the Xcode Command Line Tools installed, try installing it. Alternatively, you could try using my build script to compile Emacs yourself for M1. Though from what I've understood, you'll need to also sign the app which requires a paid Apple Developer Program membership. As for the gcc paths within the Emacs.app bundle, there won't be any |
I have the Xcode tools installed. I know that clang via a command line works. gcc is AFAIK a 3 layered wrapper for the same clang. |
Using the build script is some work for me. As I don't have (and want) homebrew. Already have nix for all my needs. (Nix is where I got a gcc binary from that did get it to work) |
Hmm, I wonder if maybe Rosetta apps don't see the M1-based Xcode Command Line Tools? I'm afraid Apple Silicon is still very much uncharted territory and guess work for me. As for the build script, in theory it shouldn't need Homebrew. Only real dependency of the script itself is Ruby (2.3 or later), and Xcode Command Line tools (the A native M1 build should perform better as there'd be no x86 translation happening via Rosetta, but I don't know if performance is even remotely a concern in your case. |
Will look into it after my exams :). There is an eMacs inside nixpkgs, but it does not compile natively. But I think it uses different patches. A paid developer account I do have. And even without it, it should be possible I then just have to rebuild every week. |
This issue occurred since the *.dmg version.
Start Emacs.app, error messages are:
I found libgcc_s.1.dylib at /Applications/Emacs.app/Contents/MacOS/lib/libgcc_s.1.dylib, seems the reference is wrong.
The text was updated successfully, but these errors were encountered: