9

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.

  • 1
    Looks like there are configuration options built in to the debian source. Try --without-ruby in config. Personally, I would build from gdal source and specify exactly what you need. – user10353 Oct 10 '13 at 22:34
3

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

  • This worked for me, but with a few extra steps (setting ldconfig variables), highlighted in this post. Question though, what will happen when GDAL needs to be updated? – gregmacfarlane Aug 18 '14 at 14:21
  • Unfortunately I think the compilation procedure must be repeated, at least until a package similar to "libgdal-ecw-src" will be available for Ubuntu. – MickyInTheSky Aug 19 '14 at 6:38
1

I'm not really sure about the technical part. Is the /home/scruss/gdal-1.10.0/debian/tmp/usr/local/lib/site_ruby/1.9/ directory empty? Or doesn't it exist? Perhaps you need to put an alternative path in your debian/rules

There is a nice tutorial here that could be helpful.

  • the …/1.9/ folder does not exist. site_ruby is at 1.9.1 for the system. – scruss Oct 9 '13 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.