GH-51329: [C++][CI] Test static linking with S3 and fix Azure/GCS deps - #51280
GH-51329: [C++][CI] Test static linking with S3 and fix Azure/GCS deps#51280tadeja wants to merge 8 commits into
Conversation
|
Thanks for opening a pull request! This pull request has been automatically converted to a draft because its title doesn't match Arrow's required format. If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format? or After updating the title, you can mark the pull request as ready for review. See also: |
|
@github-actions crossbow submit test-conda-cpp |
|
Revision: b6b76f8 Submitted crossbow builds: ursacomputing/crossbow @ actions-c1f06c30ce
|
|
@github-actions crossbow submit test-conda-cpp |
|
Revision: f03e760 Submitted crossbow builds: ursacomputing/crossbow @ actions-e4020eadf0
|
|
@github-actions crossbow submit test-conda-cpp |
|
Revision: e28fd84 Submitted crossbow builds: ursacomputing/crossbow @ actions-4282328564
|
|
yay, new static linking test shows further failures for bundled Azure and google-cloud-cpp: [ 50%] Built target arrow-example
[ 75%] Building CXX object CMakeFiles/arrow-example-s3-static.dir/example.cc.o
[100%] Linking CXX executable arrow-example-s3-static
Undefined symbols for architecture arm64:
"_curl_easy_cleanup", referenced from:
Azure::Core::_internal::UniqueHandleDeleter<void, curl_easy_cleanup>::operator()(void*) in libarrow_bundled_dependencies.a[2](curl.cpp.o)
google::cloud::rest_internal::v3_2::CurlPtrCleanup::operator()(void*) const in libarrow_bundled_dependencies.a[214](curl_handle.cc.o)[ 75%] Building CXX object CMakeFiles/arrow-example-s3-static.dir/example.cc.o
[100%] Linking CXX executable arrow-example-s3-static
/usr/bin/ld: /usr/local/lib/libarrow_bundled_dependencies.a(xml_wrapper.cpp.o): in function `Azure::Storage::_internal::XmlReader::XmlReader(char const*, unsigned long)':
/build/cpp/_deps/azure_sdk-src/sdk/storage/azure-storage-common/src/xml_wrapper.cpp:416: undefined reference to `xmlReaderForMemory'
... |
|
In my opinion it is better if we tackle this separately on its own issue. |
|
@github-actions crossbow submit test-conda-cpp |
| find_package(ArrowS3 QUIET) | ||
| if(TARGET ArrowS3::arrow_s3_static) |
There was a problem hiding this comment.
this won't do anything here, right? Doesn't this has to be executed on top of my branch?
|
Revision: 4134d2d Submitted crossbow builds: ursacomputing/crossbow @ actions-e76cd70dbd
|
|
Now with temporarily added workaround of #50949 (cherry-pick 76eea10) to get rid of [100%] Linking CXX executable arrow-example-s3-static
[100%] Built target arrow-example-s3-static
/arrow/cpp/examples/minimal_build /build/cpp /
+ pushd /arrow/cpp/examples/minimal_build
+ PATH=/opt/conda/envs/arrow/bin:...
+ /build/cpp/examples/minimal_build/arrow-example
...
* Verify S3 initializes and finalizes
... |
Filed as #51329 — it reproduces the libxml2 half against a released artifact ( Two observations from writing it up, in case they're useful for wherever the fix lands:
Worth noting this is a different axis from #50753: that one is about SYSTEM declarations being easy to forget because they sit apart from |
|
|
There was a problem hiding this comment.
🟡 Changes recommended
Resolve the Windows bundled-GCS curl linkage issue and align the CI S3 flag with effective build settings.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds static S3 linking coverage and exports dependencies needed by bundled Azure/GCS consumers.
Changes:
- Adds Azure/GCS static-link dependencies.
- Adds S3 initialization to the minimal example.
- Runs a static S3 smoke test in C++ CI.
File summaries
| File | Reviewed changes |
|---|---|
cpp/src/arrow/CMakeLists.txt |
Adds static Azure/GCS dependency interfaces; bundled GCS curl linkage remains incomplete on Windows. |
cpp/examples/minimal_build/example.cc |
Exercises S3 initialization and finalization. |
cpp/examples/minimal_build/CMakeLists.txt |
Builds the S3-enabled static example. |
cpp/cmake_modules/ThirdpartyToolchain.cmake |
Updates bundled curl and libxml2 dependency discovery. |
ci/scripts/cpp_test.sh |
Builds and runs the S3 smoke test; its flag may diverge from effective build settings when threading is disabled. |
Review details
Suppressed comments (2)
ci/scripts/cpp_test.sh:149
cpp_build.shforce-disablesARROW_S3whenARROW_ENABLE_THREADING=OFF(its lines 69-80), but this flag is derived from the original environment here. In that supported configuration withARROW_S3=ON, Arrow is built without S3 and this test then tries to link the S3 example, producing a false failure. Please derive the example flag from the effective build settings or carry the override into the test step.
-DARROW_EXAMPLE_S3="${ARROW_S3:-OFF}" \
cpp/src/arrow/CMakeLists.txt:52
- This only updates the exported CMake target.
arrow.pcgetsRequires.private/Libs.privatefromARROW_PC_REQUIRES_PRIVATE/ARROW_PC_LIBS_PRIVATE, but neither this Azure branch nor the new bundled-GCS branch addslibxml-2.0orlibcurlthere (the bundled AWS path explicitly addslibcurlatcpp/cmake_modules/ThirdpartyToolchain.cmake:4262-4264). Consequentlypkg-config --static --libs arrowstill omits the libraries needed by bundled Azure/GCS consumers. Please add the corresponding private pkg-config requirements for both dependencies.
elseif(Azure_SOURCE STREQUAL "BUNDLED")
if(UNIX)
list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS CURL::libcurl LibXml2::LibXml2)
endif()
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if(UNIX) | ||
| list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS CURL::libcurl) | ||
| endif() |
Rationale for this change
Additional downstream static-linking test either pre #50195 (or followup)
What changes are included in this PR?
Test Arrow/S3 static linking,
fix dependencies for Azure and bundled GCS.
Are these changes tested?
Tested by CI
Are there any user-facing changes?
No.