Thursday, 9 July 2015

qgis - Building FGDB support for GDAL 1.10 on Ubuntu


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.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...