Skip to content

Instantly share code, notes, and snippets.

@zhm
Created March 5, 2012 00:55
Show Gist options
  • Save zhm/1975726 to your computer and use it in GitHub Desktop.
Save zhm/1975726 to your computer and use it in GitHub Desktop.
Building GDAL 1.9 with MDB (PGeo) support on OS X Lion
- Download and install the "Java for Mac OS X 10.7 Update 1 Developer Package" from https://developer.apple.com/downloads/index.action
- Download jackcess-1.2.6.jar from http://sourceforge.net/projects/jackcess/files/jackcess/1.2.6/jackcess-1.2.6.jar/download
- Download http://mdb-sqlite.googlecode.com/files/mdb-sqlite-1.0.2.tar.bz2 to get commons-lang-2.4.jar and commons-logging-1.1.1.jar. They will go alongside jackcess in the $CLASSPATH after it builds.
- In the GDAL source root, edit the configure.in and replace it with https://gist.github.com/1975654
- In the GDAL source root, run ./autogen.sh to re-create the configure script
- ./configure --with-java=yes --with-mdb=yes --with-jvm-lib=/System/Library/Frameworks/JavaVM.framework/Libraries
- make && make install (I suggest a custom --prefix with ./configure so you don't conflict with other versions of GDAL, e.g. homebrew)
- Copy jackcess-1.2.6.jar, commons-lang-2.4.jar, and commons-logging-1.1.1.jar to /Library/Java/Extensions so java can find them.
- Test it out ./ogr2ogr -f "SQLite" ~/data/test_output.sqlite ~/data/test_input.mdb
@patdevinwilson
Copy link

If you're on Yosemite, you'll can find Java http://osxdaily.com/2014/10/21/get-java-os-x-yosemite/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment