Skip to content

Navigation Menu

Sign in
Sign up

feat(meson): align library modules with CMake - #912

Open
zhjwpku wants to merge 6 commits into
apache:main from
zhjwpku:feat/meson-bundle
Open

feat(meson): align library modules with CMake #912
zhjwpku wants to merge 6 commits into
apache:main from
zhjwpku:feat/meson-bundle

Conversation

@zhjwpku

@zhjwpku zhjwpku commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Provide the same library modules through Meson and CMake, including the bundle, Hive, and SQL catalogs, so applications can use either build system.

Keep installed static and shared libraries usable by downstream consumers and cover their public interfaces with installation checks.

Closes #256

AI assistance was used in this change.

zhjwpku commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

I'm not a meson expert, I use codex to help to align meson build with CMake, @WillAyd I'd appreciate it if you can help to review this change.

zhjwpku force-pushed the feat/meson-bundle branch 3 times, most recently from ca7ec4b to c994090 Compare September 5, 2026 17:55
Provide the same library modules through Meson and CMake, including the
bundle, Hive, and SQL catalogs, so applications can use either build system.
Keep installed static and shared libraries usable by downstream consumers
and cover their public interfaces with installation checks.
Closes apache#256
AI assistance was used in this change.

@WillAyd WillAyd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @zhjwpku . This is a rather large change - my suggestion would be to break it up into smaller pieces.

Comment thread meson.options
# --includedir / --datadir arguments, respectively

option(
'bundle',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Meson provides functionality that CMake doesn't have for wrangling dependencies and choosing how they should (or shouldn't) be packaged in a source distribution / install. As such, I don't think this option makes a lot of sense to implement in Meson

Comment thread meson.options
option(
'hive',
type: 'feature',
value: 'disabled',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
value: 'disabled',

I don't think its worth repeating these everywhere; best to keep as auto

Comment thread meson.build
version: '0.4.0',
license: 'Apache-2.0',
meson_version: '>=1.3.0',
meson_version: '>=1.8.3',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you know why this needs to be bumped? Generally better to keep support for older versions unless there's a critical feature

Comment thread meson.build
meson_version: '>=1.3.0',
meson_version: '>=1.8.3',
default_options: [
'default_library=static',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you know why this needs to change?

cmake_minimum_required(VERSION 3.25)
project(IcebergArrow LANGUAGES C CXX)

# Meson's CMake module imports library targets but not header installation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why does we need a CMakeLists.txt file for arrow in the meson subprojects space? There is already a Meson wrapdb entry for arrow

roaring::roaring)
list(APPEND
ICEBERG_STATIC_INSTALL_INTERFACE_LIBS
ZLIB::ZLIB

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this related to meson?

if get_option('default_library') != 'shared'
lib = get_variable(name + '_static_lib')
elif host_machine.system() == 'windows'
lib = static_library(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can avoid this branching if you use the generic build_target function and specify the target_type

CXX: g++-14
sql-clients: true
benchmarks: true
meson-setup-args: --default-library=both --buildtype=release -Db_ndebug=true --force-fallback-for=arrow,avro -Dhive=enabled -Dsql_catalog=enabled -Dsql_sqlite=enabled -Dsql_postgresql=enabled -Dsql_mysql=enabled -Dbenchmarks=enabled -Ds3=enabled -Dsigv4=enabled

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This would be better expressed via -Dauto_features=enabled instead of specifying each option; that way the CI scales across all features as they get added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@WillAyd WillAyd WillAyd requested changes
Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Implement bundle option in Meson configuration

2 participants

AltStyle によって変換されたページ (->オリジナル) /