fix: add platform link deps for Arrow bundled S3 libraries in CMake config#5
Open
smaheshwar-pltr wants to merge 2 commits into
Open
fix: add platform link deps for Arrow bundled S3 libraries in CMake config#5smaheshwar-pltr wants to merge 2 commits into
smaheshwar-pltr wants to merge 2 commits into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Closes #9
When
ICEBERG_S3=ONwith vendored Arrow (the default),arrow_bundled_dependenciescontains AWS SDK C libraries that depend on platform system libraries. The installediceberg-config.cmakecreates theArrow::arrow_bundled_dependenciesIMPORTED 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:PR
ICEBERG_S3=ONwith vendored Arrow (the default),arrow_bundled_dependenciescontains AWS SDK C libraries (aws-c-common, etc.) that depend on platform system libraries. The installediceberg-config.cmakecreates theArrow::arrow_bundled_dependenciesIMPORTED STATIC target but doesn't declare these transitive deps, causing unresolved symbols for downstream consumers at link time.ICEBERG_S3into the config file via@ICEBERG_S3@substitution and conditionally addsfind_library+target_link_libraries(INTERFACE)for macOS frameworks (CoreFoundation, Security, Network) and Windows system libs (winhttp, bcrypt, etc.).if(ICEBERG_S3).Details
Arrow's own
ArrowConfig.cmake.inhandles this same problem by checking"aws-c-common" IN_LIST ARROW_BUNDLED_STATIC_LIBS. Since iceberg-cpp's config doesn't have access toARROW_BUNDLED_STATIC_LIBS, we gate onICEBERG_S3instead (which is the correct semantic equivalent -- S3 support is what pulls in the AWS SDK).The
find_libraryvariable names (CORE_FOUNDATION,SECURITY,NETWORK) match Arrow's naming convention.Test plan
ICEBERG_S3=ON, install, and verify the generatediceberg-config.cmakecontains the platform-specificfind_libraryandtarget_link_librariescallsICEBERG_S3=OFF(default) and verify the generated config has no platform-specific link libraries-frameworkflags