d12frosted / homebrew-emacs-plus

Emacs Plus formulae for the Homebrew package manager
MIT License
2.35k stars 181 forks source link

Compiled and installed on M1 Macs as arm64, recognized by some package as x86_64? #475

Closed cilia closed 1 month ago

cilia commented 2 years ago

This might not be a emacs-plus issue, but I have tried all sorts of things including talking to the maintainer of the problematic package in question first: https://github.com/vedang/pdf-tools/issues/107, and I'm hoping the emacs-plus community could shed some light on the problem.

I'm having trouble of building pdf-tools for emacs-plus (both 27 and 28 tried and failed). It always complains the following before the compilation fails:

ld: warning: ignoring file /opt/homebrew/opt/gettext/lib/libintl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/glib/2.72.1/lib/libglib-2.0.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/poppler/22.02.0/lib/libpoppler-glib.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/glib/2.72.1/lib/libgobject-2.0.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/poppler/22.02.0/lib/libpoppler.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/cairo/1.16.0_5/lib/libcairo.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/libpng/1.6.37/lib/libpng16.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/zlib/1.2.11/lib/libz.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64

...

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I can confirm my emacs-plus is compiled natively on a M1 MBA (macOS 11.6.6), and the resultant Emacs process sampling shows Code Type: ARM64. In addition, it seems the Emacs builds from: https://emacsformacosx.com do not suffer from the same issue, so I wonder if I've made some error in my emacs-plus installation or configuration. Any suggestion is much appreciated.

danilevy1212 commented 2 years ago

Same problem here.

d12frosted commented 1 month ago

Closing as there is no traction with this issue. And AFAIK (from my tests) it doesn't happen for a long time. Let me know if you still experience it.