0

I have problems getting pdf-tools to run on Emacs (from railwaycat) on MacOs - ARM64 i.e. on Apple Silicon.

GNU Emacs 29.1 (build 1, aarch64-apple-darwin21.6.0, Carbon Version 165 AppKit 2113.6) of 2023-08-08

I installed the pdf-tools without problems (via the drop-down-menu)

    pdf-tools   1.1.0   installed    Support library for PDF documents

but when I execute the standard activation command

 (pdf-tools-install) 

which tries to compile the poppler server, I get warnings and linker errors:

ld: warning: ignoring file /usr/local/opt/gettext/lib/libintl.dylib, 
building for macOS-arm64 but attempting to link with file built for macOS-x86_64

 [...]

ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [epdfinfo] Error 1
make: *** [all] Error 2
===========================
 Build failed.  ;o(    
===========================

Any ideas how can get the compiler to link with ARM64 dynlibs or how to provide/create these?

Any help appreciated!

1

1 Answer 1

0

It would be helpful to know how did you install that Emacs version. Taking into account the error messages, you have somewhere a wrong Emacs version. I suggest to use brew, it will install/compile from sources, so here are some steps to follow to have success:

  • remove your actual Emacs installation
  • install macOS command line tools, with xcode-select --install
  • install brew from this page (needs previous item)
  • in your terminal type brew tap railwaycat/emacsmacport
  • optional brew info emacs-mac to see all dependencies that will be installed
  • now brew install emacs-mac --with-modules

The installation process will download the source code, will apply some patches (I guess you did not do that step), and then usual autoconfig, make, make-install will follow (~5 min).

Once you have that, start Emacs from /opt/homebrew/opt/emacs-mac/Emacs.app, and then install pdf-tools.

Note: I tested yesterday the above steps, pdf-tools installs and work OK, M1 machine.

3
  • Hi Ian, thanks a lot for the detailed description. It's good to know you got it working on Apple Silicon. I'll try it as soon as I find the time and report back. Commented Feb 28 at 19:19
  • Just tried it, works like a charm! :-) Thanks a lot! PS: For other readers: I had to install PDF tools after installing Emacs: M-x package-install <RET> pdf-tools M-x pdf-tools-install Commented Feb 28 at 20:16
  • Then mark the question as answered, please.
    – Ian
    Commented Feb 29 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.