Skip to content

To make libarrow compilable on Alpine, change how backtracing is guarded #2818

Description

@bskaggs

I was able to get libarrow and pyarrow to compile and run on Alpine in Docker, but only after I used sed to remove the inclusion of execinfo.h and the related ifdef block in PrintBacktrace, which removes the call to backtrace.

This leads me to believe that if you improve how you check for backtrace (not just checking if _WIN32 is not defined), perhaps by using FindBacktrace, things would compile cleanly on Alpine. I'm not exactly sure how to do this, so I'm opening this issue.

Here's my working Dockerfile:

FROM python:3.7-alpine3.8
RUN apk add --no-cache \
git \
build-base \
cmake \
bash \
jemalloc-dev \
boost-dev \
autoconf \
zlib-dev \
flex \
bison
RUN pip install six numpy pandas cython pytest
RUN git clone https://github.com/apache/arrow.git
RUN mkdir /arrow/cpp/build WORKDIR /arrow/cpp/build
ENV ARROW_BUILD_TYPE=release
ENV ARROW_HOME=/usr/local
ENV PARQUET_HOME=/usr/local
#disable backtrace
RUN sed -i -e '/_EXECINFO_H/,/endif/d' -e '/execinfo/d' ../src/arrow/util/logging.cc
RUN cmake -DCMAKE_BUILD_TYPE=$ARROW_BUILD_TYPE \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
-DARROW_PARQUET=on \
-DARROW_PYTHON=on \
-DARROW_PLASMA=on \
-DARROW_BUILD_TESTS=OFF \
..
RUN make -j$(nproc)
RUN make install
WORKDIR /arrow/python
RUN python setup.py build_ext --build-type=$ARROW_BUILD_TYPE \
--with-parquet --inplace
#--with-plasma # commented out because plasma tests don't work
RUN py.test pyarrow

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions