Skip to content

ORC-1906: Support Meson build - #2249

Closed
WillAyd wants to merge 1 commit into
apache:mainfrom
WillAyd:add-meson
Closed

ORC-1906: Support Meson build#2249
WillAyd wants to merge 1 commit into
apache:mainfrom
WillAyd:add-meson

Conversation

@WillAyd

@WillAydWillAyd commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This adds a Meson configuration for the default C++ options in ORC. By adding this configuration, users of the Meson build system will have an easier time including Orc into their projects. In the mid to longer term, this could help the Apache Arrow project also become easier to include in other C++ project

Why are the changes needed?

The current motivating factor is for Apache Arrow, where incremental improvements to the Meson build system are underway

How was this patch tested?

A new CI job for Meson has been configured

Was this patch authored or co-authored using generative AI tooling?

No

Closes#2244

@WillAyd
WillAydforce-pushed the add-meson branch 3 times, most recently from 8372448 to 3c290dbCompareJune 3, 2025 17:43

@WillAydWillAyd left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@wgtmac@dongjoon-hyun hope this is a reasonable starting point for the Meson configuration. More options and features can of course be added over time :-)

Comment threadsubprojects/orc-format.wrap
@WillAyd

Copy link
Copy Markdown
ContributorAuthor

closes #2244

@dongjoon-hyun

Copy link
Copy Markdown
Member

Thank you for making a PR. Could you make CI happy, @WillAyd ? It seems that Windows test pipeline fails.

Comment threadsubprojects/gtest.wrap
@dongjoon-hyundongjoon-hyun changed the title Meson configuration for default C++ optionsORC-1906: Support Meson buildJun 6, 2025
@dongjoon-hyundongjoon-hyun added this to the 2.2.0 milestone Jun 6, 2025
Comment threadmeson.build Outdated
Comment threadsubprojects/google-snappy.wrap Outdated
Comment threadsubprojects/gtest.wrap Outdated
Comment threadsubprojects/lz4.wrap
Comment threadsubprojects/protobuf.wrap Outdated
Comment threadsubprojects/zlib.wrap
Comment threadsubprojects/zstd.wrap

@dongjoon-hyundongjoon-hyun 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.

Thank you for updating, @WillAyd .

In general, it looks okay although the new directory seems to make the source tree complicated.

However, the library difference could be very misleading to the Apache ORC community users. Ideally, build systems are supposed to be orthogonal to the ORC dependency. I'd recommend to use the matched versions in Mesos build too if there is no inevitable reasons. Especially, Protobuf difference means a breaking difference. So, I believe it should be identical.

@WillAyd

Copy link
Copy Markdown
ContributorAuthor

I'm not sure if Meson intends for each library to house its own version of dependencies. Taking the protobuf dependency as an example, the version that Orc requires is different than the one Arrow requires, neither of which match the version that is installed on a major platform like current Debian. So enforcing exact version requirements I think makes it more difficult to build these packages, especially together.

@eli-schwartz is better qualified to talk about the implications of the dependency version management

@dongjoon-hyun

Copy link
Copy Markdown
Member

That's too bad. Unfortunately, this sounds like a blocker for adding 3rd-party Mesos build to the Apache ORC community.

So enforcing exact version requirements I think makes it more difficult to build these packages, especially together.

Since this is the official Apache ORC main repository, we don't want to introduce any confusions or risks to the existing Apache ORC users and non-memos down-streams. If this is inevitable, I'd recommend to keep this specific incompatible changes in the AS-IS way only in the Mesos-downstream instead of http://github.com/apache/orc .

@eli-schwartz

eli-schwartz commented Jun 8, 2025

Copy link
Copy Markdown

Meson doesn't have strong opinions about what version you use.

If you build ORC as a third-party vendored dependency of some other project, and that project ALSO uses protobuf, then that other project, being the top-level project, gets "first dibs" on building a copy of protobuf. There can only be one version per build directory, due to the diamond dependency rule, and multiple subprojects can each have a wrap file but "first come, first served".

The diamond dependency rule can't really be "solved" by build systems. If you try to link multiple versions of protobuf into one executable process space, they will stomp on each others' internal data.

If ORC requires specific versions of protobuf and fails otherwise, that information should be encoded as:

dependency('protobuf', version: ['>=minimum', '<=maximum'])

which will of course be respected.

If it supports multiple versions but there's a specific recommended one, use whichever version makes both you and the reviewers happy :D probably the one currently in use. Linux distros building ORC already want to ignore vendored code copies of dependencies, which means they need to successfully build with the latest system-packaged /usr/lib64/libprotobuf.so

@WillAyd

WillAyd commented Jun 9, 2025

Copy link
Copy Markdown
ContributorAuthor

Thanks @eli-schwartz that context is really helpful.

@dongjoon-hyun for now I have downgraded the versions pulled in by Meson's wrapdb for googletest and protobuf to match the existing CMake configuration. The snappy version is the only one left I think that is different, but that specific version doesn't exist in the wrapdb yet. I'll take a look at adding that

Comment threadc++/meson.build Outdated
@WillAyd
WillAydforce-pushed the add-meson branch 2 times, most recently from a2b59f9 to b3d0094CompareJune 9, 2025 22:52
@WillAyd

Copy link
Copy Markdown
ContributorAuthor

The snappy version is the only one left I think that is different, but that specific version doesn't exist in the wrapdb yet. I'll take a look at adding that

google-snappy 1.2.2 was added upstream to the Meson WrapDB today and I've updated this PR to use that. Hope I've addressed all your feedback @dongjoon-hyun but let me know if anything is missing

Comment threadREADME.md Outdated
Comment threadc++/src/meson.build
Comment threadsubprojects/protobuf.wrap
Comment threadtools/meson.build Outdated
Comment threadtools/src/meson.build Outdated
Comment thread.github/workflows/build_and_test.yml Outdated

@dongjoon-hyundongjoon-hyun 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.

Thank you for updating, @WillAyd . I reviewed again and added comments.

@WillAyd
WillAydforce-pushed the add-meson branch 2 times, most recently from de7ed09 to 4ebcabfCompareJune 10, 2025 13:07

@dongjoon-hyundongjoon-hyun 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.

Thank you for update, @WillAyd . However, this seems to be ignored from my perspective.

https://github.com/apache/orc/pull/2249/files#r2136861282

@dongjoon-hyundongjoon-hyun removed this from the 2.2.0 milestone Jun 14, 2025
@dongjoon-hyun
dongjoon-hyun dismissed their stale reviewJune 14, 2025 22:17

Stale review.

@WillAyd

Copy link
Copy Markdown
ContributorAuthor

Sorry about that - I think I've addressed it now

@dongjoon-hyundongjoon-hyun 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.

+1, LGTM. Thank you so much, @WillAyd and @eli-schwartz .

@dongjoon-hyun

Copy link
Copy Markdown
Member

cc @williamhyun , @wgtmac , @ffacs , too.

@dongjoon-hyundongjoon-hyun added this to the 2.2.0 milestone Jun 17, 2025

@williamhyunwilliamhyun 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.

+1 LGTM, will be merging this now.

@williamhyun

Copy link
Copy Markdown
Member

Thank you @WillAyd, @eli-schwartz, and @dongjoon-hyun for your contributions!

@williamhyun

Copy link
Copy Markdown
Member

@WillAyd please let me know your Jira ID such that I can assign ORC-1906 to you.

@WillAyd

WillAyd commented Jun 19, 2025

Copy link
Copy Markdown
ContributorAuthor

@williamhyun you can use willayd - thanks!

@WillAyd
WillAyd deleted the add-meson branch June 19, 2025 18:13
@dongjoon-hyun

Copy link
Copy Markdown
Member

you can use william.ayd@icloud.com - thanks!

FYI, JIRA ID means the ID at https://issues.apache.org , @WillAyd .

@WillAyd

Copy link
Copy Markdown
ContributorAuthor

Ah sorry - my Jira id is willayd

@dongjoon-hyun

dongjoon-hyun commented Jun 23, 2025

Copy link
Copy Markdown
Member

No problem at all. I added you to the Apache ORC contributor group and assigned ORC-1906 to you.

Screenshot 2025-06-23 at 11 37 07

dongjoon-hyun pushed a commit to apache/spark that referenced this pull request Jul 30, 2025
### What changes were proposed in this pull request?
This PR aims to upgrade ORC to 2.2.0. 2.2.0 RC1 is currently under voting.
### Why are the changes needed?
Apache ORC 2.2.0 is a new feature release.
- https://github.com/apache/orc/releases/tag/v2.2.0
- apache/orc#2032
- apache/orc#2338
- apache/orc#2269
- apache/orc#2249
- apache/orc#2144
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes#51676 from williamhyun/ORC-2.2.0.
Authored-by: William Hyun <william@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ORC-1906: Support Meson build

5 participants

@WillAyd@dongjoon-hyun@eli-schwartz@williamhyun@wgtmac