hforge / itools

Python library with tons of features
http://www.hforge.org/itools
GNU General Public License v3.0
22 stars 12 forks source link

setup.py cflags poppler #55

Closed Ramel closed 7 years ago

Ramel commented 7 years ago

On Ubuntu, I always have an error at itools installation:

building 'itools.pdf.pdftotext' extension
creating build/temp.linux-x86_64-2.7/itools/pdf
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c itools/pdf/pdftotext.cc -o build/temp.linux-x86_64-2.7/itools/pdf/pdftotext.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
itools/pdf/pdftotext.cc:19:24: fatal error: goo/gtypes.h: Aucun fichier ou dossier de ce type
 #include <goo/gtypes.h>
                        ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

It seems that the setup.py request to cflags is buggy.

pkg-config --cflags --atleast-version=0.20.0 --libs poppler fontconfig
# return nothing here, empty!? So the build/install fail, even if poppler is installed!
# Replacing this CLI by:
pkg-config --cflags --libs "poppler >= 0.20.0" fontconfig
# Then return
-I/usr/local/include/poppler -I/usr/include/freetype2  -L/usr/local/lib -lpoppler -lfontconfig -lfreetype