Skip to content

Commit f1f4106

Browse files
committed
GH-48885: [C++] Add missing curl dependency of Arrow::arrow_static CMake target
1 parent 34045db commit f1f4106

File tree

3 files changed

+35
-14
lines changed

3 files changed

+35
-14
lines changed

cpp/cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3366,10 +3366,6 @@ function(build_google_cloud_cpp_storage)
33663366
# List of dependencies taken from https://github.com/googleapis/google-cloud-cpp/blob/main/doc/packaging.md
33673367
build_crc32c_once()
33683368

3369-
# Curl is required on all platforms, but building it internally might also trip over S3's copy.
3370-
# For now, force its inclusion from the underlying system or fail.
3371-
find_curl()
3372-
33733369
fetchcontent_declare(google_cloud_cpp
33743370
${FC_DECLARE_COMMON_OPTIONS}
33753371
URL ${google_cloud_cpp_storage_SOURCE_URL}
@@ -3453,6 +3449,9 @@ if(ARROW_WITH_GOOGLE_CLOUD_CPP)
34533449
)
34543450
endif()
34553451

3452+
# curl is required on all platforms. We always use system curl to
3453+
# avoid conflict.
3454+
find_curl()
34563455
resolve_dependency(google_cloud_cpp_storage PC_PACKAGE_NAMES google_cloud_cpp_storage)
34573456
get_target_property(google_cloud_cpp_storage_INCLUDE_DIR google-cloud-cpp::storage
34583457
INTERFACE_INCLUDE_DIRECTORIES)

dev/release/verify-apt.sh

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,19 @@ if [ "${cmake_version_major}" -gt "3" ] || \
162162
[ "${cmake_version_major}" -eq "3" -a "${cmake_version_minor}" -ge "25" ]; then
163163
cp -a "${TOP_SOURCE_DIR}/cpp/examples/minimal_build" build/
164164
pushd build/minimal_build
165-
cmake .
166-
make -j$(nproc)
167-
./arrow-example
168-
c++ -o arrow-example example.cc $(pkg-config --cflags --libs arrow) -std=c++20
169-
./arrow-example
165+
cmake -S . -B build_shared
166+
make -C build_shared -j$(nproc)
167+
build_shared/arrow-example
168+
cmake -S . -B build_static -DARROW_LINK_SHARED=OFF
169+
make -C build_static -j$(nproc)
170+
build_static/arrow-example
171+
mkdir -p build_pkg_config
172+
c++ \
173+
example.cc \
174+
-o build_pkg_config/arrow-example \
175+
$(pkg-config --cflags --libs arrow) \
176+
-std=c++20
177+
build_pkg_config/arrow-example
170178
popd
171179
fi
172180
echo "::endgroup::"

dev/release/verify-yum.sh

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,17 @@ echo "::group::Prepare repository"
6565
case "${distribution}-${distribution_version}" in
6666
almalinux-8)
6767
distribution_prefix="almalinux"
68+
devtoolset=14
6869
have_arrow_libs=yes
6970
ruby_devel_packages+=(redhat-rpm-config)
7071
install_command="dnf install -y --enablerepo=powertools"
7172
info_command="dnf info --enablerepo=powertools"
7273
;;
74+
almalinux-9)
75+
distribution_prefix="almalinux"
76+
devtoolset=12
77+
ruby_devel_packages+=(redhat-rpm-config)
78+
;;
7379
almalinux-*)
7480
distribution_prefix="almalinux"
7581
ruby_devel_packages+=(redhat-rpm-config)
@@ -191,11 +197,19 @@ if [ "${cmake_version_major}" -gt "3" ] || \
191197
[ "${cmake_version_major}" -eq "3" -a "${cmake_version_minor}" -ge "25" ]; then
192198
cp -a "${TOP_SOURCE_DIR}/cpp/examples/minimal_build" build/
193199
pushd build/minimal_build
194-
${cmake_command} .
195-
make -j$(nproc)
196-
./arrow-example
197-
c++ -o arrow-example example.cc $(pkg-config --cflags --libs arrow) -std=c++2a
198-
./arrow-example
200+
cmake -S . -B build_shared
201+
make -C build_shared -j$(nproc)
202+
build_shared/arrow-example
203+
cmake -S . -B build_static -DARROW_LINK_SHARED=OFF
204+
make -C build_static -j$(nproc)
205+
build_static/arrow-example
206+
mkdir -p build_pkg_config
207+
c++ \
208+
example.cc \
209+
-o build_pkg_config/arrow-example \
210+
$(pkg-config --cflags --libs arrow) \
211+
-std=c++2a
212+
build_pkg_config/arrow-example
199213
popd
200214
fi
201215
echo "::endgroup::"

0 commit comments

Comments
 (0)