Closed zealotrush closed 3 months ago
I was having the same issue on Ubuntu 22.04. What worked for me was running the command from the terminal directly instead of from emacs:
~/.emacs.d/elpa/pdf-tools-20230611.239/build/server/autobuild -i ~/.emacs.d/elpa/pdf-tools-20230611.239/
The exact location of the package depends on where you installed it and where emacs is installed. I got the location from the error message.
@cilinder Thank you for the information. I have tried the similar method as following.
~/.config/emacs/elpaca/builds/pdf-tools/server/autobuild -i ~/.config/emacs/elpaca/builds/pdf-tools/
However, it still produces the same error as shown in my post above. Adding export PKG_CONFIG_PATH=xxx
doesn't work either, for the same reason mentioned above.
Can confirm. epdfinfo
fails to render a pdf.
❯ pkg-config --libs poppler
-L/opt/homebrew/Cellar/poppler/24.01.0/lib -lpoppler
❯ ../pdf-tools/build/server/autobuild
....
2 warnings generated.
ld: warning: ignoring duplicate libraries: '-lglib-2.0', '-lintl'
===========================
Build succeeded. :O)
===========================
@paskn I upgraded poppler to version 24.01.0, just like yours. Plus, I made some tweaks as below to successfully compile it.
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/lib/
Now, pdf-tools-install
succeeded. However, when I open a random PDF file, it still only shows garbled symbols, somewhat like following:
%PDF-1.5
%\314\325\301\324\305\330\320\304\306
...
@zealotrush It is not working for me either. That is what I was trying to say above but failed :)
@zealotrush 's method works for me and delivers unscrambled PDFs on macOS 12.6.8 after running brew upgrade
. I c/ped the export
commands into the shell, then ran the autobuild script just as pdf-tools-install
attempts to. This still needs a fix, though
I've fixed a similar problem via https://github.com/vedang/pdf-tools/issues/269 . Please update to the latest version of pdf-tools from Melpa (check a few hours after this comment's timestamp) and try installing again.
I'm still experiencing this, using poppler 24.04.0 and pdf-tools version 20240411.1703. PDFs are shown as garbled text and I get the message: "File mode specification error: (wrong-type-argument stringp number-or-marker-p)".
Anyone else experiencing this symptom? Thanks for your help.
Describe the bug
pdf-tools-install
failed due to packagepoppler
not found.Steps to Reproduce the behaviour Steps to reproduce the behaviour:
emacs -Q
.git clone git@github.com:vedang/pdf-tools.git /tmp/pdf-tools
.(add-to-list 'load-path "/tmp/pdf-tools/lisp")
,(require 'pdf-tools)
.M-x pdf-tools-install
and pressy
.What is the expected behaviour? epdfinfo should be installed successfully.
Desktop Please complete the following information:
GNU Emacs 30.0.50 (build 2, aarch64-apple-darwin23.2.0, NS appkit-2487.30 Version 14.2.1 (Build 23C71)) of 2024-01-02
]poppler: stable 23.12.0 (bottled), HEAD
]Your pdf-tools install Please complete the following information:
Installed via github with the latest version. No customization.
Additional context
The
*compilation*
buffer content:Expand
``` -*- mode: compilation; default-directory: "/tmp/pdf-tools/server/" -*- Comint started at Wed Jan 3 08:26:10 /tmp/pdf-tools/server/autobuild -i /tmp/pdf-tools/lisp/ --------------------------- Installing packages --------------------------- brew install pkg-config poppler autoconf automake Warning: pkg-config 0.29.2_3 is already installed and up-to-date. To reinstall 0.29.2_3, run: brew reinstall pkg-config Warning: poppler 23.12.0 is already installed and up-to-date. To reinstall 23.12.0, run: brew reinstall poppler Warning: autoconf 2.72 is already installed and up-to-date. To reinstall 2.72, run: brew reinstall autoconf Warning: automake 1.16.5 is already installed and up-to-date. To reinstall 1.16.5, run: brew reinstall automake --------------------------- Configuring and compiling --------------------------- ./configure -q --bindir=/tmp/pdf-tools/lisp/ && make clean && make -s configure: error: Package requirements (poppler) were not met: No package 'poppler' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables poppler_CFLAGS and poppler_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. =========================== Build failed. ;o( =========================== Note: maybe try the '-d' option. Comint exited abnormally with code 1 at Wed Jan 3 08:26:12, duration 1.97 s ```I've also tried
export PKG_CONFIG_PATH=/opt/homebrew/Cellar/poppler/23.12.0/lib/pkgconfig
manually. In this case, epdfinfo can be compiled successfully. But when I open any PDF file with pdf-tools, it says "The epdfinfo server quit, restart it? (y or n)". Withy
, it repeats this error message indefinitely. Withn
, nothing happens, and the PDF file is still displayed as scrambled.