Skip to content

fix: detect system Thrift in CONFIG mode - #855

Merged
wgtmac merged 1 commit into
apache:mainfrom
abnobdoss:fix/thrift-config-detection
Jul 27, 2026
Merged

fix: detect system Thrift in CONFIG mode#855
wgtmac merged 1 commit into
apache:mainfrom
abnobdoss:fix/thrift-config-detection

Conversation

@abnobdoss

Copy link
Copy Markdown
Contributor

What

REQUIRED_VARS dereferences its entries as variable names, so passing the target thrift::thrift resolves to nothing and the module reports Thrift as missing. Instead we need to pass a variable holding the target.

Why

The current behavior breaks -DICEBERG_BUNDLE_THRIFT=OFF against any Thrift shipping a CMake config, which is 0.13 and later. resolve_thrift_dependency() calls find_package(ThriftAlt MODULE REQUIRED), so the false negative aborts configure, and it is the path iceberg_hive recommends when the target is missing. It has gone unnoticed because Arrow's bundled Thrift defines the target first and the module returns early.

Validation

  • Against a config-mode Thrift install, before: Could NOT find ThriftAlt (missing: thrift::thrift) and configure aborts. After: Found ThriftAlt: thrift::thrift and configure completes.

@wgtmac wgtmac left a comment

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.

Good catch! Thanks for fixing this!

@wgtmac
wgtmac merged commit 882fc17 into apache:main Jul 27, 2026
17 checks passed
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