Josh- I think you're fixing the wrong thing. What's broken isn't the filename... what's broken is the way we load the native library...
A better way to do it is to set LD_LIBRARY_PATH or set -Djava.library.path and call System.load(), or we can call it explicitly by name. Either way, Platform.getPlatform needs to go away. Also, I checked, and on a Mac, jnilib is the preferred filename extension for JNI native libraries, and works across the widest variety of Mac's. Only newer Mac's will have JREs that understand the dylib extension with System.load(). This point is moot, though, because I don't think we support older Macs. Also, for Mac's, the Platform.getPlatform method of getting the filename was completely irrelevant and confusing anyway... because the dynamic libraries for Mac can be built multi-arch, and a single library will work on both 32-bit and 64-bit. Also, we should drop Platform.getPlatform because we should drop support for 32-bit ;0 -- Christopher L Tubbs II http://gravatar.com/ctubbsii ---------- Forwarded message ---------- From: <[email protected]> Date: Thu, Oct 31, 2013 at 11:36 PM Subject: git commit: ACCUMULO-1843 Use the correct name that Platform.getPlatform generates when building the native map library To: [email protected] Updated Branches: refs/heads/master e639ac33b -> 96b8d23a7 ACCUMULO-1843 Use the correct name that Platform.getPlatform generates when building the native map library Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/96b8d23a Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/96b8d23a Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/96b8d23a Branch: refs/heads/master Commit: 96b8d23a71252e3d18b03c94c86dd3a307b4845f Parents: e639ac3 Author: Josh Elser <[email protected]> Authored: Thu Oct 31 23:36:06 2013 -0400 Committer: Josh Elser <[email protected]> Committed: Thu Oct 31 23:36:06 2013 -0400 ---------------------------------------------------------------------- server/native/src/main/resources/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/96b8d23a/server/native/src/main/resources/Makefile ---------------------------------------------------------------------- diff --git a/server/native/src/main/resources/Makefile b/server/native/src/main/resources/Makefile index e016471..63c9b16 100644 --- a/server/native/src/main/resources/Makefile +++ b/server/native/src/main/resources/Makefile @@ -26,7 +26,7 @@ endif ifeq ($(shell uname),Darwin) JAVA_HOME=$(shell /usr/libexec/java_home) - NATIVE_LIB:= libaccumulo.jnilib + NATIVE_LIB:= libNativeMap-Mac_OS_X-x86_64-64.dylib # Update flags for OSX-10.9 and Xcode 5.0.1 # I think that we should be able to remove the `-undefined dynamic_lookup` option, # but I don't know exactly how to go about this.
