From cbff39e35c9d41c1f460387666b31b887a073c4a Mon Sep 17 00:00:00 2001 From: Sreesh Maheshwar Date: Thu, 15 Oct 2026 21:34:04 +0100 Subject: [PATCH 1/2] fix: add bundled S3 platform link dependencies With a bundled AWS SDK, the installed iceberg-config.cmake recreates Arrow::arrow_bundled_dependencies but did not link the macOS frameworks and Windows system libraries the bundled AWS libraries need, so static consumers failed to link. Link them as Arrow's ArrowConfig.cmake does. Co-Authored-By: Claude Opus 5.5 --- src/iceberg/iceberg-config.cmake.in | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/iceberg/iceberg-config.cmake.in b/src/iceberg/iceberg-config.cmake.in index 4f440362e..1bdebef48 100644 --- a/src/iceberg/iceberg-config.cmake.in +++ b/src/iceberg/iceberg-config.cmake.in @@ -39,6 +39,7 @@ set(ICEBERG_BUILD_STATIC "@ICEBERG_BUILD_STATIC@") set(ICEBERG_CXX20_COMPAT @ICEBERG_CXX20_COMPAT_VALUE@) +set(ICEBERG_AWSSDK_BUNDLED "@ICEBERG_AWSSDK_BUNDLED@") set(ICEBERG_SYSTEM_DEPENDENCIES "@ICEBERG_SYSTEM_DEPENDENCIES@") # Extra args forwarded to find_dependency() for specific dependencies. @@ -103,6 +104,31 @@ if(TARGET iceberg::arrow_static) "${arrow_lib_dir}/${CMAKE_STATIC_LIBRARY_PREFIX}arrow_bundled_dependencies${CMAKE_STATIC_LIBRARY_SUFFIX}" ) endforeach() + + # Arrow's bundled AWS libraries require platform-specific system libraries. + if(ICEBERG_AWSSDK_BUNDLED) + if(APPLE) + find_library(CORE_FOUNDATION CoreFoundation) + target_link_libraries(Arrow::arrow_bundled_dependencies + INTERFACE ${CORE_FOUNDATION}) + find_library(NETWORK Network) + target_link_libraries(Arrow::arrow_bundled_dependencies + INTERFACE ${NETWORK}) + find_library(SECURITY Security) + target_link_libraries(Arrow::arrow_bundled_dependencies + INTERFACE ${SECURITY}) + elseif(WIN32) + target_link_libraries(Arrow::arrow_bundled_dependencies + INTERFACE "winhttp.lib" + "bcrypt.lib" + "wininet.lib" + "userenv.lib" + "version.lib" + "ncrypt.lib" + "Secur32.lib" + "Shlwapi.lib") + endif() + endif() endif() if(TARGET iceberg::parquet_static) From 9c6b124eb79082f2bd14bff57cfbc84782506072 Mon Sep 17 00:00:00 2001 From: Sreesh Maheshwar Date: Wed, 4 Nov 2026 22:42:27 +0000 Subject: [PATCH 2/2] fix: link crypt32 for bundled aws-c-io on Windows aws-c-io's Windows TLS code calls CertFreeCertificateContext from crypt32. Arrow's list leaves it out, and a shared OpenSSL doesn't pull it in either. Co-Authored-By: Claude Opus 5.5 --- src/iceberg/iceberg-config.cmake.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/iceberg/iceberg-config.cmake.in b/src/iceberg/iceberg-config.cmake.in index 1bdebef48..4eee8e07e 100644 --- a/src/iceberg/iceberg-config.cmake.in +++ b/src/iceberg/iceberg-config.cmake.in @@ -118,6 +118,7 @@ if(TARGET iceberg::arrow_static) target_link_libraries(Arrow::arrow_bundled_dependencies INTERFACE ${SECURITY}) elseif(WIN32) + # Unlike Arrow, also link crypt32, which aws-c-io's Windows TLS code uses. target_link_libraries(Arrow::arrow_bundled_dependencies INTERFACE "winhttp.lib" "bcrypt.lib" @@ -126,7 +127,8 @@ if(TARGET iceberg::arrow_static) "version.lib" "ncrypt.lib" "Secur32.lib" - "Shlwapi.lib") + "Shlwapi.lib" + "crypt32.lib") endif() endif() endif()