-
Notifications
You must be signed in to change notification settings - Fork 233
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
Native library loading fails on openjdk7u4 for mac #6
Comments
Any news on this issue? Among other things, it makes it impossible to run Cassandra on JDK 7 on OS X without workarounds. If @xerial has a good strategy for dealing with the root cause in mind, I would be interested in submitting a pull request with a fix. |
Having both .jnilib and .dylib in src/main/resources/org/xerial/snappy/native/Mac/x86_64 would be reasonable, since And building a native library for Mac with jdk7 would be possible by supplying an option: Fow now I simply duplicate the native library. |
@xerial fantastic. Would it be difficult to publish a new point release with this in? Thank you very much! |
I deployed snapshot release with this fix. Try snappy-java-1.0.5-20120907.023008-2.jar |
I can confirm that Cassandra 1.1 starts fine when the Snappy jar is replaced with this snapshot. |
Thanks for the report. Now I close this issue. |
When you issue a new release, please leave a comment here. I will file an issue for Cassandra to update the dependency. |
A milestone release is here, which will be synchronized to Maven central repo in a few hours: |
I updated my app to 1.0.5-M1 but I am still hitting this issue. I am using embedded cassandra. I can try to create a repro |
This fails for me: https://github.com/carllerche/snappy-repro
Here is the contents of the jar:
|
Thanks for the report. It looks like 1.0.5-M1 properly contains Does it work if you replace 1.0.5-M1 to a snapshot version 1.0.5-SNAPSHOT mentioned above? |
I confirmed the reported problem is reproduced in 1.7.0u4.jdk both in M1 and the snapshot version. |
It looks like SnappyLoader.class.getResource(...) cannot find .dylib file. |
The cause of this problem is that openjdk7u4 returns "universal" as os.arch value, so |
Deployed snappy-java-1.0.5-M2 that fixes this issue. This release will be available in a few hours from Maven central. |
I updated my simple repro case to M2, however that does not fix the issue for me. |
I created a new snapshot release that at least works in my Mac 10.6 with openjdk7. |
That seems to work for me. Thanks |
Hi is there a release planned that incorporates this fix anytime soon? The Cassandra project won't take a beta version - cheers |
Hey - Same question here; eagerly waiting for the next release 🎉 |
I have to upgrade to a -M release for this to work. When will an actual release (not -rc or -M) include this? 1.0.5 seems abandoned for 1.1.0, but neither is released, only in pre-release. |
@scottcarey If 1.0.5-M4 works well for your usage, I will create a new release version for 1.0.5 based on -M4 this week. I simply have been waiting bug reports. Release of 1.1.0 needs some work to do, listed in milestone page: https://github.com/xerial/snappy-java/issues/milestones |
For reference, I'm working dependency details for Apache Avro's next release: https://issues.apache.org/jira/browse/AVRO-1311 I'll see about changing to 1.0.5-M4 temporarily so others can test, then using a 1.0.5 final if that works out. |
Its working for me on mac, and others on Avro in Ubuntu. I'd be interested in a release of 1.0.5. Are there changes in this version that are risky? |
Hi, Thanks for testing the 1.0.5-M4 release. I just released stable 1.0.5 version, which is available in Maven central In version 1.1.0, we will introduce several changes in native library Regards, |
Hi, I have just checked the binary for released version 1.0.5 from google code as well as the tar.gz archive on github and it seems that it still does not include the Mac library with the .dylib extension. Could you please confirm the fix is in 1.0.5? Cheers, |
Please use 1.0.5-M4. This version has a fix that even if .dylib file is not found, trying to load .jnilib instead. |
It boggles me why the fix is in M4 but removed from the final release. Here is a simple workaround in Mac with JDK 7 for anyone looking for answers in this thread. Add a system property: -Dorg.xerial.snappy.lib.name=libsnappyjava.jnilib |
@mdaxini Thanks. |
Cannot use 1.1.0-M4 due to native libraries not being compatible with the c libraries on the available OS. No control over changing the OS at this time. Thanks for the quick response. |
@mdaxini I tested 1.1.0-M4 in Mac OS X 10.7 (Intell 64bit) and it works well. |
An easy fix if you want to continue to use 1.4.0.1 on MacOSX with JDK 1.7 unzip snappy-java-1.0.4.1.jar |
What steps will reproduce the problem?
What is the expected output? What do you see instead?
I expect Snappy to work. But it fails to find the native library.
What version of the product are you using? On what operating system?
Snappy 1.0.4.1, OS X 10.7, OpenJDK7u4
Please provide any additional information below.
The openjdk guys have changed System.mapLibraryName to return an extension of "dylib" instead of "jnilib". It looks like this will be the standard for openjdk7 on mac. They have put some backwards compatibility hooks in System.loadLibrary, but this does not help the code in SnappyLoader.
The related code is in SnappyLoader:
On OpenJDK7 on Mac, it attempts to look for libsnappyjava.dylib. In the jar, it is packaged as libsnappyjava.jnilib, so it fails.
It seems the only reasonable fix is to check for both the dylib and jnilib extensions when on a Mac.
Migrated from http://code.google.com/p/snappy-java/issues/detail?id=39
earlier comments
james@tyrrells.com said, at 2012-06-26T04:06:14.000Z:
Duplicating "libsnappyjava.jnilib" with a .dylib extension fixed the issue for me too.
taroleo said, at 2012-06-30T12:04:12.000Z:
Issue 42 has been merged into this issue.
taroleo said, at 2012-06-30T12:04:26.000Z:
Issue 42 has been merged into this issue.
The text was updated successfully, but these errors were encountered: