politza / pdf-tools

Emacs support library for PDF files.
GNU General Public License v3.0
1.57k stars 162 forks source link

glib-2.0 dependency issue while building epdfinfo, though installed!? #624

Closed zenny closed 2 years ago

zenny commented 4 years ago

Hi,

I am trying to install pdf-tools in scimax configuration of emacs in VoidLinux (rolling release). It was working alright a few days back without a glitch. However, when I tried to launch today, it dies with:


-*- mode: compilation; default-directory: "~/Downloads/emacs-configs/scimax/elpa/pdf-tools-20200512.1524/build/server/" -*-
Comint started at Wed Sep 30 09:23:51

/home/zenny/Downloads/emacs-configs/scimax/elpa/pdf-tools-20200512.1524/build/server/autobuild -i /home/zenny/Downloads/emacs-configs/scimax/elpa/pdf-tools-20200512.1524/
Failed to recognize this system, trying to continue.
---------------------------
 Configuring and compiling
---------------------------
./configure -q --bindir=/home/zenny/Downloads/emacs-configs/scimax/elpa/pdf-tools-20200512.1524/ && make -s
configure: error: Package requirements (glib-2.0) were not met:

No package 'glib-2.0' 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 glib_CFLAGS
and glib_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 Sep 30 09:23:51

All glib-2.0 related development libraries like glib-2.66.0_1, glib-devel-2.66.0_1 and libglib-devel-2.66.0_1 are already installed systemwide. Any clue?

Cheers and stay safe, /z

julopezc-acciona commented 3 years ago

I have a workaround:

find /usr -name "pkgconfig" to find possible paths to the config. In my system (kubuntu 20.10) there happens to be four candidate directories:

Try each directory in turn. For example, to try out /usr/lib/x86_64-linux-gnu/pkgconfig, which turned out to be the good one for me:

$ export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig; emacs

Once in emacs M-x pdf-tools-uninstall and then M-x pdf-tools-install and it should work now