[GIS] Building FGDB support for GDAL 1.10 on Ubuntu

file-geodatabasegdallinuxqgisUbuntu

Because data.gc.ca is now distributing some of its data in FGDB format (example: Plant Hardiness Zones), I would like to be able to use it with gdal/QGIS. The compile/install is not going as planned, however.

These are the steps I've taken:

  1. Enabled the source repository for ubuntugis-unstable.
  2. Downloaded the Linux 64-bit File Geodatabase API 1.3, installed it in /usr/local/FileGDB_API, added the necessary ldconfig setting, and successfully built and run the test programs. (As suggested procedure here: [Qgis-user] How to compile gdal with ESRI FileGDB)
  3. Installed the necessary source dependencies: sudo apt-get build-dep gdal
  4. Pulled down the source: apt-get source gdal
  5. Added the line --with-fgdb=/usr/local/FileGDB_API \ to the configure command in the debian/rules file.
  6. From the source directory, issued dpkg-buildpackage -rfakeroot -uc -b (as advised here: How do I get the source code of packages installed through apt-get? – Ask Ubuntu)

The build goes well, but fails late in the package compilation stage, complaining about a missing Ruby 1.9 tree in the fakeroot filesystem:

…
mv /home/scruss/gdal-1.10.0/debian/tmp/usr/local/lib/site_ruby/1.9/* /home/scruss/gdal-1.10.0/debian/tmp/usr/lib/ruby/1.9/.
mv: cannot stat ‘/home/scruss/gdal-1.10.0/debian/tmp/usr/local/lib/site_ruby/1.9/*’: No such file or directory
make: *** [install] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

As this is unrelated to FGDB, it looks like I've got everything else in place. But it also likely means that gdal wouldn't build anyway.

I'd rather stick with the ubuntugis packaging, as Ubuntu/Debian gets difficult with source packages built outside its control.

Best Answer

This is my procedure to install gdal 1.10 (from source) with FileGDB_API support enabled on Ubuntu 12.04 LTS client.

--> Assuming that

  1. don't use ubuntuGIS repository to install gdal/ogr (in this case);
  2. "libFileGDBAPI library" is already installed ( I used "/usr/local/FileGDB_API" as default location);

cd /path/to/gdalSourceDirectory
./configure --with-fgdb=/usr/local/FileGDB_API
make
make install

Here a screenshot of my system

Related Question