Hello all, I want to use pybind11 with arrow, but I can't get it to work. I get an "undefined symbol" error at run time.
I've put a simple version of what I'm trying to do on github: https://github.com/0x26res/pyarrowbind In a nutshell, I'm trying to follow the instructions here: https://arrow.apache.org/docs/python/extending.html#c-api * I have a virtual environment with pybind, pyarrow (and numpy) installed * I've made sure I've called `pa.create_library_symlinks()` * I'm linking against libarrow_python.so and libarrow.so Here's how far I got to far: 1. If my C++ code only tries to call `arrow::py::import_pyarrow()`, it works (and returns 0) 2. If my C++ code tries to do anything else with arrow (like creating a schema), I get this error: ``` Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: /home/arthur/source/pyarrowbind/build/ bindings.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNK5arrow6Schema8ToStringB5cxx11Eb ``` 3. I tried to link against the "arrow_static" library, provided by `FIND_PACKAGE(Arrow REQUIRED)` in cmake. When I do that I get a different error: ``` Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: /home/arthur/source/pyarrowbind/build/ bindings.cpython-38-x86_64-linux-gnu.so: undefined symbol: ERR_error_string_n ``` This is pointing to a symbol defined in openssl. I tried to fix this, then got a similar error with curl symbols, which I fixed and eventually got a segfault. Which makes me think I must be doing something wrong. Do you have any idea about what I'm doing wrong? I'm using: Ubuntu 20.04.3 LTS Python 3.8.10 pyarrow==5.0.0 pybind11==2.7.1 numpy==1.21.2 Thanks.
