Skip to content

fix: repair shared package linkage and export scan builder symbols#635

Merged
wgtmac merged 2 commits intoapache:mainfrom
zhjwpku:fix/shared-linkage-exports
May 3, 2026
Merged

fix: repair shared package linkage and export scan builder symbols#635
wgtmac merged 2 commits intoapache:mainfrom
zhjwpku:fix/shared-linkage-exports

Conversation

@zhjwpku
Copy link
Copy Markdown
Collaborator

@zhjwpku zhjwpku commented May 2, 2026

  1. Update the shared installation interface to depend on the static nanoarrow target, since vendored libraries are built only as static artifacts(see prepare_fetchcontent).

  2. Switch the example build to use shared libraries to surface linkage issues. This revealed that TableScanBuilder symbols are not exported. Explicitly export the TableScanBuilder template instantiations so that shared-library consumers can successfully link against Build().

zhjwpku added 2 commits May 2, 2026 20:28
1. Update the shared installation interface to depend on the
   static nanoarrow target, since vendored libraries are built
   only as static artifacts(see prepare_fetchcontent).

2. Switch the example build to use shared libraries to surface
   linkage issues. This revealed that `TableScanBuilder` symbols
   are not exported. Explicitly export the `TableScanBuilder`
   template instantiations so that shared-library consumers can
   successfully link against `Build()`.
Comment thread example/CMakeLists.txt

target_link_libraries(demo_example PRIVATE iceberg::iceberg_bundle_static
iceberg::iceberg_rest_static)
target_link_libraries(demo_example PRIVATE iceberg::iceberg_bundle_shared
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example now unconditionally links iceberg::iceberg_bundle_shared and iceberg::iceberg_rest_shared, but the project default is ICEBERG_BUILD_SHARED=OFF and ICEBERG_BUILD_STATIC=ON. A default static-only install exports only the static targets, so configuring the example against that package fails at CMake generate with missing iceberg::iceberg_bundle_shared.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't considered that. Should we set ICEBERG_BUILD_SHARED=ON and ICEBERG_BUILD_STATIC=OFF, or set both ON?

@wgtmac wgtmac merged commit d6130f7 into apache:main May 3, 2026
13 checks passed
@zhjwpku zhjwpku deleted the fix/shared-linkage-exports branch May 4, 2026 01:54
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.

2 participants