pdf-tools
pdf-tools copied to clipboard
Configure script cannot find poppler-private headers, but libpoppler-private-dev is installed
At first, the configure script failed because it could not find poppler.
ning@bluecoral:~/.emacs.d/.local/straight/build-27.1/pdf-tools/build/server$ PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/ ./configure -q --bindir=/home/ning/.emacs.d/.local/straight/build-27.1/pdf-tools/ && 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.
I figured the PKG_CONFIG_PATH
suggestion in the error message might be something to look into, so I set its value to the poppler.pc
directory on my laptop. I guess this is a non-standard location, though I did install libpoppler etc. via apt.
ning@bluecoral:~/.emacs.d/.local/straight/build-27.1/pdf-tools/build/server$ sudo find / -name "poppler.pc"
/usr/lib/x86_64-linux-gnu/pkgconfig/poppler.pc
find: ‘/run/user/1000/doc’: Permission denied
ning@bluecoral:~/.emacs.d/.local/straight/build-27.1/pdf-tools/build/server$ PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig ./configure -q --bindir=/home/ning/.emacs.d/.local/straight/build-27.1/pdf-tools/ && make clean && make -s
configure: error: cannot find necessary poppler-private header (see README.org)
That managed to get me pass the poppler error, but I don't really know what to do with this new poppler-private error. libpoppler-private-dev is indeed installed via apt, and there is no analogous .pc
file.
ning@bluecoral:~/.emacs.d/.local/straight/build-27.1/pdf-tools/build/server$ apt list libpoppler-private-dev
Listing... Done
libpoppler-private-dev/testing,now 20.09.0-3.1 amd64 [installed]
libpoppler-private-dev/testing 20.09.0-3.1 i386
ning@bluecoral:~/.emacs.d/.local/straight/build-27.1/pdf-tools/build/server$ sudo find / -name "*poppler-private*"
/var/lib/dpkg/info/libpoppler-private-dev:amd64.md5sums
/var/lib/dpkg/info/libpoppler-private-dev:amd64.list
/var/cache/apt/archives/libpoppler-private-dev_20.09.0-3.1_amd64.deb
/usr/share/doc/libpoppler-private-dev
find: ‘/run/user/1000/doc’: Permission denied
I am on doom 9cfd7980, which appears to have pulled the most recent vedang/pdf-tools 72ef774.
ning@bluecoral:~$ ~/.emacs.d/bin/doom version
> Executing 'doom version' with Emacs 27.1 at 2022-01-30 23:33:29
GNU Emacs v27.1 nil
Doom core v3.0.0-alpha HEAD -> master 9cfd7980 2022-01-30 02:42:54 +0100
Doom modules v21.12.0-alpha HEAD -> master 9cfd7980 2022-01-30 02:42:54 +0100
ning@bluecoral:~/.emacs.d/.local/straight/repos/pdf-tools$ git rev-parse --short HEAD
72ef774
Hi @ning-y ,
Based on this issue and #70 , I'm guessing there is some problem specifically showing up with doom and/or straight.el setups. I will investigate this over the weekend and update the ticket.
@vedang Thank you very much! Let me know if I can provide any additional information about my config.
I am having the same problem on a ubuntu 21.04 vm using vanilla emacs and use-package.
apt-get install -y autoconf automake g++ gcc libpng-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libz-dev make pkg-config
Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'zlib1g-dev' instead of 'libz-dev' autoconf is already the newest version (2.69-14). automake is already the newest version (1:1.16.4-2). g++ is already the newest version (4:11.2.0-1ubuntu1). gcc is already the newest version (4:11.2.0-1ubuntu1). libpng-dev is already the newest version (1.6.37-3build4). libpoppler-dev is already the newest version (21.06.1-1). libpoppler-glib-dev is already the newest version (21.06.1-1). libpoppler-private-dev is already the newest version (21.06.1-1). make is already the newest version (4.3-4ubuntu1). pkg-config is already the newest version (0.29.2-1ubuntu1). zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu7). 0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Configuring and compiling
./configure -q --bindir=/home/becker/.emacs.d/elpa/pdf-tools-20220125.1708/ && 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 Thu Feb 3 15:43:56
Can you please clone the latest version of pdf-tools
from this repo, cd
into the directory and run ./server/autobuild
in the terminal? Let me know if that compiles the server binary correctly. If it does not work, please paste the output. If it does work, please try M-x pdf-tools-install
from inside emacs (after ensuring that you are on the latest version)
I am still getting the same error ~/src/pdf-tools/pdf-tools $ git log commit b867ea782bda6b7509dfa22dcfe6e2c83ced575a (HEAD -> master, origin/master, origin/HEAD) Author: Vedang Manerikar [email protected] Date: Mon Apr 25 22:35:55 2022 -0400
Install automake on Mingw systems
:~/src/pdf-tools/pdf-tools $ ./server/autobuild
Installing packages
apt-get install -y autoconf automake g++ gcc libpng-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libz-dev make pkg-config
Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'zlib1g-dev' instead of 'libz-dev' autoconf is already the newest version (2.69-14). automake is already the newest version (1:1.16.4-2). g++ is already the newest version (4:11.2.0-1ubuntu1). gcc is already the newest version (4:11.2.0-1ubuntu1). libpng-dev is already the newest version (1.6.37-3build4). libpoppler-dev is already the newest version (21.06.1-1). libpoppler-glib-dev is already the newest version (21.06.1-1). libpoppler-private-dev is already the newest version (21.06.1-1). make is already the newest version (4.3-4ubuntu1). pkg-config is already the newest version (0.29.2-1ubuntu1). zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu7.1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Configuring and compiling
./configure -q && 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.
@vedang Thanks for the advice! Unfortunately, it did not work:
- From
.emacs.d/.local/straight/repos/pdf-tools
, I pulled the latest commit (updated326552e..3ae9ba9
) - I rebuilt with
doom build
- I ran into the same error with
./server/autobuild
:
$ ./server/autobuild
---------------------------
Installing packages
---------------------------
apt-get install -y autoconf
automake
g++
gcc
libpng-dev
libpoppler-dev
libpoppler-glib-dev
libpoppler-private-dev
libz-dev
make
pkg-config
[sudo] password for ning:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'zlib1g-dev' instead of 'libz-dev'
autoconf is already the newest version (2.71-2).
automake is already the newest version (1:1.16.5-1.3).
g++ is already the newest version (4:11.2.0-2).
gcc is already the newest version (4:11.2.0-2).
libpng-dev is already the newest version (1.6.37-3).
make is already the newest version (4.3-4.1).
pkg-config is already the newest version (0.29.2-1).
libpoppler-dev is already the newest version (22.02.0-3).
libpoppler-glib-dev is already the newest version (22.02.0-3).
libpoppler-private-dev is already the newest version (22.02.0-3).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-4).
The following packages were automatically installed and are no longer required:
dc libabsl20200923 libfam0 libhpmud0 libmms0 libofa0 libperl5.32 libplacebo157 libwmf-0.2-7 libwmf0.2-7 linux-image-5.15.0-2-amd64 mscompress perl-modules-5.32 tix
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 806 not upgraded.
---------------------------
Configuring and compiling
---------------------------
./configure -q && 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.
I have fixed this issue by regenerating my doom emacs environment file (via doom env
). Previously I had run doom env
while in a conda environment, which heavily modifies environment variables. I suspect that one of these modifications had mucked up the expected environments re poppler.