Skip to content

Commit

Permalink
fix building numpy on ppc64le
Browse files Browse the repository at this point in the history
  • Loading branch information
sh1ng committed Mar 18, 2020
1 parent b53f008 commit 5ffe21e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile-build
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,13 @@ RUN \
#

# Arrow
# Need to enable c99 manually https://github.com/numpy/numpy/issues/14147
RUN bash -c 'if [ `arch` = "ppc64le" ]; then \
git clone https://github.com/apache/arrow.git && \
cd $HOME/arrow/cpp && \
git checkout tags/apache-arrow-0.12.0 && \
yum install -y boost-devel && \
pip install numpy==1.18.1 cython==0.29.14 && \
CFLAGS=-std=c99 pip install numpy==1.18.1 cython==0.29.14 && \
cmake -DARROW_CXXFLAGS="-lutil" -DARROW_PYTHON=on && make -j && make install && \
cd $HOME/arrow/python && \
ARROW_HOME=/usr/local python setup.py install && \
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile-runtime
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ RUN pip install -U pip==19.3.1
WORKDIR $HOME

# Arrow
# Need to enable c99 manually https://github.com/numpy/numpy/issues/14147
RUN bash -c 'if [ `arch` = "ppc64le" ]; then \
ln -s /usr/bin/cmake3 /usr/bin/cmake && \
git clone https://github.com/apache/arrow.git && \
cd $HOME/arrow/cpp && \
git checkout tags/apache-arrow-0.12.0 && \
pip install numpy==1.18.1 cython==0.29.14 && \
CFLAGS=-std=c99 pip install numpy==1.18.1 cython==0.29.14 && \
export ARROW_BUILD_TYPE=release && \
export ARROW_HOME=/usr/local && \
cmake -DARROW_CXXFLAGS="-lutil" -DCMAKE_INSTALL_PREFIX=$ARROW_HOME -DARROW_PYTHON=on -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=$ARROW_BUILD_TYPE -DARROW_BUILD_TESTS=OFF && make -j && make install && \
Expand Down

0 comments on commit 5ffe21e

Please sign in to comment.