Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ci/scripts/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ pkgdesc="Apache Arrow is a cross-language development platform for in-memory dat
arch=("any")
url="https://arrow.apache.org/"
license=("Apache-2.0")
depends=("${MINGW_PACKAGE_PREFIX}-thrift"
depends=("${MINGW_PACKAGE_PREFIX}-aws-sdk-cpp"
"${MINGW_PACKAGE_PREFIX}-thrift"
"${MINGW_PACKAGE_PREFIX}-snappy"
"${MINGW_PACKAGE_PREFIX}-zlib"
"${MINGW_PACKAGE_PREFIX}-lz4"
Expand Down Expand Up @@ -74,6 +75,9 @@ build() {
export PATH="/C/Rtools${MINGW_PREFIX/mingw/mingw_}/bin:$PATH"
export CPPFLAGS="${CPPFLAGS} -I${MINGW_PREFIX}/include"
export LIBS="-L${MINGW_PREFIX}/libs"
export ARROW_S3=OFF
else
export ARROW_S3=ON
fi

MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
Expand All @@ -94,6 +98,7 @@ build() {
-DARROW_MIMALLOC=ON \
-DARROW_PACKAGE_PREFIX="${MINGW_PREFIX}" \
-DARROW_PARQUET=ON \
-DARROW_S3="${ARROW_S3}" \
-DARROW_SNAPPY_USE_SHARED=OFF \
-DARROW_USE_GLOG=OFF \
-DARROW_WITH_LZ4=ON \
Expand Down
10 changes: 8 additions & 2 deletions ci/scripts/r_windows_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ if [ "$RTOOLS_VERSION" = "35" ]; then
# lib-4.9.3 is for libraries compiled with gcc 4.9 (Rtools 3.5)
RWINLIB_LIB_DIR="lib-4.9.3"
else
# Uncomment L38-41 if you're testing a new rtools dependency that hasn't yet sync'd to CRAN
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeroen have you updated the CRAN repo with aws-sdk-cpp yet?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No not yet. Will do soon if we confirm that it works (and you are sure you don't want to add more modules again :))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the macOS jemalloc install issue has been fixed now but I don't think I can easily confirm that on autobrew/homebrew-core#19 because you'd need to brew install --HEAD to pull the fix, and the brew test-bot command doesn't support head.

From the arrow perspective, builds are passing, so if you're satisfied that this is working, we can merge. And once we merge, no modules can get added to the cmake config without breaking the build, so there shouldn't be any more surprises.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok @jeroen, LMK when the CRAN rtools-packages is updated and I'll switch off of the bintray. No problem if that can't be done easily/quickly, I can merge this and swap the repos later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have uploaded it to my server, it should sync to the mirrors in a few hours.

# curl https://raw.githubusercontent.com/r-windows/rtools-packages/master/pacman.conf > /etc/pacman.conf
# curl -OSsl "http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
# pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz && rm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
# pacman --noconfirm -Scc

pacman --noconfirm -Syy
RWINLIB_LIB_DIR="lib"
fi
Expand Down Expand Up @@ -84,8 +90,8 @@ cp $MSYS_LIB_DIR/mingw64/lib/lib{thrift,snappy}.a $DST_DIR/${RWINLIB_LIB_DIR}/x6
cp $MSYS_LIB_DIR/mingw32/lib/lib{thrift,snappy}.a $DST_DIR/${RWINLIB_LIB_DIR}/i386

# These are from https://dl.bintray.com/rtools/mingw{32,64}/
cp $MSYS_LIB_DIR/mingw64/lib/lib{zstd,lz4,crypto}.a $DST_DIR/lib/x64
cp $MSYS_LIB_DIR/mingw32/lib/lib{zstd,lz4,crypto}.a $DST_DIR/lib/i386
cp $MSYS_LIB_DIR/mingw64/lib/lib{zstd,lz4,crypto,aws*}.a $DST_DIR/lib/x64
cp $MSYS_LIB_DIR/mingw32/lib/lib{zstd,lz4,crypto,aws*}.a $DST_DIR/lib/i386

# Create build artifact
zip -r ${DST_DIR}.zip $DST_DIR
Expand Down
5 changes: 3 additions & 2 deletions dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class ApacheArrow < Formula
# NOTE: if you add something here, be sure to add to PKG_LIBS in r/tools/autobrew
depends_on "boost" => :build
depends_on "cmake" => :build
depends_on "aws-sdk-cpp"
depends_on "lz4"
depends_on "snappy"
depends_on "thrift"
Expand All @@ -50,14 +51,14 @@ def install
-DARROW_JEMALLOC=ON
-DARROW_USE_GLOG=OFF
-DARROW_PYTHON=OFF
-DARROW_S3=OFF
-DARROW_S3=ON
-DARROW_WITH_LZ4=ON
-DARROW_WITH_ZLIB=ON
-DARROW_WITH_SNAPPY=ON
-DARROW_WITH_UTF8PROC=OFF
-DARROW_BUILD_UTILITIES=ON
-DARROW_VERBOSE_THIRDPARTY_BUILD=ON
-DCMAKE_UNITY_BUILD=ON
-DCMAKE_UNITY_BUILD=OFF
-DPARQUET_BUILD_EXECUTABLES=ON
-DLZ4_HOME=#{Formula["lz4"].prefix}
-DTHRIFT_HOME=#{Formula["thrift"].prefix}
Expand Down
5 changes: 2 additions & 3 deletions dev/tasks/homebrew-formulae/travis.osx.r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,5 @@ script:
- Rscript -e 'install.packages("rcmdcheck")'
# Note that this is not --as-cran. CRAN doesn't do macOS checks --as-cran
- travis_wait Rscript -e "rcmdcheck::rcmdcheck(build_args = '--no-build-vignettes', args = c('--no-manual', '--ignore-vignettes', '--run-donttest'), error_on = 'warning', check_dir = 'check')"
after_failure:
# If there's a build failure, it's probably in this log
- cat arrow.Rcheck/00install.out
# If there's a build failure, it's probably in this log. Let's print it regardless though
- cat check/arrow.Rcheck/00install.out
5 changes: 3 additions & 2 deletions r/configure
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ else
if [ "$FORCE_AUTOBREW" != "true" ] && [ "`command -v brew`" ] && [ "`brew ls --versions ${PKG_BREW_NAME}`" != "" ]; then
echo "*** Using Homebrew ${PKG_BREW_NAME}"
BREWDIR=`brew --prefix`
PKG_LIBS="-L$BREWDIR/opt/$PKG_BREW_NAME/lib $PKG_LIBS -larrow_bundled_dependencies"
PKG_CFLAGS="-I$BREWDIR/opt/$PKG_BREW_NAME/include"
else
echo "*** Downloading ${PKG_BREW_NAME}"
if [ -f "autobrew" ]; then
Expand All @@ -112,9 +114,8 @@ else
if [ $? -ne 0 ]; then
echo "Failed to retrieve binary for ${PKG_BREW_NAME}"
fi
# autobrew sets `PKG_LIBS` and `PKG_CFLAGS`
fi
PKG_CFLAGS="-I$BREWDIR/opt/$PKG_BREW_NAME/include"
PKG_LIBS="-L$BREWDIR/opt/$PKG_BREW_NAME/lib $PKG_LIBS -larrow_bundled_dependencies"
elif [ "$UNAME" = "Linux" ]; then
# Set some default values/backwards compatibility
if [ "${LIBARROW_DOWNLOAD}" = "" ] && [ "${NOT_CRAN}" != "" ]; then
Expand Down
13 changes: 12 additions & 1 deletion r/configure.win
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,22 @@ else
fi
OPENSSL_LIBS="-lcrypto -lcrypt32"
MIMALLOC_LIBS="-lbcrypt -lpsapi"
AWS_LIBS="-laws-cpp-sdk-config -laws-cpp-sdk-transfer -laws-cpp-sdk-identity-management -laws-cpp-sdk-cognito-identity -laws-cpp-sdk-sts -laws-cpp-sdk-s3 -laws-cpp-sdk-core -laws-c-event-stream -laws-checksums -laws-c-common -lUserenv -lversion -lws2_32 -lBcrypt -lWininet -lwinhttp"

# NOTE: If you make changes to the libraries below, you should also change
# ci/scripts/r_windows_build.sh and ci/scripts/PKGBUILD
PKG_CFLAGS="-I${RWINLIB}/include -DARROW_STATIC -DPARQUET_STATIC -DARROW_DS_STATIC -DARROW_R_WITH_ARROW"
PKG_LIBS="-L${RWINLIB}/lib"'$(subst gcc,,$(COMPILED_BY))$(R_ARCH) '"-L${RWINLIB}/lib"'$(R_ARCH) '"-lparquet -larrow_dataset -larrow -larrow_bundled_dependencies -lthrift -lsnappy -lz -lzstd -llz4 ${MIMALLOC_LIBS} ${OPENSSL_LIBS} -lws2_32"
PKG_LIBS="-L${RWINLIB}/lib"'$(subst gcc,,$(COMPILED_BY))$(R_ARCH) '"-L${RWINLIB}/lib"'$(R_ARCH) '"-lparquet -larrow_dataset -larrow -larrow_bundled_dependencies -lthrift -lsnappy -lz -lzstd -llz4 ${MIMALLOC_LIBS} ${OPENSSL_LIBS}"

# S3 support only for Rtools40 (i.e. R >= 4.0)
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e 'R.version$major >= 4' | grep TRUE >/dev/null 2>&1
if [ $? -eq 0 ]; then
PKG_CFLAGS="${PKG_CFLAGS} -DARROW_R_WITH_S3"
PKG_LIBS="${PKG_LIBS} ${AWS_LIBS}"
else
# It seems that order matters
PKG_LIBS="${PKG_LIBS} -lws2_32"
fi

# Set any user-defined CXXFLAGS
if [ "$ARROW_R_CXXFLAGS" ]; then
Expand Down
7 changes: 5 additions & 2 deletions r/tools/autobrew
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ if [ -f "$LOCAL_FORMULA" ]; then
$BREW deps -n "$LOCAL_FORMULA" 2>/dev/null
BREW_DEPS=$($BREW deps -n "$LOCAL_FORMULA" 2>/dev/null)
$BREW install --force-bottle $BREW_DEPS 2>&1 | perl -pe 's/Warning/Note/gi'
$BREW install --build-from-source --HEAD "$LOCAL_FORMULA" 2>&1 | perl -pe 's/Warning/Note/gi'
$BREW install -v --build-from-source --HEAD "$LOCAL_FORMULA" 2>&1 | perl -pe 's/Warning/Note/gi'
else
$BREW install --force-bottle $BREW_DEPS $PKG_BREW_NAME 2>&1 | perl -pe 's/Warning/Note/gi'
fi

# Hardcode this for my custom autobrew build
rm -f $BREWDIR/lib/*.dylib
PKG_LIBS="-L$BREWDIR/lib -lparquet -larrow_dataset -larrow -lthrift -llz4 -lsnappy"
AWS_LIBS="-laws-cpp-sdk-config -laws-cpp-sdk-transfer -laws-cpp-sdk-identity-management -laws-cpp-sdk-cognito-identity -laws-cpp-sdk-sts -laws-cpp-sdk-s3 -laws-cpp-sdk-core -laws-c-event-stream -laws-checksums -laws-c-common -lpthread -lcurl"
PKG_LIBS="-L$BREWDIR/lib -lparquet -larrow_dataset -larrow -larrow_bundled_dependencies -lthrift -llz4 -lsnappy $AWS_LIBS"

# Prevent CRAN builder from linking against old libs in /usr/local/lib
for FILE in $BREWDIR/Cellar/*/*/lib/*.a; do
Expand All @@ -58,5 +59,7 @@ for FILE in $BREWDIR/Cellar/*/*/lib/*.a; do
PKG_LIBS=`echo $PKG_LIBS | sed "s/-l$LIBNAME/-lbrew$LIBNAME/g"`
done

PKG_CFLAGS="-I$BREWDIR/opt/$PKG_BREW_NAME/include -DARROW_R_WITH_S3"

unset HOMEBREW_NO_ANALYTICS
unset HOMEBREW_NO_AUTO_UPDATE