This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 9489a6688c GH-48885: [C++] Add missing curl dependency of
`Arrow::arrow_static` CMake target (#48891)
9489a6688c is described below
commit 9489a6688c8d0e06718185f480f98f91410f715f
Author: Sutou Kouhei <[email protected]>
AuthorDate: Fri Jan 23 11:51:35 2026 +0900
GH-48885: [C++] Add missing curl dependency of `Arrow::arrow_static` CMake
target (#48891)
### Rationale for this change
We changed `macro(build_google_cloud_cpp_storage)` to `function(...)` in
GH-48333 . So `find_curl()` doesn't change `ARROW_SYSTEM_DEPENDENCIES` in
parent scope. (`function()` creates a new scope.)
### What changes are included in this PR?
Move `find_curl()` to the top-level from in
`function(build_google_cloud_cpp_storage)`.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
Yes.
* GitHub Issue: #48885
Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
cpp/cmake_modules/ThirdpartyToolchain.cmake | 7 +++---
dev/release/verify-apt.sh | 18 ++++++++++----
dev/release/verify-yum.sh | 38 +++++++++++++++++++++--------
3 files changed, 44 insertions(+), 19 deletions(-)
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index b95d649145..e011375f37 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -3366,10 +3366,6 @@ function(build_google_cloud_cpp_storage)
# List of dependencies taken from
https://github.com/googleapis/google-cloud-cpp/blob/main/doc/packaging.md
build_crc32c_once()
- # Curl is required on all platforms, but building it internally might also
trip over S3's copy.
- # For now, force its inclusion from the underlying system or fail.
- find_curl()
-
fetchcontent_declare(google_cloud_cpp
${FC_DECLARE_COMMON_OPTIONS}
URL ${google_cloud_cpp_storage_SOURCE_URL}
@@ -3453,6 +3449,9 @@ if(ARROW_WITH_GOOGLE_CLOUD_CPP)
)
endif()
+ # curl is required on all platforms. We always use system curl to
+ # avoid conflict.
+ find_curl()
resolve_dependency(google_cloud_cpp_storage PC_PACKAGE_NAMES
google_cloud_cpp_storage)
get_target_property(google_cloud_cpp_storage_INCLUDE_DIR
google-cloud-cpp::storage
INTERFACE_INCLUDE_DIRECTORIES)
diff --git a/dev/release/verify-apt.sh b/dev/release/verify-apt.sh
index ef5a1a6613..b9b8397784 100755
--- a/dev/release/verify-apt.sh
+++ b/dev/release/verify-apt.sh
@@ -162,11 +162,19 @@ if [ "${cmake_version_major}" -gt "3" ] || \
[ "${cmake_version_major}" -eq "3" -a "${cmake_version_minor}" -ge "25" ];
then
cp -a "${TOP_SOURCE_DIR}/cpp/examples/minimal_build" build/
pushd build/minimal_build
- cmake .
- make -j$(nproc)
- ./arrow-example
- c++ -o arrow-example example.cc $(pkg-config --cflags --libs arrow)
-std=c++20
- ./arrow-example
+ cmake -S . -B build_shared
+ make -C build_shared -j$(nproc)
+ build_shared/arrow-example
+ cmake -S . -B build_static -DARROW_LINK_SHARED=OFF
+ make -C build_static -j$(nproc)
+ build_static/arrow-example
+ mkdir -p build_pkg_config
+ c++ \
+ example.cc \
+ -o build_pkg_config/arrow-example \
+ $(pkg-config --cflags --libs arrow) \
+ -std=c++20
+ build_pkg_config/arrow-example
popd
fi
echo "::endgroup::"
diff --git a/dev/release/verify-yum.sh b/dev/release/verify-yum.sh
index d642f80629..684b216693 100755
--- a/dev/release/verify-yum.sh
+++ b/dev/release/verify-yum.sh
@@ -44,7 +44,7 @@ repository_version="${distribution_version}"
cmake_package=cmake
cmake_command=cmake
-devtoolset=
+gcc_toolset=
scl_package=
have_arrow_libs=no
have_flight=yes
@@ -65,11 +65,17 @@ echo "::group::Prepare repository"
case "${distribution}-${distribution_version}" in
almalinux-8)
distribution_prefix="almalinux"
+ gcc_toolset=14
have_arrow_libs=yes
ruby_devel_packages+=(redhat-rpm-config)
install_command="dnf install -y --enablerepo=powertools"
info_command="dnf info --enablerepo=powertools"
;;
+ almalinux-9)
+ distribution_prefix="almalinux"
+ gcc_toolset=12
+ ruby_devel_packages+=(redhat-rpm-config)
+ ;;
almalinux-*)
distribution_prefix="almalinux"
ruby_devel_packages+=(redhat-rpm-config)
@@ -169,11 +175,11 @@ ${install_command} \
git \
libarchive \
pkg-config
-if [ -n "${devtoolset}" ]; then
+if [ -n "${gcc_toolset}" ]; then
${install_command} \
- devtoolset-${devtoolset}-gcc-c++ \
- devtoolset-${devtoolset}-make
- . /opt/rh/devtoolset-${devtoolset}/enable
+ gcc-toolset-${gcc_toolset} \
+ make
+ . /opt/rh/gcc-toolset-${gcc_toolset}/enable
else
${install_command} \
gcc-c++ \
@@ -191,13 +197,25 @@ if [ "${cmake_version_major}" -gt "3" ] || \
[ "${cmake_version_major}" -eq "3" -a "${cmake_version_minor}" -ge "25" ];
then
cp -a "${TOP_SOURCE_DIR}/cpp/examples/minimal_build" build/
pushd build/minimal_build
- ${cmake_command} .
- make -j$(nproc)
- ./arrow-example
- c++ -o arrow-example example.cc $(pkg-config --cflags --libs arrow)
-std=c++2a
- ./arrow-example
+ cmake -S . -B build_shared
+ make -C build_shared -j$(nproc)
+ build_shared/arrow-example
+ cmake -S . -B build_static -DARROW_LINK_SHARED=OFF
+ make -C build_static -j$(nproc)
+ build_static/arrow-example
+ mkdir -p build_pkg_config
+ c++ \
+ example.cc \
+ -o build_pkg_config/arrow-example \
+ $(pkg-config --cflags --libs arrow) \
+ -std=c++2a
+ build_pkg_config/arrow-example
popd
fi
+if [ -n "${gcc_toolset}" ]; then
+ dnf remove -y "gcc-toolset-${gcc_toolset}-*"
+ ${install_command} gcc-c++
+fi
echo "::endgroup::"
if [ "${have_glib}" = "yes" ]; then