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

[Java][JNI] Improve current cmake java libraries dependencies that needs Protobuf_ROOT and Protobuf_USE_STATIC_LIBS variables #36957

Open
davisusanibar opened this issue Jul 31, 2023 · 2 comments

Comments

@davisusanibar
Copy link
Contributor

Describe the enhancement requested

The current Java JNI build needs to declare these CMAKE variables in order to build correctly:

  • -DProtobuf_USE_STATIC_LIBS=ON
  • -DProtobuf_ROOT=${project.basedir}/../cpp-jni/protobuf_ep-install

It may be possible to add support for installing bundled protocols.

Component(s)

Documentation, Java

@jinchengchenghh
Copy link
Contributor

Yes, I think it is essential, I meet the exception after I upgrade to arrow version 15.0.0

java.lang.UnsatisfiedLinkError: /tmp/jnilib-6199067493483126041.tmp: /tmp/jnilib-6199067493483126041.tmp: undefined symbol: _ZTIN6google8protobuf7MessageE
	at java.lang.ClassLoader$NativeLibrary.load(Native Method) ~[?:1.8.0_402]
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934) ~[?:1.8.0_402]
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1817) ~[?:1.8.0_402]
	at java.lang.Runtime.load0(Runtime.java:782) ~[?:1.8.0_402]
	at java.lang.System.load(System.java:1100) ~[?:1.8.0_402]
	at org.apache.arrow.dataset.jni.JniLoader.load(JniLoader.java:92) ~[arrow-dataset-15.0.0.jar:15.0.0]
	at org.apache.arrow.dataset.jni.JniLoader.loadRemaining(JniLoader.java:75) ~[arrow-dataset-15.0.0.jar:15.0.0]
	at org.apache.arrow.dataset.jni.JniLoader.ensureLoaded(JniLoader.java:61) ~[arrow-dataset-15.0.0.jar:15.0.0]
	at org.apache.arrow.dataset.jni.NativeMemoryPool.createListenable(NativeMemoryPool.java:44) ~[arrow-dataset-15.0.0.jar:15.0.0]

@lidavidm
Copy link
Member

That was already fixed. Use 15.0.2. #39919

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

3 participants