Sure, I agree with what you're saying, but changing it the way you broke me :)

I'm all for loading the native library (on all platforms) in the expected/best manner, but, until we get something better/consistent than Platform.getPlatform, I still want to be able to use the native map.

re: arch, I think OSX has been 64-bit for quite a while (years)? The multi-arch may not really matter as much then, but I'm not positive.

Additionally, I think something is screwy with the accumulo-native exec-plugin invocation. It's failing for me with the old and the new name. I'll make a ticket for that though.

On 11/1/13, 1:05 AM, Christopher wrote:
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.

Reply via email to