[gdal-dev] Handling pdfium build / integration

Even Rouault even.rouault at spatialys.com
Fri Sep 18 05:19:59 PDT 2015


Le vendredi 18 septembre 2015 14:01:22, Brad Hards a écrit :
> On Fri, 18 Sep 2015 02:02:14 PM you wrote:
> > > ar: creating ./libbigint.a.new
> > > ar: BigInteger.o: No such file or directory
> > > ar: creating ./libfx_libopenjpeg.a.new
> > > ar: bio.o: No such file or directory
> > > ar: creating ./libfx_libjpeg.a.new
> > > ar: fpdfapi_jcapimin.o: No such file or directory
> > > ar: creating ./libfx_lcms2.a.new
> > > ar: cmscam02.o: No such file or directory
> > > ar: creating ./libfx_zlib.a.new
> > > ar: adler32.o: No such file or directory
> > > ar: creating ./libfreetype.a.new
> > > ar: cff.o: No such file or directory
> > > ar: creating ./libfx_agg.a.new
> > > ar: agg_curves.o: No such file or directory
> > 
> > Yes, I do also get those errors, but they can be ignored. Perhaps the
> > build scrip could be improved to hide that.
> 
> I think just removing those steps should work. Will play around a little
> more with testing before sending a random patch though...
> 
> > > ./configure --with-pdfium=/home/bradh/pdfium/install
> > > 
> > > 
> > > I tried to remove that part, and then it looks like its OK, although
> > > gdal complains about CFDF_Document::CreateNewDoc being hidden when I
> > > build.
> 
> OK, so that is probably a different error.
> 
> > And if you just let the script run ? That works for me (GCC 4.7.0)
> 
> It looks like its an error in 4.9.0.

The symbol is indeed hidden:
$ objdump -tC ../install/lib/pdfium/libfpdfapi.a | grep CFDF_Document::CreateNewDoc
0000000000000000 g     F .text._ZN13CFDF_Document12CreateNewDocEv	00000000000000ac .hidden CFDF_Document::CreateNewDoc()

But it is not directly used by the PDF driver, so it is strange that the linker complains about that.

You can probably try the following workaround to disable hidden symbols when building pdfium
(in pdfium directory). I had to use that when I worked with a debug build as otherwise debugging
didn't work very well.

diff --git a/build/standalone.gypi b/build/standalone.gypi
index ecf849b..3407a56 100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -151,7 +151,7 @@
       '-Wno-unused-parameter',
       '-pthread',
       '-fno-exceptions',
-      '-fvisibility=hidden',
+      #'-fvisibility=hidden',
       '-fPIC',
     ],
     'cflags_cc': [


> 
> Brad

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list