[gdal-dev] Enable --with-static-proj4 by default if ESRI FGDB option is given on Linux
Andrew Joseph
ap.joseph at live.com
Wed Nov 15 12:55:06 PST 2017
I ran into an issue a few days ago where an ogr_fdw foreign data wrapper in
postgis was throwing
[XX000] ERROR: AddToPROJ4SRSCache: could not parse proj4 string '+proj=lcc
+lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667
+lon_0=-100.3333333333333 +x_0=699999.9998983998 +y_0=3000000 +datum=NAD83
+units=us-ft +no_defs ' unknown elliptical parameter name
See
http://postgis.17.x6.nabble.com/XX000-ERROR-AddToPROJ4SRSCache-could-not-parse-proj4-string-td5011978.html
I built Proj4 from source and removed all apt packages that depended on
proj4 and ensured that the relevant grids were installed. To my great
astonishment and misery, the issue still persisted, so I assumed it was a
bug in ogr_fdw gdal/postgis/gdal. After several days of trying different
version combinations to try to determine which package was responsible, I
still received the same error. Finally, I recompiled GDAL without ESRI FGDB
support and to my amazement everything worked perfectly. I thought to
myself, how could the FGDB library possibly affect proj4 when there is no
libproj.so that comes with it? Then I found this:
http://osgeo-org.1560.x6.nabble.com/gdal-dev-compiling-gdal-with-esri-file-gdb-td5311469.html
Apparently the ESRI FGDB library is packaged in a nonstandard way that
results in proj4 being embedded in the .so file -like a tapeworm -wreaking
silent havoc on all packages that depend on proj4.
To save others from this hellish debugging process, it might be worth
either checking for the FGDB libraries and throwing an error if GDAL is
configured without --wtih-static-proj4=location or setting that option by
default.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171115/755ea8ec/attachment.html>
More information about the gdal-dev
mailing list