Skip to content

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

Open
@lriggs

Description

@lriggs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions