Hello!

*tl;dr. *I want to figure out how to build pyarrow from source (using pip)
and tell it *not* to use static libraries (libarrow.a). Can anyone tell me
if there's a CMAKE flag that the setup.py can propagate, or an option that
tells setup.py not to look for static libraries? I tried searching the
current version and nothing I've tried seems to have worked.



*----*
*Long Version.*

For context, I recompile the pyarrow package from source because installing
it from binaries causes it to have different symbols from the arrow
libraries I have installed. I'm not 100% positive on the mechanism here,
but I suspect that the following command basically just uses my system's
various toolchains to recompile pyarrow so that library symbols match:

# where ArchLinux installs it
arrow_pythonopt="-DArrowPython_DIR=/usr/lib/cmake/arrow"
arrow_staticopt="-DARROW_BUILD_STATIC=OFF"

# so that we can install a re-compiled binary
export PYARROW_CMAKE_OPTIONS="${arrow_pythonopt} ${arrow_staticopt}"
python3 -m pip install --no-binary :all: pyarrow==6.0.1

I had been doing this since Arrow 5.0.0 and it seems to have stopped with
some update from the 7.0.0 release. Now, the problem is that when I
recompile pyarrow using the above command, I get the following error:

  -- Found PkgConfig: /usr/bin/pkgconf (found version "1.8.0")
  CMake Error at /usr/lib64/cmake/arrow/ArrowTargets.cmake:96 (message):
    The imported target "arrow_static" references the file

       "/usr/lib/libarrow.a"

I am on Archlinux:

5.15.4-arch1-1

and the system package builds arrow like so (defined here
<https://github.com/archlinux/svntogit-community/blob/packages/arrow/trunk/PKGBUILD>
):

(Some options omitted inline because I think they're irrelevant)

  ARROW_BUILD_TOOLCHAIN=/usr           \
  ORC_HOME=/usr                        \
  DOUBLE_CONVERSION_HOME=/usr          \
  cmake                                \
    -B build                           \
    -S apache-${pkgname}-${pkgver}/cpp \
    -DCMAKE_INSTALL_PREFIX="/usr"      \
    -DCMAKE_INSTALL_LIBDIR="lib"       \
    -DCMAKE_BUILD_TYPE=Release         \
    -DARROW_DEPENDENCY_SOURCE=SYSTEM   \
    -DARROW_BUILD_TESTS=ON             \
    -DARROW_COMPUTE=ON                 \
    -DARROW_GANDIVA=OFF                \
    -DARROW_PYTHON=ON                  \
    -DARROW_SIMD_LEVEL=AVX2            \
    -DARROW_USE_GLOG=ON                \
    -DARROW_WITH_BROTLI=ON             \
    -DPARQUET_REQUIRE_ENCRYPTION=ON
  make -C build



Thank you for any help you can offer!

Aldrin Montana
Computer Science PhD Student
UC Santa Cruz

Reply via email to