-
Notifications
You must be signed in to change notification settings - Fork 52
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
cconv.el.gz fails to compile due to missing libgcc_ext.10.5 #5
Comments
cconv.el.gz
fails to compile due to missing libgcc_ext.10.5
At some point today |
I am also experiencing the same error but for subr.el. This causes failed compilation for all other packages. I'm still looking into what the cause is. |
@jakejx if it helps, |
hmm not sure if it matters, but I am seeing it for a different file and its causing subsequent errors:
And I get multiple of the |
@jakejx those errors actually look related to #3, and to some degree #4 as well, cause it's trying to load That said, I've not actually tried to run the Emacs.app from the builds folder myself, which means due to #4 I've not actually tried starting it with the I'd be curious to see what happens if you copy Emacs.app to a different path, so the cached |
Hi, I've had the same issue regarding libgcc_ext.10.5, which seems to be solved by putting the following in your early init.el (see https://gist.github.com/mikroskeem/0a5c909c1880408adf732ceba6d3f9ab#gistcomment-3390480):
However, now emacs complains about a similar issue for "-lgcc":
I don't find libgcc in the compiled GCC, only libgcc_s. Any ideas about this? |
@jimeh I think Emacs is trying to recompile everything from scratch, but its not able to find libgccjit.so. Which is odd because it could find it during the initial compilation. |
I seem to have find out how |
@bramadams I'm not sure that actually fixes the issue, looks more like it just breaks things even worse. I mentioned in my earlier comment though, it |
@jimeh Yes, I just tried, and the terminal version compiles natively. Reloading the GUI app seems to use the compiled files from the cache, but since compilation does not work at all for me in the GUI app ("library not found for -lgcc_ext.10.5" ), there are still a lot of "no suitable image found" messages. In any case, there's progress. |
Strange, in GUI when I get that error, it only prevents I have even repeatedly reproduce the behavior by manually trashing the cconv eln-cache file, and some others, which causes the GUI to fail compiling cconv, but the rest compile again without issue. For reference, I'm on latest macOS (10.15.6) and Xcode (11.6). |
OK, thanks, I'm on 10.13.6 and Xcode 10.1. I can't upgrade OSX, but I'll try upgrading Xcode. |
... and by the way, thanks for making these scripts available, never got this far with native compilation :-) |
I can confirm that performing the initial compilation using the terminal version has resolved the issue for me. Any compilation that arises when using the GUI after that seems to work fine. Thanks for the scripts @jimeh! |
Small update: the GUI app has native compilation fully functional when I invoke it from the command line. Only when opening the app via Finder, the libgcc_ext problem persists. It must be some kind of environment issue with app bundles. |
Just an update on this. By adding one more path to I am not sure if there is anyway for us to specify these during the build process. Alternatively, is there some emacs variable that we can use to get the path of Emacs itself, so users can set these environment variables relative to the app bundle instead of the system gcc. |
@jakejx Thats some awesome digging, thanks :D I'll give it a try myself, and also experiment with moving those folders into the Worst case a work around could be to require users to update their config with it. Some config tweaks are already needed anyway. |
I've managed to hand-craft a Emacs.app which is fully self-contained with gcc/libgccjit, and sets the I'll update the build script accordingly tomorrow, and hopefully it should resolve both #5 and #7 :) |
The solution to get libgccjit properly working, and embedded in Emacs.app included: - The contents of GCC's lib folder (`/usr/local/opt/gcc/lib`) is copied into the `Contents/MacOS/lib-<arch>-<os_version>` folder. - Setting `LIBRARY_PATH` environment variable to correct GCC lib folders within Emacs.app. This is done through a bash launcher script which replaces the regular `Contents/MacOS/Emacs` executable. The main Emacs executable itself is named `Emacs-bin` now instead, so anything that depends on the exact process name will need updating. - The launcher script also adds `Content/MacOS/bin` and `Content/MacOS/libexec` folders to the PATH environment variable, to so ensure binary tools packaged into Emacs itself are available. This is done even when not doing a native-comp build. The launcher script skips setting LIBRARY_PATH if it's not a native-comp build. This should hopefully resolve both #5 and #7.
@jakejx @bramadams I've just created Pull Request #10 that updates the build If you wouldn't mind trying it out, that'd be great :) Everything seems to work for me, even after I move |
The solution to get libgccjit properly working, and embedded in Emacs.app included: - The contents of GCC's lib folder (`/usr/local/opt/gcc/lib`) is copied into the `Contents/MacOS/lib-<arch>-<os_version>` folder. - Setting `LIBRARY_PATH` environment variable to correct GCC lib folders within Emacs.app. This is done through a bash launcher script which replaces the regular `Contents/MacOS/Emacs` executable. The main Emacs executable itself is named `Emacs-bin` now instead, so anything that depends on the exact process name will need updating. - The launcher script also adds `Content/MacOS/bin` and `Content/MacOS/libexec` folders to the PATH environment variable, to so ensure binary tools packaged into Emacs itself are available. This is done even when not doing a native-comp build. The launcher script skips setting LIBRARY_PATH if it's not a native-comp build. This should hopefully resolve both #5 and #7.
This should now be fixed thanks to #10. |
Hi, thank you for the script. I can successfully build out the app with
build-emacs-for-macos: 9223ff8 Update
Update 2:
Problem resolved: Thanks to #5 (comment), I set LIBRARY_PATH to |
For some reason setting library path as the one in (setenv "LIBRARY_PATH" "/Applications/Emacs.app/Contents/MacOS/lib/gcc/10:/Applications/Emacs.app/Contents/MacOS/lib/gcc/10/gcc/x86_64-apple-darwin17/10.2.0") It looks like patches/native-comp-env-setup.patch) is doing this but for some reason it does not seem to work. |
Currently
cconv.el.gz
that's part of Emacs fails to natively compile for me,leading to a error/warning at start up. It also leaves a zero byte sized
*.eln
file behind, which can be dealt by with the work around in #3.
As far as I can tell this doesn't seem to actually break anything or prevent
things from working correctly though.
Details
The compile log error:
Initially I thought it was simply missing the
libgcc_ext.10.5.dylib
from GCC,as other libs are bundled into Emacs.app, but libgcc_ext was not. However
manually adding it to the libs to embed/bundle yields this error:
Sadly some googling for information about this kind of error and possible
workarounds didn't yield much.
So I tried not bundling libgccjit into Emacs.app, and instead referencing it
from the homebrew install path, but that didn't solve the issue either.
For now I'm out of ideas for how to fix or workaround this.
Update: It seems that
cconv.el.gz
compiles just fine on my machine if Ilaunch Emacs into terminal mode:
I'll try and dig into why it fails when launched with GUI, but doesn't in
terminal.
The text was updated successfully, but these errors were encountered: