arrow: Update to 6.0.0
This commit is contained in:
@@ -1,125 +0,0 @@
|
||||
From 1a1758beac0272c49bcfe8c7f404f3c945e6dd2a Mon Sep 17 00:00:00 2001
|
||||
From: Sutou Kouhei <kou@clear-code.com>
|
||||
Date: Sun, 1 Aug 2021 11:05:28 +0900
|
||||
Subject: [PATCH] ARROW-13516: [C++] Detect --version-script flag availability
|
||||
|
||||
Mingw-w64 + Clang (lld) doesn't support it.
|
||||
|
||||
See also: https://github.com/msys2/MINGW-packages/pull/9255
|
||||
---
|
||||
cpp/CMakeLists.txt | 20 ++++++++++++++++++++
|
||||
cpp/src/arrow/CMakeLists.txt | 5 +----
|
||||
cpp/src/gandiva/CMakeLists.txt | 5 +----
|
||||
cpp/src/gandiva/jni/CMakeLists.txt | 2 +-
|
||||
cpp/src/parquet/CMakeLists.txt | 5 +----
|
||||
cpp/src/plasma/CMakeLists.txt | 5 +----
|
||||
6 files changed, 25 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
|
||||
index 78b19ba59308..2bcdc0de1794 100644
|
||||
--- a/cpp/CMakeLists.txt
|
||||
+++ b/cpp/CMakeLists.txt
|
||||
@@ -453,6 +453,26 @@ endif()
|
||||
|
||||
include(SetupCxxFlags)
|
||||
|
||||
+#
|
||||
+# Linker flags
|
||||
+#
|
||||
+
|
||||
+# Localize thirdparty symbols using a linker version script. This hides them
|
||||
+# from the client application. The OS X linker does not support the
|
||||
+# version-script option.
|
||||
+if(CMAKE_VERSION VERSION_LESS 3.18)
|
||||
+ if(APPLE OR WIN32)
|
||||
+ set(CXX_LINKER_SUPPORTS_VERSION_SCRIPT FALSE)
|
||||
+ else()
|
||||
+ set(CXX_LINKER_SUPPORTS_VERSION_SCRIPT TRUE)
|
||||
+ endif()
|
||||
+else()
|
||||
+ include(CheckLinkerFlag)
|
||||
+ check_linker_flag(CXX
|
||||
+ "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/arrow/symbols.map"
|
||||
+ CXX_LINKER_SUPPORTS_VERSION_SCRIPT)
|
||||
+endif()
|
||||
+
|
||||
#
|
||||
# Build output directory
|
||||
#
|
||||
diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt
|
||||
index cb6e91bd40e1..f13e5b1ef754 100644
|
||||
--- a/cpp/src/arrow/CMakeLists.txt
|
||||
+++ b/cpp/src/arrow/CMakeLists.txt
|
||||
@@ -483,10 +483,7 @@ if(ARROW_ORC)
|
||||
list(APPEND ARROW_SRCS adapters/orc/adapter.cc adapters/orc/adapter_util.cc)
|
||||
endif()
|
||||
|
||||
-if(NOT APPLE AND NOT MSVC_TOOLCHAIN)
|
||||
- # Localize thirdparty symbols using a linker version script. This hides them
|
||||
- # from the client application. The OS X linker does not support the
|
||||
- # version-script option.
|
||||
+if(CXX_LINKER_SUPPORTS_VERSION_SCRIPT)
|
||||
set(ARROW_VERSION_SCRIPT_FLAGS
|
||||
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/symbols.map")
|
||||
set(ARROW_SHARED_LINK_FLAGS ${ARROW_VERSION_SCRIPT_FLAGS})
|
||||
diff --git a/cpp/src/gandiva/CMakeLists.txt b/cpp/src/gandiva/CMakeLists.txt
|
||||
index 08f31ad95546..2da8bb680921 100644
|
||||
--- a/cpp/src/gandiva/CMakeLists.txt
|
||||
+++ b/cpp/src/gandiva/CMakeLists.txt
|
||||
@@ -111,10 +111,7 @@ endif()
|
||||
# set(GANDIVA_SHARED_LINK_FLAGS "${GANDIVA_SHARED_LINK_FLAGS} /EXPORT:${SYMBOL}")
|
||||
# endforeach()
|
||||
# endif()
|
||||
-if(NOT APPLE AND NOT MSVC_TOOLCHAIN)
|
||||
- # Localize thirdparty symbols using a linker version script. This hides them
|
||||
- # from the client application. The OS X linker does not support the
|
||||
- # version-script option.
|
||||
+if(CXX_LINKER_SUPPORTS_VERSION_SCRIPT)
|
||||
set(GANDIVA_VERSION_SCRIPT_FLAGS
|
||||
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/symbols.map")
|
||||
set(GANDIVA_SHARED_LINK_FLAGS
|
||||
diff --git a/cpp/src/gandiva/jni/CMakeLists.txt b/cpp/src/gandiva/jni/CMakeLists.txt
|
||||
index 04fd22eec9ab..046934141f6d 100644
|
||||
--- a/cpp/src/gandiva/jni/CMakeLists.txt
|
||||
+++ b/cpp/src/gandiva/jni/CMakeLists.txt
|
||||
@@ -98,7 +98,7 @@ add_dependencies(gandiva ${GANDIVA_JNI_LIBRARIES})
|
||||
if(ARROW_BUILD_SHARED)
|
||||
# filter out everything that is not needed for the jni bridge
|
||||
# statically linked stdc++ has conflicts with stdc++ loaded by other libraries.
|
||||
- if(NOT APPLE)
|
||||
+ if(CXX_LINKER_SUPPORTS_VERSION_SCRIPT)
|
||||
set_target_properties(gandiva_jni_shared
|
||||
PROPERTIES LINK_FLAGS
|
||||
"-Wl,--version-script=${CMAKE_SOURCE_DIR}/src/gandiva/jni/symbols.map"
|
||||
diff --git a/cpp/src/parquet/CMakeLists.txt b/cpp/src/parquet/CMakeLists.txt
|
||||
index a487760a03ea..ce4591325473 100644
|
||||
--- a/cpp/src/parquet/CMakeLists.txt
|
||||
+++ b/cpp/src/parquet/CMakeLists.txt
|
||||
@@ -232,10 +232,7 @@ if(NOT PARQUET_MINIMAL_DEPENDENCY)
|
||||
|
||||
endif(NOT PARQUET_MINIMAL_DEPENDENCY)
|
||||
|
||||
-if(NOT APPLE AND NOT MSVC_TOOLCHAIN)
|
||||
- # Localize thirdparty symbols using a linker version script. This hides them
|
||||
- # from the client application. The OS X linker does not support the
|
||||
- # version-script option.
|
||||
+if(CXX_LINKER_SUPPORTS_VERSION_SCRIPT)
|
||||
set(PARQUET_SHARED_LINK_FLAGS
|
||||
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/symbols.map")
|
||||
endif()
|
||||
diff --git a/cpp/src/plasma/CMakeLists.txt b/cpp/src/plasma/CMakeLists.txt
|
||||
index a4e6e72b41b0..46603d6f85cc 100644
|
||||
--- a/cpp/src/plasma/CMakeLists.txt
|
||||
+++ b/cpp/src/plasma/CMakeLists.txt
|
||||
@@ -61,10 +61,7 @@ if(ARROW_CUDA)
|
||||
add_definitions(-DPLASMA_CUDA)
|
||||
endif()
|
||||
|
||||
-if(NOT APPLE AND NOT MSVC_TOOLCHAIN)
|
||||
- # Localize thirdparty symbols using a linker version script. This hides them
|
||||
- # from the client application. The OS X linker does not support the
|
||||
- # version-script option.
|
||||
+if(CXX_LINKER_SUPPORTS_VERSION_SCRIPT)
|
||||
set(PLASMA_SHARED_LINK_FLAGS
|
||||
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/symbols.map")
|
||||
endif()
|
||||
@@ -1,43 +0,0 @@
|
||||
From f64fb07ddbe70969533cc947e2815d40454c5c2d Mon Sep 17 00:00:00 2001
|
||||
From: jeremyd2019 <github@jdrake.com>
|
||||
Date: Sun, 22 Aug 2021 19:57:03 -0700
|
||||
Subject: [PATCH] Update numpy_convert.cc
|
||||
|
||||
add static_cast to initializer list to avoid C++11 narrowing error in Clang.
|
||||
|
||||
error: non-constant-expression cannot be narrowed from type 'int64_t' (aka 'long long') to 'int' in initializer list [-Wc++11-narrowing]
|
||||
---
|
||||
cpp/src/arrow/python/numpy_convert.cc | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/cpp/src/arrow/python/numpy_convert.cc b/cpp/src/arrow/python/numpy_convert.cc
|
||||
index bf4afb2a0a11..eedf257f9d9c 100644
|
||||
--- a/cpp/src/arrow/python/numpy_convert.cc
|
||||
+++ b/cpp/src/arrow/python/numpy_convert.cc
|
||||
@@ -322,7 +322,7 @@ Status SparseCOOTensorToNdarray(const std::shared_ptr<SparseCOOTensor>& sparse_t
|
||||
// Wrap tensor data
|
||||
OwnedRef result_data;
|
||||
RETURN_NOT_OK(SparseTensorDataToNdarray(
|
||||
- *sparse_tensor, {sparse_tensor->non_zero_length(), 1}, base, result_data.ref()));
|
||||
+ *sparse_tensor, {static_cast<npy_intp>(sparse_tensor->non_zero_length()), 1}, base, result_data.ref()));
|
||||
|
||||
// Wrap indices
|
||||
PyObject* result_coords;
|
||||
@@ -362,7 +362,7 @@ Status SparseCSXMatrixToNdarray(const std::shared_ptr<SparseTensor>& sparse_tens
|
||||
// Wrap tensor data
|
||||
OwnedRef result_data;
|
||||
RETURN_NOT_OK(SparseTensorDataToNdarray(
|
||||
- *sparse_tensor, {sparse_tensor->non_zero_length(), 1}, base, result_data.ref()));
|
||||
+ *sparse_tensor, {static_cast<npy_intp>(sparse_tensor->non_zero_length()), 1}, base, result_data.ref()));
|
||||
|
||||
*out_data = result_data.detach();
|
||||
*out_indptr = result_indptr.detach();
|
||||
@@ -391,7 +391,7 @@ Status SparseCSFTensorToNdarray(const std::shared_ptr<SparseCSFTensor>& sparse_t
|
||||
// Wrap tensor data
|
||||
OwnedRef result_data;
|
||||
RETURN_NOT_OK(SparseTensorDataToNdarray(
|
||||
- *sparse_tensor, {sparse_tensor->non_zero_length(), 1}, base, result_data.ref()));
|
||||
+ *sparse_tensor, {static_cast<npy_intp>(sparse_tensor->non_zero_length()), 1}, base, result_data.ref()));
|
||||
|
||||
// Wrap indices
|
||||
int ndim = static_cast<int>(sparse_index.indices().size());
|
||||
@@ -3,8 +3,8 @@
|
||||
_realname=arrow
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=5.0.0
|
||||
pkgrel=3
|
||||
pkgver=6.0.0
|
||||
pkgrel=1
|
||||
pkgdesc="Apache Arrow is a cross-language development platform for in-memory data (mingw-w64)"
|
||||
arch=(any)
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
||||
@@ -35,15 +35,26 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-boost"
|
||||
"${MINGW_PACKAGE_PREFIX}-gtk-doc"
|
||||
"${MINGW_PACKAGE_PREFIX}-llvm"
|
||||
"${MINGW_PACKAGE_PREFIX}-meson"
|
||||
"${MINGW_PACKAGE_PREFIX}-mlir"
|
||||
"${MINGW_PACKAGE_PREFIX}-polly"
|
||||
"${MINGW_PACKAGE_PREFIX}-rapidjson")
|
||||
options=("staticlibs" "strip" "!buildflags")
|
||||
source=("apache-arrow-${pkgver}.tar.gz"::"https://www.apache.org/dyn/closer.lua?action=download&filename=arrow/arrow-${pkgver}/apache-arrow-${pkgver}.tar.gz"
|
||||
"0001-detect-version-script-flag.patch"
|
||||
"0002-cast-initializer-list.patch")
|
||||
sha256sums=('c3b4313eca594c20f761a836719721aaf0760001af896baec3ab64420ff9910a'
|
||||
'fb5c3709d0a43ca0c58d25ce6a157e641b90a5a64801b58f58495daab32efc9d'
|
||||
'f372d62ac4bbf167c0f123e43e96afa2ed0b228325f074ec9ebff5f66bf96f60')
|
||||
"apache-arrow-${pkgver}.tar.gz.asc"::"https://www.apache.org/dyn/closer.lua?action=download&filename=arrow/arrow-${pkgver}/apache-arrow-${pkgver}.tar.gz.asc")
|
||||
sha256sums=('69d268f9e82d3ebef595ad1bdc83d4cb02b20c181946a68631f6645d7c1f7a90'
|
||||
'SKIP')
|
||||
# See generate-valid-keys.sh
|
||||
validpgpkeys=('35CF82A165DDBBA29B307B7497D7E8647AE7E47B'
|
||||
'87C072B8B6405B5780D66A3D02DABFDF1679D194'
|
||||
'F2A765669021A3D3094C200B29D94E228CAAD602'
|
||||
'6D09E881160096717426C638F105883A1735623D'
|
||||
'08D3564B7C6A9CAFBFF6A66791D18FCF079F8007'
|
||||
'E6E4AA55F38337A6EFC7A5549F453D0CC3E4F6BA'
|
||||
'265F80AB84FE03127E14F01125BCCA5220D84079'
|
||||
'E47C810A90FE21FF448DA938755E743692EA1D85'
|
||||
'D6892EA1881BD9610330AD7B0801999AF78748E8'
|
||||
'DB3D3F10215394239119F6F845127976E1E825D4'
|
||||
'DF7BAD6652219D7502C87A11CA1AB41406F9DBAD')
|
||||
|
||||
cmake_build_type=release
|
||||
meson_build_type=debugoptimized
|
||||
@@ -52,15 +63,6 @@ source_dir=apache-${_realname}-${pkgver}
|
||||
cpp_build_dir=build-${CARCH}-cpp
|
||||
c_glib_build_dir=build-${CARCH}-c-glib
|
||||
|
||||
prepare() {
|
||||
cd "${source_dir}"
|
||||
|
||||
# https://github.com/apache/arrow/pull/10848
|
||||
patch -Np1 -i "${srcdir}/0001-detect-version-script-flag.patch"
|
||||
# https://github.com/apache/arrow/pull/10975
|
||||
patch -Np1 -i "${srcdir}/0002-cast-initializer-list.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
[[ -d ${cpp_build_dir} ]] && rm -rf ${cpp_build_dir}
|
||||
mkdir -p ${cpp_build_dir}
|
||||
|
||||
38
mingw-w64-arrow/generate-valid-keys.sh
Executable file
38
mingw-w64-arrow/generate-valid-keys.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://www.apache.org/dyn/closer.lua?action=download&filename=arrow/KEYS
|
||||
# has valid keys for Apache Arrow sources.
|
||||
|
||||
set -e
|
||||
|
||||
keyring=./apache-arrow-keys.gpg
|
||||
rm -f ${keyring}
|
||||
curl \
|
||||
--fail \
|
||||
--location \
|
||||
--no-progress-meter \
|
||||
'https://www.apache.org/dyn/closer.lua?action=download&filename=arrow/KEYS' | \
|
||||
gpg \
|
||||
--no-default-keyring \
|
||||
--keyring ${keyring} \
|
||||
--import | \
|
||||
: # Ignore import error
|
||||
i=0
|
||||
gpg \
|
||||
--no-default-keyring \
|
||||
--keyring ${keyring} \
|
||||
--list-public-keys \
|
||||
--with-colons | \
|
||||
grep -A1 '^pub:' | \
|
||||
grep '^fpr:' | \
|
||||
cut -d: -f10 | \
|
||||
while read fingerprint; do
|
||||
if [ $i -eq 0 ]; then
|
||||
echo -n "validpgpkeys=('$fingerprint'"
|
||||
else
|
||||
echo
|
||||
echo -n " '$fingerprint'"
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
echo ")"
|
||||
Reference in New Issue
Block a user