MDB driver does not find Mac Java installs
|Reported by:||larrysh||Owned by:||warmerdam|
|Severity:||normal||Keywords:||mdb, access, java|
On Mac, with GDAL 1.10.1, the PGeo and Geomedia OGR drivers do not work due to non-functioning MDB Tools (I can install and config, but fails to load .mdb files). However, the MDB driver does function well, though Java installs aren't found by ./configure on Mac.
The two Java JDK setups on Mac are Apple-supported (<= 10.8, up to recent Java 1.6) and Oracle third-party manual install (10.8+, Java 1.6+). The Apple-supported Java is framework-based, the Oracle install has a similar layout to Unix/Linux? installs.
Attached to ticket is a patch to ./configure to add support for finding Java installs for Mac. Note, I don't do much editing of configure scripts, so some code review would be appreciated. I tried to allow for auto-finding of install, with Oracle taking preference:
--with-java=yes \ --with-jvm-lib-add-rpath=yes \ --with-mdb=yes
The rpath is only embedded for Oracle (non-framework) installs. Since the Mac install_name id of the Oracle libjvm.dylib starts with @rpath already, the dylib is set up for lazy dynamic loading, otherwise the embedded rpath is ignored and gdal throws a dylib loading error. The lazy loading also avoids needing to 'fix' gdal after building by using install_name_tool to adjust the libjvm id.
I also tried to ensure the following could be used, in addition to auto-finding:
--with-java=/path/to/jdk/root/path \ --with-jvm-lib=/path/to/libjvm/directory \ --with-mdb=yes
Patch tested on Mac 10.7.5 with Apple-supported Java 1.6, and on Mac 10.8.5 with Oracle Java 1.7 install. Not tested on Mac 10.6.8, yet.
On a documentation note, the location of .jar extensions on Mac, for the extra .jar files noted on the MDB driver page, regardless of Apple or Oracle Java install, is:
Change History (8)
comment:3 Changed 4 years ago by
|Component:||OGR_SF → ConfigBuild|
|Status:||new → closed|