Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on JDK 7 on OS X due to no snappyjava in java.library.path #62

Closed
bobbyno opened this issue Aug 24, 2012 · 4 comments
Closed

Comments

@bobbyno
Copy link

bobbyno commented Aug 24, 2012

$ mvn -v 
Apache Maven 3.0.4 (r1232337; 2012-01-17 02:44:56-0600)
Maven home: /usr/local/Cellar/maven/3.0.4/libexec
Java version: 1.7.0_06, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_06.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.7.4", arch: "x86_64", family: "mac"

$ mvn clean package
Running com.thinkaurelius.titan.diskstorage.astyanax.InternalAstyanaxKeyColumnValueTest
java.lang.reflect.InvocationTargetException
...
Caused by: java.lang.UnsatisfiedLinkError: no snappyjava in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
    at java.lang.Runtime.loadLibrary0(Runtime.java:845)
    at java.lang.System.loadLibrary(System.java:1084)
    at org.xerial.snappy.SnappyNativeLoader.loadLibrary(SnappyNativeLoader.java:52)
    ... 25 more

Workaround:

  1. Download libsnappyjava.jnilib from Google Code
  2. Copy to a directory on the java.library.path, e.g. /usr/lib/java/
  3. Rename to libsnappyjava.dylib per the snappy issue
  4. chmod 755 /usr/lib/java/libsnappyjava.dylib
  5. mvn clean package should now work
  6. ???
  7. Profit
@mbroecheler
Copy link
Member

Thanks for the workaround. Obviously we want this to work out of the box. Is this a known issue in JDK 7 on Mac OS? Does it apply to other operating systems?

@bobbyno
Copy link
Author

bobbyno commented Aug 25, 2012

Yes, it's a known issue involving changes in the naming conventions for shared libraries in JDK 7 on OS X. It doesn't affect other operating systems.

This issue was accepted as a defect and is scheduled to be included in the 1.0.5 snappy-java release, but there's no indication in that community when that will happen. I've asked the maintainer for an update.

@xedin
Copy link
Member

xedin commented Jan 10, 2013

added 1.5.0-M3 to the cassandra pom, tests on Mac OS X 10.7.5 with JDK 7 issue was fixed, closing.

@xedin xedin closed this as completed Jan 10, 2013
@heyvishy
Copy link

heyvishy commented Sep 5, 2013

Thanks for this workaround. Although in my case, I skipped step 3 and 4 and it worked fine for me.
I am using Mac OS 10.7.5

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

No branches or pull requests

4 participants