Re: Weird symbol resolution error with llvm JIT in gandiva jni

2018-12-17 Thread Ravindra Pindikura
> On Dec 17, 2018, at 9:38 PM, Antoine Pitrou wrote: > > > Apparently you're using System.load() to load the compiled helpers > functions. It seems it may load the library using RTLD_LOCAL, which > means it won't be seen from other dynamic libraries loaded in the same > process. > > Accordi

Re: Weird symbol resolution error with llvm JIT in gandiva jni

2018-12-17 Thread Antoine Pitrou
Apparently you're using System.load() to load the compiled helpers functions. It seems it may load the library using RTLD_LOCAL, which means it won't be seen from other dynamic libraries loaded in the same process. According to this SO entry, the solution would be to use NativeLibrary.getInstan

Re: Weird symbol resolution error with llvm JIT in gandiva jni

2018-12-17 Thread Ravindra Pindikura
> On Dec 17, 2018, at 6:39 PM, Antoine Pitrou wrote: > > > Is LoadLibraryPermanently(nullptr) called after the libgandiva_jni.so is > loaded? Perhaps you can try LoadLibraryPermanently("libgandiva_jni.so") > explicitly? We are already doing this inside gandiva. https://github.com/apache/arr

Re: Weird symbol resolution error with llvm JIT in gandiva jni

2018-12-17 Thread Antoine Pitrou
Is LoadLibraryPermanently(nullptr) called after the libgandiva_jni.so is loaded? Perhaps you can try LoadLibraryPermanently("libgandiva_jni.so") explicitly? Le 17/12/2018 à 13:50, Ravindra Pindikura a écrit : > Antoine, > > I set ARROW_GANDIVA_STATIC_LIBSTDCPP and modified the jni/CMakeLists.

Re: Weird symbol resolution error with llvm JIT in gandiva jni

2018-12-17 Thread Ravindra Pindikura
Antoine, I set ARROW_GANDIVA_STATIC_LIBSTDCPP and modified the jni/CMakeLists.txt to export all symbols (i.e removed the version-script parameter in LINK_FLAGS). $ nm ./debug/libgandiva_jni.so|grep _ZNSt8ios_base4InitC1Ev 01df34f0 T _ZNSt8ios_base4InitC1Ev $ nm --defined-only ./debug/l

Re: Weird symbol resolution error with llvm JIT in gandiva jni

2018-12-16 Thread Wes McKinney
We might have to split up the implementation of Decimal128 into multiple compilation units based on what parts of it are LLVM IR-friendly On Sun, Dec 16, 2018 at 7:04 AM Antoine Pitrou wrote: > > > In other words, see if: > nm --defined-only libgandiva.a | grep _ZNSt8ios_base4InitC1Ev > > output

Re: Weird symbol resolution error with llvm JIT in gandiva jni

2018-12-16 Thread Antoine Pitrou
In other words, see if: nm --defined-only libgandiva.a | grep _ZNSt8ios_base4InitC1Ev outputs anything. Regards Antoine. Le 16/12/2018 à 14:03, Antoine Pitrou a écrit : > > Does the static gandiva lib bundle libstdc++? Otherwise you'll probably > need to load it explicitly in the Java pro

Re: Weird symbol resolution error with llvm JIT in gandiva jni

2018-12-16 Thread Antoine Pitrou
Does the static gandiva lib bundle libstdc++? Otherwise you'll probably need to load it explicitly in the Java process. Regards Antoine. Le 16/12/2018 à 04:53, Ravindra Pindikura a écrit : > I think this happens if any of the cpp files that are used for IR generation > (clang —emit-llvm) inc

Re: Weird symbol resolution error with llvm JIT in gandiva jni

2018-12-15 Thread Ravindra Pindikura
I think this happens if any of the cpp files that are used for IR generation (clang —emit-llvm) includes . For decimal support, I’m generating IR code from arrow/util/decimal.cc which includes (many times in the header file chain). > On Dec 16, 2018, at 9:14 AM, Ravindra P