wgtmac commented on code in PR #964:
URL: https://github.com/apache/iceberg-cpp/pull/964#discussion_r4402025235


##########
src/iceberg/iceberg-config.cmake.in:
##########
@@ -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")

Review Comment:
   Please also link `crypt32.lib`. The bundled aws-c-io's Windows TLS context 
is reached during SDK initialization and references 
`CertFreeCertificateContext`; `OpenSSL::Crypto` does not provide `crypt32` for 
shared OpenSSL. Copying Arrow's current list therefore leaves this 
static-consumer case unresolved.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to