I am trying to build today's poppler from scratch, and I get a build failure: [snip] [ 44%] Built target pdftotext [ 45%] Generating poppler-enums.h /bin/sh: 1: GLIB2_MKENUMS-NOTFOUND: not found glib/CMakeFiles/poppler-glib.dir/build.make:90: die Regel für Ziel „glib/poppler-enums.h“ scheiterte make[2]: *** [glib/poppler-enums.h] Fehler 127 make[2]: *** Datei „glib/poppler-enums.h“ wird gelöscht CMakeFiles/Makefile2:599: die Regel für Ziel „glib/CMakeFiles/poppler-glib.dir/all“ scheiterte make[1]: *** [glib/CMakeFiles/poppler-glib.dir/all] Fehler 2 Makefile:140: die Regel für Ziel „all“ scheiterte make: *** [all] Fehler 2 Any ideas?
lots of german. GLIB2_MKENUMS-NOTFOUND: not found did you uninstall something after configuring? Seems like configure thought glib-mkenums would be available and then it is not.
I did indeed update my Debian Testing distribution, but I did a full cmake configuration afterwards. Some more digging yielded the following: Somehow my distribution update must have removed my glib development files. I installed them explicitly in form of the package libglib2.0-dev. That fixed the error, but a new one was waiting. :-) Now I get complaints about missing headers; the first one is glib-object.h. The file exists on my computer, it is in /usr/include/glib-2.0/ However, even though cmake claims to have found glib Building Poppler with support for: [snip] glib wrapper: yes introspection: no /usr/include/glib-2.0 does not show up in the compiler options. ~/poppler/build(master)> make VERBOSE=1 [snip] [ 44%] Building CXX object glib/CMakeFiles/poppler-glib.dir/poppler-action.cc.o cd /home/sander/poppler/build/glib && /usr/bin/c++ -DG_LOG_DOMAIN=\"Poppler\" -DHAVE_CONFIG_H=1 -DUSE_OPENJPEG2 -Dpoppler_glib_EXPORTS -I/home/sander/poppler -I/home/sander/poppler/fofi -I/home/sander/poppler/goo -I/home/sander/poppler/poppler -I/home/sander/poppler/build -I/home/sander/poppler/build/poppler -I/home/sander/poppler/glib -I/home/sander/poppler/build/glib -I/usr/include/freetype2 -I/usr/include/x86_64-linux-gnu -I/usr/include/openjpeg-2.1 -Wall -Wcast-align -fno-exceptions -fno-check-new -fno-common -Wnon-virtual-dtor -Woverloaded-virtual -D_DEFAULT_SOURCE -Wsuggest-override -g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline -fPIC -I/usr/include/nss -I/usr/include/nspr -std=c++11 -o CMakeFiles/poppler-glib.dir/poppler-action.cc.o -c /home/sander/poppler/glib/poppler-action.cc In file included from /home/sander/poppler/glib/poppler-action.cc:19:0: /home/sander/poppler/glib/poppler.h:22:10: fatal error: glib-object.h: Datei oder Verzeichnis nicht gefunden (i.e.: File or directory not found) #include <glib-object.h> ^~~~~~~~~~~~~~~ compilation terminated. glib/CMakeFiles/poppler-glib.dir/build.make:95: die Regel für Ziel „glib/CMakeFiles/poppler-glib.dir/poppler-action.cc.o“ scheiterte
What does "grep GLIB2_INCLUDE_DIRS CMakeCache.txt" output? Did you remove CMakeCache.txt before running cmake?
> What does "grep GLIB2_INCLUDE_DIRS CMakeCache.txt" output? ~/poppler/build(master)> grep GLIB2_INCLUDE_DIRS CMakeCache.txt ~/poppler/build(master)> > Did you remove CMakeCache.txt before running cmake? Yes, I started from an empty build directory.
What does "pkg-config --cflags glib-2.0 " output?
~/poppler/build(master)> pkg-config --cflags glib-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
Do you by any chance have ran autoconf in the source folder you're trying to run cmake now? That confuses the paths and everything breaks, i.e. if unsure just checkout the sourcecode again.
I asked my local cmake guru. Here's what he found: I do not have the cairo dev headers installed. However, the cmake code that determines the glib flags macro_optional_find_package(GLIB) (in CMakeLists.txt:163) is hidden behind if(CAIRO_FOUND) (in CMakeLists.txt:156), and therefore not executed on my machine. I can hack my way around this problem, e.g., with --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,6 +175,7 @@ if(CAIRO_FOUND) endif() else() set(CAIRO_FEATURE "#undef POPPLER_HAS_CAIRO") + set(ENABLE_GLIB OFF) endif() if(ENABLE_CPP) macro_optional_find_package(Iconv) but that's probably not a good general solution.
It actually is the correct solution.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.