Skip to content

[JNI][Gandiva] LLVM generated code can't access some system functions on certain platforms #657

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

Open
lriggs opened this issue Mar 7, 2025 · 0 comments · May be fixed by #658
Open

[JNI][Gandiva] LLVM generated code can't access some system functions on certain platforms #657

lriggs opened this issue Mar 7, 2025 · 0 comments · May be fixed by #658
Labels
Type: bug Something isn't working

Comments

@lriggs
Copy link
Contributor

lriggs commented Mar 7, 2025

Describe the bug, including details regarding any error messages, version, and platform.

When linux loads libraries there are different options for symbols visibility like: RTLD_LOCAL, RTLD_GLOBAL. Default in Java is RTLD_LOCAL which makes all symbols inside Gandiva library only visible to the Gandiva library.

The problem is when LLVM compiles code and loads it into Java process that code won't be able to find any symbols imported by Gandiva. One example is 'sinhl' from libgcc which causes sinh function to fail when it is present in SQL query executed by Dremio using Gandiva engine. By importing JNA package we can control how to load Gandiva library and set Global symbol visibility.

See also: apache/arrow#40839

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant