Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6653 closed defect (fixed)

PDFium driver build failure

Reported by: shot2 Owned by: warmerdam
Priority: normal Milestone: 2.2.0
Component: default Version: svn-trunk
Severity: minor Keywords: pdfium build
Cc: Kurt Schwehr


vanilla Ubuntu 16.04 x64, gdal-svn-trunk-2016.09.15, pdfium static library built from github's rouault/pdfium

./configure --without-jpeg12 --with-armadillo --with-dods-root=/usr --with-epsilon --with-gnm --with-hdf5=/usr/lib/x86_64-linux-gnu/hdf5/serial --without-jasper --with-liblzma --with-msg --with-mysql --with-python --with-sosi --with-spatialite --with-static-proj4 --with-webp --with-pdfium=/home/admin/pdfium/install

The build fails with the following error, related to frmts/pdf/pdfdataset.cpp:

pdfdataset.cpp: In function 'int LoadPdfiumDocumentPage(const char*, const char*, int, TPdfiumDocumentStruct**, TPdfiumPageStruct**, int*)':
pdfdataset.cpp:1144:5: error: 'poDoc' was not declared in this scope
     poDoc = it->second;
pdfdataset.cpp:1148:16: error: 'poDoc' was not declared in this scope
   int nPages = poDoc->doc->GetPageCount();
../../GDALmake.opt:647: recipe for target '../o/pdfdataset.lo' failed
make[2]: *** [../o/pdfdataset.lo] Error 1
make[2]: Leaving directory '/var/tmp/dmz/gdal-svn-trunk-2016.09.15/frmts/pdf'
GNUmakefile:15: recipe for target 'pdf-install-obj' failed
make[1]: *** [pdf-install-obj] Error 2
make[1]: Leaving directory '/var/tmp/dmz/gdal-svn-trunk-2016.09.15/frmts'
GNUmakefile:88: recipe for target 'frmts-target' failed
make: *** [frmts-target] Error 2

It appears a poDoc declaration is missing from a code block in pdfdataset.cpp.

I suspect it occurred after code cleanup/refactoring around r34970, see diff:

Change History (7)

comment:1 by Even Rouault, 6 years ago

Cc: schwehr added

Kurt, could you look at this ?

(normally my "trunk_gcc4.8_stdc11" Travis-CI branch should have caught this, but I see that for some reason pdfium detection at configure time no longer works in it, hence it went unnoticed. Which is a different issue)

comment:2 by Even Rouault, 6 years ago

Cc: Kurt Schwehr added; schwehr removed

comment:3 by Even Rouault, 6 years ago

Resolution: fixed
Status: newclosed

In 35469:

PDF: fix build failure with Pdfium enables (fixes #6653)

comment:4 by Even Rouault, 6 years ago

In 35470:

configure: make pdfium detection not fail if there are just warnings. And make configure fail if --with-pdfium was required but failed (refs #6653)

comment:5 by Even Rouault, 6 years ago

In 35471:

PDF: disable -Wzero-as-null-pointer-constant -DNULL_AS_NULLPTR when pdfium is enables (refs #6653)

comment:6 by Even Rouault, 6 years ago

In 35472:

PDF: adjust test check for pdfium (refs #6653)

comment:7 by Even Rouault, 6 years ago

No action left for you Kurt. I fixed the issue, and the other build issues related to the conf of the Travis-CI instance.

Note: See TracTickets for help on using tickets.