Skip to content

Instantly share code, notes, and snippets.

@javierluraschi
Created December 6, 2018 05:24
Show Gist options
  • Save javierluraschi/6ead188b77ce13e79b77f5fcfadc9962 to your computer and use it in GitHub Desktop.
Save javierluraschi/6ead188b77ce13e79b77f5fcfadc9962 to your computer and use it in GitHub Desktop.
Building rwinlib/arrow 0.9
  • Create EC2 Windows Machine and connect.
  • Download and install MSys2.
  • Launch c:\msys64\mingw64 and run:
pacman -S base-devel
pacman -S msys2-devel
pacman -S mingw-w64-i686-toolchain
pacman -S mingw-w64-x86_64-toolchain
pacman -S mingw-w64-x86_64-cmake
  • Download boost from boost_1_68_0.zip.
  • Extract into c:\Users\Administrator\RStudio\boost_1_68_0.
  • Build boost from mingw64 shell as follows:
cd /c/Users/Administrator/RStudio/boost_1_68_0/boost_1_68_0/
./bootstrap.sh --with-libraries=regex,system,filesystem
./b2 -j2 variant=release define=_GLIBCXX_USE_CXX11_ABI=0 link=static
cd c:\Users\Administrator\RStudio\
github clone http://github.com/apache/arrow`.
git checkout tags/apache-arrrow-0.9.0 -b apache-arrrow-0.9.0`.
  • Download arrpw.patch.
  • From the mingw64 shell, patch arrow:
cd /c/Users/Administrator/RStudio/arrow
patch -p1 < arrow.patch

NOTE: Had to also patch arrow/util/decimal.cc by removing references to boost::Regex to avoid fixing linker warnigns.

  • From the mingw64 shell, build arrow:
cd /c/Users/Administrator/RStudio/arrow/cpp
mkdir release
cd release
export BOOST_ROOT=/c/Users/Administrator/RStudio/boost_1_68_0/boost_1_68_0/
cmake .. -DARROW_BUILD_TESTS=FALSE -DARROW_WITH_SNAPPY=FALSE -DARROW_WITH_ZSTD=FALSE -DARROW_WITH_LZ4=FALSE -DARROW_WITH_LZ4=FALSE -DARROW_JEMALLOC=FALSE -DARROW_BUILD_STATIC=TRUE -DARROW_BOOST_VENDORED=FALSE -DARROW_BOOST_USE_SHARED=FALSE -DARROW_WITH_ZLIB=FALSE -DARROW_WITH_BROTLI=FALSE -DARROW_USE_GLOG=FALSE -DPTHREAD_LIBRARY=FALSE -DARROW_BUILD_UTILITIES=FALSE -DCMAKE_BUILD_TYPE=release -G"MSYS Makefiles" -DCMAKE_CXX_COMPILER_ARCHITECTURE_ID=x64
  • Download R and RStudio, clone rarrow and compile.
  • Replace arrow.a with /c/Users/Administrator/RStudio/arrow/cpp/release/release/arrow.a.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment