Skip to content

fix: add platform link deps for Arrow bundled S3 libraries in CMake config#5

Open
smaheshwar-pltr wants to merge 2 commits into
mainfrom
fix-cmake-config-s3-deps
Open

fix: add platform link deps for Arrow bundled S3 libraries in CMake config#5
smaheshwar-pltr wants to merge 2 commits into
mainfrom
fix-cmake-config-s3-deps

Conversation

@smaheshwar-pltr
Copy link
Copy Markdown
Owner

@smaheshwar-pltr smaheshwar-pltr commented Apr 16, 2026

Issue

Closes #9

When ICEBERG_S3=ON with vendored Arrow (the default), arrow_bundled_dependencies contains AWS SDK C libraries that depend on platform system libraries. The installed iceberg-config.cmake creates the Arrow::arrow_bundled_dependencies IMPORTED STATIC target but doesn't declare these transitive dependencies.

Consumers using iceberg-cpp as a statically-linked library via find_package(iceberg CONFIG) with S3 support enabled hit linker failures:

Undefined symbols for architecture arm64:
  "_CFRelease", referenced from: ... in libarrow_bundled_dependencies.a(...)
  "_nw_connection_create", referenced from: ... in libarrow_bundled_dependencies.a[289](nw_socket.c.o)
  "_sec_identity_create", referenced from: ... in libarrow_bundled_dependencies.a[287](darwin_pki_utils.c.o)
  ... (30+ more _nw_*, _sec_*, _CF* symbols)
ld: symbol(s) not found for architecture arm64

PR

  • When ICEBERG_S3=ON with vendored Arrow (the default), arrow_bundled_dependencies contains AWS SDK C libraries (aws-c-common, etc.) that depend on platform system libraries. The installed iceberg-config.cmake creates the Arrow::arrow_bundled_dependencies IMPORTED STATIC target but doesn't declare these transitive deps, causing unresolved symbols for downstream consumers at link time.
  • Propagates ICEBERG_S3 into the config file via @ICEBERG_S3@ substitution and conditionally adds find_library + target_link_libraries(INTERFACE) for macOS frameworks (CoreFoundation, Security, Network) and Windows system libs (winhttp, bcrypt, etc.).
  • Non-S3 builds are completely unaffected since the block is gated on if(ICEBERG_S3).

Details

Arrow's own ArrowConfig.cmake.in handles this same problem by checking "aws-c-common" IN_LIST ARROW_BUNDLED_STATIC_LIBS. Since iceberg-cpp's config doesn't have access to ARROW_BUNDLED_STATIC_LIBS, we gate on ICEBERG_S3 instead (which is the correct semantic equivalent -- S3 support is what pulls in the AWS SDK).

The find_library variable names (CORE_FOUNDATION, SECURITY, NETWORK) match Arrow's naming convention.

Test plan

  • Build with ICEBERG_S3=ON, install, and verify the generated iceberg-config.cmake contains the platform-specific find_library and target_link_libraries calls
  • Build with ICEBERG_S3=OFF (default) and verify the generated config has no platform-specific link libraries
  • Link a downstream project against the installed iceberg package on macOS with S3 enabled -- should resolve all symbols without manual -framework flags

Sreesh Maheshwar and others added 2 commits April 16, 2026 15:49
…onfig

When iceberg-cpp is built with ICEBERG_S3=ON using vendored Arrow,
arrow_bundled_dependencies contains the AWS SDK C libraries which
depend on platform-specific system libraries (CoreFoundation, Security,
Network on macOS; winhttp, bcrypt, etc. on Windows). Without declaring
these as transitive dependencies on the IMPORTED target, downstream
consumers get unresolved symbols at link time.

This mirrors Arrow's own ArrowConfig.cmake.in handling of the same
issue for aws-c-common bundled dependencies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installed CMake config missing platform link deps for Arrow bundled S3 libraries

1 participant