apache / arrow

Apache Arrow is a multi-language toolbox for accelerated data interchange and in-memory processing
https://arrow.apache.org/
Apache License 2.0
14.36k stars 3.49k forks source link

[C++] Meson Support for Arrow #41816

Open WillAyd opened 4 months ago

WillAyd commented 4 months ago

Describe the enhancement requested

Meson has a rather nice collection of projects in its WrapDB, which makes it rather easy to add dependencies to your project:

https://mesonbuild.com/Wrapdb-projects.html

I do not believe this would require Arrow to implement the Meson build system; we would just have to provide Meson patch files as part of the WrapDB:

https://mesonbuild.com/Adding-new-projects-to-wrapdb.html

This is also something I've explored for nanoarrow, with the only difference being that nanoarrow has meson build files in the source tree.

Would this be something the Arrow team would be interested in? And if so, are there any thoughts on the dependencies we would like to provide? I was thinking something along the lines of:

To match how @raulcd created the new conda packages for pyarrow https://github.com/conda-forge/arrow-cpp-feedstock/pull/1255#issuecomment-1920988437

Component(s)

C++

kou commented 4 months ago

How about use the same name for lib*.so? For example, arrow for libarrow.so, arrow_acero for libarrow_acero.so and parquet for libparquet.so.

I'm using Meson for c_glib/ but I haven't used WrapDB. Do we need Meson configurations for cpp/ to support WrapDB? (cpp/ supports only CMake for now.)

WillAyd commented 4 months ago

Thanks for the feedback - those names make sense to me.

As far as the build definition files go, I don't think they have to be created in the Arrow repo itself, but can be provided as part of the wrap database entry.

https://github.com/mesonbuild/wrapdb

A good example to reference is the abseil library - they use CMake / Bazel upstream but in the wrapdb a separate meson build definition is provided in subprojects/packagefiles for it

kou commented 4 months ago

Our build configuration is (a bit?) large. (Our CMake configurations are (a bit?) large.) So it may be difficult to maintain Meson support out of this repository.

How about adding Meson support to cpp/ but it just implements subset of our CMake configurations? For example, Meson support doesn't support https://github.com/apache/arrow/blob/main/cpp/cmake_modules/ThirdpartyToolchain.cmake .

WillAyd commented 4 months ago

Sounds good - happy to explore that as well