[gdal-dev] compiling gdal with esri file gdb

Even Rouault even.rouault at spatialys.com
Fri Mar 10 09:16:23 PST 2017


On vendredi 10 mars 2017 12:57:05 CET Robert Coup wrote:
> Hi Even,
> 
> On 9 March 2017 at 23:03, Even Rouault <even.rouault at spatialys.com> wrote:
> > For those, at least on Linux, and which use GDAL compiled *without*
> > --with-static-proj, you may get strange projection related failures at
> > runtime. This is due to libFileGDBAPI.so embedding a copy of proj.4
> > (without symbol hidding or renaming !!!), which conflicts with the proj.4
> > that GDAL will load dlopen(). Typical error emitted is about "unknown
> > ellipsoid".
> 
> I presume there's no workaround apart from --with-static-proj that doesn't
> require ESRI to change their build process?

Hi Rob,

Yeah, I'm not even sure if --with-static-proj (which contrary to what its name my suggst will 
link against libproj.so if found) is completely safe, but it did work for me.

Strangely, even without --with-static-proj, it worked for me at first, but then failed when I 
probably reordered paths in my LD_LIBRARY_PATH. But I'm not so surprised: clashing 
symbols issues tend to be not predictable.

In fact,  libFileGDBAPI.so doesn't seem to embed all public proj.4 symbols. The functions are 
missing. But 5 or 6 global array structures, like the list of datums (pj_datums) are exposed in 
the data read-only section. The issue is that pj_datums doesn't seem to have the same 
structure: 2 columns per record in the ESRI version whereas official proj.4 expects 4 columns

$ objdump -T /home/even/FileGDB_API-64gcc51/lib/libFileGDBAPI.so | grep pj_
00000000010dc880 g    DO .data.rel.ro	00000000000000b0  Base        pj_datums
0000000001294080 g    DO .data.rel.ro	0000000000000570  Base        pj_projections
00000000010dbd20 g    DO .data.rel.ro	0000000000000500  Base        pj_pids
00000000010dc7a0 g    DO .data.rel.ro	00000000000000e0  Base        pj_primems
00000000010dc380 g    DO .data.rel.ro	0000000000000420  Base        pj_ellipses
00000000010dc220 g    DO .data.rel.ro	0000000000000160  Base        pj_linunits

Even


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170310/95e08cb4/attachment-0001.html>


More information about the gdal-dev mailing list