Open pitrou opened 1 year ago
@kou Do you have any idea how to solve this?
Note that setting LD_LIBRARY_PATH
works around the issue.
Thank you for reporting!
I can reproduce this on Ubuntu 22.04 with:
conda create --name nanoarrow-verify-rc
conda activate nanoarrow-verify-rc
conda config --set channel_priority strict
mamba install -c conda-forge compilers cmake make git xsimd
curl https://dlcdn.apache.org/arrow/arrow-12.0.1/apache-arrow-12.0.1.tar.gz | \
tar -zxf -
mkdir arrow-build && cd arrow-build
cmake ../apache-arrow-12.0.1/cpp -DARROW_FILESYSTEM=ON -DARROW_WITH_ZLIB=ON -DARROW_DEPENDENCY_SOURCE=CONDA
cmake --build . --parallel=$(nproc)
cmake --install . --prefix=${CONDA_PREFIX}
cd ..
git clone https://github.com/apache/arrow-nanoarrow.git arrow-nanoarrow
cd arrow-nanoarrow
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DNANOARROW_BUILD_TESTS=ON -DCMAKE_BUILD_RPATH=${CONDA_PREFIX}/lib
cmake --build .
(I'm creating an environment to reproduce this...)
I couldn't reproduce this on Ubuntu 22.04 based on https://app.vagrantup.com/bento/boxes/ubuntu-22.04 ...
I used https://repo.anaconda.com/miniconda/Miniconda3-py311_23.5.2-0-Linux-x86_64.sh instead of mamba.
I used command lines provided by https://github.com/apache/arrow-nanoarrow/issues/254#issuecomment-1632847590 but I replaced mamba
with conda
.
I spent some more time on this and found that if you restart the terminal, activate the requisite conda environment, and do a fresh configure + build of nanoarrow, the problem goes away (however, if you don't do a fresh configure + build of nanoarrow, the linking error persists). It appears that you can't build + install Arrow C++ from the same terminal session (or perhaps conda activation) where you configure and build nanoarrow that links to Arrow C++.
As a workaround in case this doesn't fix the problem, #267 lets you pass -DNANOARROW_ARROW_STATIC=ON
and statically link Arrow into the tests. We did this anyway on Windows...the PR just generalized the option for times like this.
It appears that you can't build + install Arrow C++ from the same terminal session (or perhaps conda activation) where you configure and build nanoarrow that links to Arrow C++.
I build Arrow C++ and nanoarrow from different terminal instances, so I doubt this is the issue?
I haven't been able to reproduce this. I've tried it out with both current and a couple of older versions of arrow, but using the latest nanoarrow. Would it make sense to close this for now but reopen if and when the issue reoccurs? I'm happy to take a look at it when that happens since I'm doing a bit of work right now to improve nanoarrow's CMake anyway.
I have a Conda environment where I do Arrow development. When I try to build nanoarrow in that same environment I get linking errors in tests.
nanoarrow is configured using:
Note that all libraries do resolve from the command line: