Closed miyucy closed 7 months ago
I've identified an issue with the library embedder in the build script. It doesn't correctly libraries that refer to other shared libraries via @rpath
, it seems webp is the first set of shared libraries I've come across which does this.
I'll try and get a fix in place soon, as this is somewhat tricky, and I'm on holiday this week.
I believe having webp
installed locally via Homebrew should serve as a workaround to this issue in the short term.
This is also why I have not seen this issue myself with any of the test builds I did before the 29.1 release, cause I have the webp
package installed locally.
I believe having
webp
installed locally via Homebrew should serve as a workaround to this issue in the short term.
I have webp installed, and I'm having the same issue (full backtrace below):
brew info webp
==> webp: stable 1.3.1 (bottled), HEAD
For the moment, I got back to emacs-app-pretest
which is working just fine.
Thanks.
I have already installed webp
via Homebrew. emacs-app-pretest
is working fine.
Interesting, and annoying. Uninstalling webp
on my machine gives me the same error, and installing it again fixes it. I am on an Intel-based Mac though, so if you're both on Apple Silicon machines that probably explains it.
Either way, the workaround isn't reliable, so I'll try and get the a fix sorted in the next day or two.
Thank you! I'll try uninstall and re-install webp
.
I'm using Intel-based Mac...
Interesting, and annoying. Uninstalling
webp
on my machine gives me the same error, and installing it again fixes it. I am on an Intel-based Mac though, so if you're both on Apple Silicon machines that probably explains it.
I'm on an Intel-based machine and did this:
brew uninstall --ignore-dependencies webp
brew install webp
brew install emacs-app
However, the same error persists.
and I'm on holiday this week.
Take your time, don't worry. The pretest build works fine, so we can wait one week or two.
Best.
just chiming in here .. M2 after the uninstall / reinstall above
└─(11:32:01)──> /Applications/Emacs.app/Contents/MacOS/Emacs ──(Sat,Aug12)─┘
dyld[18860]: Library not loaded: @rpath/libwebp.7.dylib
Referenced from: <8623BFA7-B61B-3445-A97E-06282809AC5A> /Applications/Emacs.app/Contents/Frameworks/libwebpdemux.2.dylib
Reason: tried: '/Applications/Emacs.app/Contents/Frameworks/../lib/libwebp.7.dylib' (no such file), '/Applications/Emacs.app/Contents/Frameworks/libwebp.7.dylib' (no such file), '/Applications/Emacs.app/Contents/Frameworks/libwebp.7.dylib' (no such file), '/usr/lib/libwebp.7.dylib' (no such file, not in dyld cache)
[1] 18860 abort /Applications/Emacs.app/Contents/MacOS/Emacs
Apologies, the fix is taking longer than I thought. The way the webp package's shared libraries are put together has necessitated a complete rewrite of the custom shared library embedder/bundled in the build script. I have a nearly working version locally that I need to iron out some final bugs in next week.
Uninstalling webp on my machine gives me the same error, and installing it again fixes it.
This doesn't work on my system (Ventura 13.5.1 x86_64) because Emacs isn't looking in /usr/local/lib
, FWIW:
'/Applications/Emacs.app/Contents/Frameworks/../lib/libwebp.7.dylib'
'/Applications/Emacs.app/Contents/Frameworks/libwebp.7.dylib'
'/Applications/Emacs.app/Contents/Frameworks/libwebp.7.dylib'
'/usr/lib/libwebp.7.dylib'
~❯ /Applications/Emacs.app/Contents/MacOS/bin/emacs
dyld[28041]: Library not loaded: @rpath/libwebp.7.dylib
Referenced from: <8623BFA7-B61B-3445-A97E-06282809AC5A> /Applications/Emacs.app/Contents/Frameworks/libwebpdemux.2.dylib
Reason: tried: '/Applications/Emacs.app/Contents/Frameworks/../lib/libwebp.7.dylib' (no such file), '/Applications/Emacs.app/Contents/Frameworks/libwebp.7.dylib' (no such file), '/Applications/Emacs.app/Contents/Frameworks/libwebp.7.dylib' (no such file), '/usr/lib/libwebp.7.dylib' (no such file, not in dyld cache)
I tried to link it into /usr/lib
, but modifying /usr/
is banned by Darwin's SIP, I guess.
You can do it by linking the required lib into /Applications/Emacs.app/Contents/Frameworks
if you grant your terminal permission to modify apps, and that works, but it's also missing libsharpyuv.0.dylib
. After linking that in, I was able to launch Emacs from the terminal, but now I'm getting.....
Native compiler error: (lambda (arg3 &optional arg4 arg5) (let ((f #'describe-buffer-bindings)) (funcall f arg3 arg4 arg5))), Compiling <$HOME>/.emacs.d/eln-cache/29_1-cb8c56c7/subr--trampoline-64657363726962652d6275666665722d62696e64696e6773_describe_buffer_bindings_0.eln...
ld: library not found for -lSystem
This was resolved by using xcode-select --install
with a fresh version of XCode. It's running now.
Apologies for the silence. Tail end of the summer got unexpected busy for me, but things should be returning to normal this month, at which point I'll be properly resolving this issue.
Locally I'm still running a nightly build from July myself, and I'm itching for a newer build.
Related to https://github.com/jimeh/build-emacs-for-macos/issues/85 most likely.
I have got similar problems. fixed by manually copy "libwebp.7.dylib" from /usr/local/lib to /Applications/Emacs.app/Contents/Frameworks .
According to error message, I think add /usr/local/lib to lib resolving path then notify user install webp lib use brew may be a quick fix.
dyld[6106]: Library not loaded: @rpath/libwebp.7.dylib Referenced from: /Applications/Emacs.app/Contents/Frameworks/libwebpdemux.2.dylib Reason: tried: '/Applications/Emacs.app/Contents/Frameworks/../lib/libwebp.7.dylib' (no such file), '/Applications/Emacs.app/Contents/Frameworks/libwebp.7.dylib' (no such file), '/Applications/Emacs.app/Contents/Frameworks/libwebp.7.dylib' (no such file), '/usr/lib/libwebp.7.dylib' (no such file, not in dyld cache)
This Emacs build is faster, thanks @jimeh .
Just an update on this issue. I've got a fix in place in the underlying build script: https://github.com/jimeh/build-emacs-for-macos/pull/88
I should get the fix merged and updated here within the next day or two, so new nightly builds should be fixed shortly :)
Thanks, Jim! I can't wait for the next nightly build. Best.
@jimeh Would you be able to produce a new 29.1 release? I'd like to stay on a stable emacs release if possible.
@dpassen Yep, it's on my list, along with an arm64 build of 29.1 to go along with it. I'll hopefully have time to sort it later tonight, or tomorrow.
Thanks so much, your work and time is greatly appreciated!
This should now be resolved. I have updated the existing Emacs-29.1 release with new builds for both Intel and Apple Silicon. I tested both in a clean macOS VM with nothing installed except Xcode Command Line Developer Tools and Rosetta2, and for both Emacs launches just fine, supports native compilation, and can open webp images.
The one caveat is that I've had to increase the minimum required macOS version from 11 (Big Sur) to 12 (Ventura). Homebrew no longer supports Big Sur, making Intel builds on it very slow, annoying, and more error prone, as all Homebrew dependencies are installed from source.
If you had previously installed 29.1 via the Homebrew Tap, you will need to re-install it:
brew update
brew reinstall jimeh/emacs-builds/emacs-app
As I am fairly certain this issue is now resolved, so I'll be closing it. However feel free to reply further or re-open if needed :)
@jimeh I recently reinstalled the app and was able to start it without crashing. I am so grateful for your efforts to fix this issue.
Thank you for releasing the new version of Emacs v29.1. I installed it and tried to start it, but it crashed. The following message was displayed when it crashed. It seems that
libwebp.7.dylib
is not included.