Skip to content

Commit b93d56b

Browse files
committed
Use bundled brotli for R win binaries instead of msys2 one from rtools
1 parent 180159a commit b93d56b

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

‎ci/scripts/PKGBUILD‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-bzip2"
3131
"${MINGW_PACKAGE_PREFIX}-snappy"
3232
"${MINGW_PACKAGE_PREFIX}-zlib"
3333
"${MINGW_PACKAGE_PREFIX}-lz4"
34-
"${MINGW_PACKAGE_PREFIX}-zstd"
35-
"${MINGW_PACKAGE_PREFIX}-brotli")
34+
"${MINGW_PACKAGE_PREFIX}-zstd")
3635
makedepends=("${MINGW_PACKAGE_PREFIX}-ccache"
3736
"${MINGW_PACKAGE_PREFIX}-gcc")
3837
options=("staticlibs" "strip" "!buildflags")
@@ -96,6 +95,9 @@ build() {
9695
# But one on rtools packages doesn't have the fix. So we can't use
9796
# the MINGW one.
9897

98+
# We use the bundled Brotli instead of the MINGW one because the one
99+
# on rtools packages is unmaintained and stuck at 1.0.9.
100+
99101
# MSYS2_ARG_CONV_EXCL is needed to prevent autoconverting CMAKE_INSTALL_PREFIX
100102
# to Windows paths. See https://www.msys2.org/docs/filesystem-paths/#process-arguments
101103

@@ -137,6 +139,7 @@ build() {
137139
-DARROW_ZSTD_USE_SHARED=OFF \
138140
-DARROW_CXXFLAGS="${CPPFLAGS}" \
139141
-DAWSSDK_SOURCE=BUNDLED \
142+
-DBrotli_SOURCE=BUNDLED \
140143
-DCMAKE_BUILD_TYPE="release" \
141144
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
142145
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \

‎ci/scripts/r_windows_build.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,23 @@ if [ -d mingw64/lib/ ]; then
6565
# Move the 64-bit versions of libarrow into the expected location
6666
mv mingw64/lib/*.a "${DST_DIR}/lib/x64"
6767
# These are from https://dl.bintray.com/rtools/mingw{32,64}/
68-
cp "${MSYS_LIB_DIR}"/mingw64/lib/lib{snappy,zstd,lz4,brotli*,bz2,crypto,curl,ss*,utf8proc,re2,nghttp2}.a "${DST_DIR}/lib/x64"
68+
cp "${MSYS_LIB_DIR}"/mingw64/lib/lib{snappy,zstd,lz4,bz2,crypto,curl,ss*,utf8proc,re2,nghttp2}.a "${DST_DIR}/lib/x64"
6969
fi
7070

7171
# Same for the 32-bit versions
7272
if [ -d mingw32/lib/ ]; then
7373
ls "${MSYS_LIB_DIR}/mingw32/lib/"
7474
mkdir -p "${DST_DIR}/lib/i386"
7575
mv mingw32/lib/*.a "${DST_DIR}/lib/i386"
76-
cp "${MSYS_LIB_DIR}"/mingw32/lib/lib{snappy,zstd,lz4,brotli*,bz2,crypto,curl,ss*,utf8proc,re2,nghttp2}.a "${DST_DIR}/lib/i386"
76+
cp "${MSYS_LIB_DIR}"/mingw32/lib/lib{snappy,zstd,lz4,bz2,crypto,curl,ss*,utf8proc,re2,nghttp2}.a "${DST_DIR}/lib/i386"
7777
fi
7878

7979
# Do the same also for ucrt64
8080
if [ -d ucrt64/lib/ ]; then
8181
ls "${MSYS_LIB_DIR}/ucrt64/lib/"
8282
mkdir -p "${DST_DIR}/lib/x64-ucrt"
8383
mv ucrt64/lib/*.a "${DST_DIR}/lib/x64-ucrt"
84-
cp "${MSYS_LIB_DIR}"/ucrt64/lib/lib{snappy,zstd,lz4,brotli*,bz2,crypto,curl,ss*,utf8proc,re2,nghttp2}.a "$DST_DIR"/lib/x64-ucrt
84+
cp "${MSYS_LIB_DIR}"/ucrt64/lib/lib{snappy,zstd,lz4,bz2,crypto,curl,ss*,utf8proc,re2,nghttp2}.a "$DST_DIR"/lib/x64-ucrt
8585
fi
8686

8787
# Create build artifact

‎r/configure.win‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ function configure_binaries() {
6060

6161
OPENSSL_LIBS="-lcrypto -lcrypt32"
6262
MIMALLOC_LIBS="-lbcrypt -lpsapi"
63-
BROTLI_LIBS="-lbrotlienc -lbrotlidec -lbrotlicommon" # Common goes last since dec and enc depend on it
6463
# We build aws-sdk-cpp bundled now, so the AWS libs are included in arrow_bundled_dependencies
6564
# but we also need to include these Windows system libraries
6665
AWS_LIBS="-luserenv -lversion -lws2_32 -lbcrypt -lwininet -lwinhttp -lsecur32 -lshlwapi -lncrypt"
@@ -91,7 +90,7 @@ function configure_binaries() {
9190
PKG_LIBS="$PKG_LIBS -L${RWINLIB}/lib"'$(R_ARCH)$(CRT) '
9291
PKG_LIBS="$PKG_LIBS -larrow_dataset -larrow_acero -lparquet -larrow_compute -larrow_s3 \
9392
-larrow_gcs -larrow -larrow_bundled_dependencies \
94-
-lutf8proc -lsnappy -lz -lzstd -llz4 -lbz2 ${BROTLI_LIBS} -lole32 \
93+
-lutf8proc -lsnappy -lz -lzstd -llz4 -lbz2 -lole32 \
9594
${MIMALLOC_LIBS} ${OPENSSL_LIBS} -lre2 ${AWS_LIBS} ${GCS_LIBS}" # ${AZURE_LIBS}
9695

9796
}

0 commit comments

Comments
 (0)