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

librocksdbjni 5.3.4 undefined symbol: ZSTD_versionNumber #2280

Closed
jpe42 opened this issue May 11, 2017 · 12 comments
Closed

librocksdbjni 5.3.4 undefined symbol: ZSTD_versionNumber #2280

jpe42 opened this issue May 11, 2017 · 12 comments
Assignees
Labels
bug Confirmed RocksDB bugs java-api

Comments

@jpe42
Copy link

jpe42 commented May 11, 2017

I'm getting the following error message since upgrading from version 5.2.1 to 5.3.4 of rocksdbjni. rocksdbjni 5.3.4 works fine locally on Mac0S with RocksDB 5.3.4 installed through brew. Running it against RocksDB 5.3.4 on Debian Sid is where I get the error.

java: symbol lookup error: /tmp/librocksdbjni6228543948847813430.so: undefined symbol: ZSTD_versionNumber

I moved back to rocksdbjni 5.2.1, keeping everything else the same and it works again.

@jpe42
Copy link
Author

jpe42 commented May 11, 2017

@adamretter Looks like your recent PR, #2279, will fix this? I will try to run against it as soon as it is out to confirm everything is working.

@nihathrael
Copy link

I have a very similar/the same error using Arch Linux:
/usr/lib/jvm/java-8-jdk/bin/java: symbol lookup error: /tmp/librocksdbjni7451032689798428193.so: undefined symbol: ZSTD_versionNumber

@adamretter adamretter self-assigned this May 13, 2017
@adamretter
Copy link
Collaborator

@jamespedwards42 Okay so I think I misunderstood what you were attempting to do.

Previously I thought you were using the Java artifacts that we release to Maven Central, but I see from your Dockerfile that you actually are building the tag from source code, and your Makefile target is shared_lib. What this implies to me is that when you run RocksJava, it cannot find the dynamically linked library for libzstd. I think you need to make sure that that is available on your LD_LIBRARY_PATH or similar.

I will follow the steps of your Dockerfile to try and reproduce on a Debian VM here.

@nihathrael
Copy link

Hi, I am using the jar file from Maven Central and get the aforementioned error, without using a custom build.

@adamretter
Copy link
Collaborator

@nihathrael okay I will take a look into that too

@adamretter
Copy link
Collaborator

@nihathrael @jamespedwards42 I don't understand exactly how the linking works as I am more of a Java than a C++ guy, but I have done some experiments and I believe that #2292 now fixes both of your issues.

Let me know, and if it works, we will try and cut another release ASAP.

@jpe42
Copy link
Author

jpe42 commented May 13, 2017

@adamretter I am in the same boat regarding Java versus C++. I've never built the rocksdb jni library before; I just use what is available in the maven repo. I will look into building it early this next week and give it a go.

@adamretter
Copy link
Collaborator

adamretter commented May 14, 2017 via email

@jpe42
Copy link
Author

jpe42 commented May 14, 2017

@adamretter Looks like it fixed it!

I checked out your branch, adamretter:java-zstd-linking, and built with the following:

docker run --rm -it -v /$(pwd)/:/rocksdb -w /rocksdb openjdk:9-jdk bash
apt-get install build-essential
make rocksdbjavastatic

Currently running with that jar, with no issues.

@adamretter
Copy link
Collaborator

@jamespedwards42 Okay thanks for the feedback James. I will try and cut a new release once @sagar0 has confirmed he is happy and has merged that in.

@nihathrael
Copy link

@adamretter I compiled your branch and everything works as expected. Thanks for the quick fix, much appreciated!

sagar0 pushed a commit that referenced this issue May 16, 2017
… build

Summary:
Closes #2280
Closes #2292

Differential Revision: D5061259

Pulled By: sagar0

fbshipit-source-id: eec89111d114c04beee5870a4eb4b51857754783
sagar0 pushed a commit that referenced this issue May 18, 2017
… build

Summary:
Closes #2280
Closes #2292

Differential Revision: D5061259

Pulled By: sagar0

fbshipit-source-id: eec89111d114c04beee5870a4eb4b51857754783
@adamretter
Copy link
Collaborator

We just released 5.3.6 which I believe now addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed RocksDB bugs java-api
Projects
None yet
Development

No branches or pull requests

3 participants