[gdal-dev] GDAL 2.2.0beta1 and old poppler libraries

Andrew C Aitchison andrew at aitchison.me.uk
Sun Apr 16 12:31:09 PDT 2017


GDAL 2.2.0 beta1
Scientific Linux 6 (= CentOS6 =  Red Hat EL 6).
g++ 4.9.2 and g++ 5.3.1

gdal-2.2.0/frmts/pdf/pdfdataset.cpp does not compile on my
Scientific Linux 6 (= CentOS6 =  Red Hat EL 6) machine.

pdfio.h lines 87-90:
    private:
         /* Added in poppler 0.15.0 */
         virtual GBool hasGetChars() override;
         virtual int getChars(int nChars, Guchar *buffer) override;

Earlier in the same file we have
#ifdef POPPLER_0_23_OR_LATER
         virtual BaseStream* copy() override;
#endif

I guess we need to add a POPPLER_0_15_OR_LATER preprocessor definition
but I don't know whether configure.ac would be only place we need to
define it ?

The full compiler objection is:

./configure --with-ecw=/home/werdna/gdal1.11/ecw3 --prefix=/usr/local/gdal2.2.0beta1 --with-poppler
make
 		...		...
make[2]: Entering directory `/home/werdna/gdal2.2.0beta1/gdal-2.2.0/frmts/pdf'
/bin/sh /home/werdna/gdal2.2.0beta1/gdal-2.2.0/libtool --mode=compile --tag=CXX g++ -std=gnu++11 -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/port -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/gcore -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/alg -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/ogr -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/ogr/ogrsf_frmts -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/gnm -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/apps -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names  -I../vrt -I../mem -I../../ogr/ogrsf_frmts/mem -DGNM_ENABLED -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/port -I/usr/include -I/usr/include/cfitsio  -DGDAL_COMPILATION -DHAVE_POPPLER -DPOPPLER_HAS_OPTCONTENT -I/usr/include -I
 /usr/include/poppler   -c -o ../o/pdfdataset.lo pdfdataset.cpp
libtool: compile:  g++ -std=gnu++11 -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/port -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/gcore -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/alg -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/ogr -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/ogr/ogrsf_frmts -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/gnm -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/apps -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2 -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -I../vrt -I../mem -I../../ogr/ogrsf_frmts/mem -DGNM_ENABLED -I/home/werdna/gdal2.2.0beta1/gdal-2.2.0/port -I/usr/include -I/usr/include/cfitsio -DGDAL_COMPILATION -DHAVE_POPPLER -DPOPPLER_HAS_OPTCONTENT -I/usr/include -I/usr/include/poppler -c pdfdataset.cpp  -fPIC -DPIC -o ../o/.lib
 s/pdfdataset.o
In file included from pdfdataset.cpp:47:0:
pdfio.h:89:23: error: 'virtual GBool VSIPDFFileStream::hasGetChars()' marked override, but does not override
          virtual GBool hasGetChars() override;
                        ^
pdfio.h:90:21: error: 'virtual int VSIPDFFileStream::getChars(int, Guchar*)' marked override, but does not override
          virtual int getChars(int nChars, Guchar *buffer) override;
                      ^
make[2]: *** [../o/pdfdataset.lo] Error 1
make[2]: Leaving directory `/home/werdna/gdal2.2.0beta1/gdal-2.2.0/frmts/pdf'
make[1]: *** [pdf-install-obj] Error 2
make[1]: Leaving directory `/home/werdna/gdal2.2.0beta1/gdal-2.2.0/frmts'
make: *** [frmts-target] Error 2


More information about the gdal-dev mailing list