You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "WillAyd (via GitHub)" <gi...@apache.org> on 2025/02/06 00:45:40 UTC
[PR] GH-41816: [C++] Meson Build System Support [arrow]
WillAyd opened a new pull request, #45441:
URL: https://github.com/apache/arrow/pull/45441
<!--
Thanks for opening a pull request!
If this is your first pull request you can find detailed information on how
to contribute here:
* [New Contributor's Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
* [Contributing Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
If this is not a [minor PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose
Opening GitHub issues ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
Then could you also rename the pull request title in the following format?
GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
or
MINOR: [${COMPONENT}] ${SUMMARY}
-->
### Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
The Meson build system may be more user friendly to some developers, and may make it easier to perform tasks like valgrind, coverage, or ASAN/UBSAN coverage. There is also a prior art for using meson in the nanoarrow and arrow-adbc projects.
### What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
This PR implements a Meson configuration that can support the `ARROW_BUILD_TESTS` and `ARROW_COMPUTE` options, as well as the dependencies for those options
### Are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
Not in CI. You can download and run `meson test` when built to run the test suite.
### Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
No. This is strictly for developers
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #45441:
URL: https://github.com/apache/arrow/pull/45441#discussion_r1957484884
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,325 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+dl_dep = dependency('dl')
+threads_dep = dependency('threads')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
Review Comment:
Can we remove this comment?
We don't need this comment now, right?
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,325 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+dl_dep = dependency('dl')
+threads_dep = dependency('threads')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+arrow_components = {
+ 'arrow_array': {
+ 'sources': [
+ 'array/array_base.cc',
+ 'array/array_binary.cc',
+ 'array/array_decimal.cc',
+ 'array/array_dict.cc',
+ 'array/array_nested.cc',
+ 'array/array_primitive.cc',
+ 'array/array_run_end.cc',
+ 'array/builder_adaptive.cc',
+ 'array/builder_base.cc',
+ 'array/builder_binary.cc',
+ 'array/builder_decimal.cc',
+ 'array/builder_dict.cc',
+ 'array/builder_run_end.cc',
+ 'array/builder_nested.cc',
+ 'array/builder_primitive.cc',
+ 'array/builder_union.cc',
+ 'array/concatenate.cc',
+ 'array/data.cc',
+ 'array/diff.cc',
+ 'array/statistics.cc',
+ 'array/util.cc',
+ 'array/validate.cc',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+ 'arrow_compute': {
+ 'sources': [
+ 'compute/api_aggregate.cc',
+ 'compute/api_scalar.cc',
+ 'compute/api_vector.cc',
+ 'compute/cast.cc',
+ 'compute/exec.cc',
+ 'compute/expression.cc',
+ 'compute/function.cc',
+ 'compute/function_internal.cc',
+ 'compute/kernel.cc',
+ 'compute/ordering.cc',
+ 'compute/registry.cc',
+ 'compute/kernels/chunked_internal.cc',
+ 'compute/kernels/codegen_internal.cc',
+ 'compute/kernels/ree_util_internal.cc',
+ 'compute/kernels/scalar_cast_boolean.cc',
+ 'compute/kernels/scalar_cast_dictionary.cc',
+ 'compute/kernels/scalar_cast_extension.cc',
+ 'compute/kernels/scalar_cast_internal.cc',
+ 'compute/kernels/scalar_cast_nested.cc',
+ 'compute/kernels/scalar_cast_numeric.cc',
+ 'compute/kernels/scalar_cast_string.cc',
+ 'compute/kernels/scalar_cast_temporal.cc',
+ 'compute/kernels/util_internal.cc',
+ 'compute/kernels/vector_hash.cc',
+ 'compute/kernels/vector_selection.cc',
+ 'compute/kernels/vector_selection_filter_internal.cc',
+ 'compute/kernels/vector_selection_internal.cc',
+ 'compute/kernels/vector_selection_take_internal.cc',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+ 'arrow_io': {
+ 'sources': [
+ 'io/buffered.cc',
+ 'io/caching.cc',
+ 'io/compressed.cc',
+ 'io/file.cc',
+ 'io/hdfs.cc',
+ 'io/hdfs_internal.cc',
+ 'io/interfaces.cc',
+ 'io/memory.cc',
+ 'io/slow.cc',
+ 'io/stdio.cc',
+ 'io/transform.cc',
+ ],
+ 'include_dirs': [include_directories('../../thirdparty/hadoop/include')],
+ 'dependencies': [dl_dep],
+ },
+ 'arrow_util': {
+ 'sources': [
+ 'util/align_util.cc',
+ 'util/async_util.cc',
+ 'util/atfork_internal.cc',
+ 'util/basic_decimal.cc',
+ 'util/bit_block_counter.cc',
+ 'util/bit_run_reader.cc',
+ 'util/bit_util.cc',
+ 'util/bitmap.cc',
+ 'util/bitmap_builders.cc',
+ 'util/bitmap_ops.cc',
+ 'util/bpacking.cc',
+ 'util/byte_size.cc',
+ 'util/cancel.cc',
+ 'util/compression.cc',
+ 'util/counting_semaphore.cc',
+ 'util/cpu_info.cc',
+ 'util/crc32.cc',
+ 'util/debug.cc',
+ 'util/decimal.cc',
+ 'util/delimiting.cc',
+ 'util/dict_util.cc',
+ 'util/fixed_width_internal.cc',
+ 'util/float16.cc',
+ 'util/formatting.cc',
+ 'util/future.cc',
+ 'util/hashing.cc',
+ 'util/int_util.cc',
+ 'util/io_util.cc',
+ 'util/list_util.cc',
+ 'util/logger.cc',
+ 'util/logging.cc',
+ 'util/key_value_metadata.cc',
+ 'util/memory.cc',
+ 'util/mutex.cc',
+ 'util/ree_util.cc',
+ 'util/string.cc',
+ 'util/string_builder.cc',
+ 'util/task_group.cc',
+ 'util/tdigest.cc',
+ 'util/thread_pool.cc',
+ 'util/time.cc',
+ 'util/tracing.cc',
+ 'util/trie.cc',
+ 'util/union_util.cc',
+ 'util/unreachable.cc',
+ 'util/uri.cc',
+ 'util/utf8.cc',
+ 'util/value_parsing.cc',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [threads_dep],
+ },
+ 'memory_pool': {
+ 'sources': ['memory_pool.cc'],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+ 'vendored': {
+ 'sources': [
+ 'vendored/base64.cpp',
+ 'vendored/datetime.cpp',
+ 'vendored/double-conversion/bignum-dtoa.cc',
+ 'vendored/double-conversion/bignum.cc',
+ 'vendored/double-conversion/cached-powers.cc',
+ 'vendored/double-conversion/double-to-string.cc',
+ 'vendored/double-conversion/fast-dtoa.cc',
+ 'vendored/double-conversion/fixed-dtoa.cc',
+ 'vendored/double-conversion/string-to-double.cc',
+ 'vendored/double-conversion/strtod.cc',
+ 'vendored/musl/strptime.c',
+ 'vendored/uriparser/UriCommon.c',
+ 'vendored/uriparser/UriCompare.c',
+ 'vendored/uriparser/UriEscape.c',
+ 'vendored/uriparser/UriFile.c',
+ 'vendored/uriparser/UriIp4.c',
+ 'vendored/uriparser/UriIp4Base.c',
+ 'vendored/uriparser/UriMemory.c',
+ 'vendored/uriparser/UriNormalize.c',
+ 'vendored/uriparser/UriNormalizeBase.c',
+ 'vendored/uriparser/UriParse.c',
+ 'vendored/uriparser/UriParseBase.c',
+ 'vendored/uriparser/UriQuery.c',
+ 'vendored/uriparser/UriRecompose.c',
+ 'vendored/uriparser/UriResolve.c',
+ 'vendored/uriparser/UriShorten.c',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+ 'arrow_base': {
+ 'sources': [
+ 'builder.cc',
+ 'buffer.cc',
+ 'chunked_array.cc',
+ 'chunk_resolver.cc',
+ 'compare.cc',
+ 'config.cc',
+ 'datum.cc',
+ 'device.cc',
+ 'device_allocation_type_set.cc',
+ 'extension_type.cc',
+ 'extension/bool8.cc',
+ 'extension/json.cc',
+ 'extension/uuid.cc',
+ 'pretty_print.cc',
+ 'record_batch.cc',
+ 'result.cc',
+ 'scalar.cc',
+ 'sparse_tensor.cc',
+ 'status.cc',
+ 'table.cc',
+ 'table_builder.cc',
+ 'tensor.cc',
+ 'tensor/coo_converter.cc',
+ 'tensor/csf_converter.cc',
+ 'tensor/csx_converter.cc',
+ 'type.cc',
+ 'type_traits.cc',
+ 'visitor.cc',
+ 'c/bridge.cc',
+ 'c/dlpack.cc',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+}
+
+arrow_srcs = []
+include_dir = include_directories('..')
+arrow_includes = [include_dir]
+arrow_deps = []
+foreach key, val : arrow_components
+ arrow_srcs += val['sources']
+ arrow_includes += val['include_dirs']
+ arrow_deps += val['dependencies']
+endforeach
+
+arrow_lib = library(
+ 'arrow',
+ sources: arrow_srcs,
+ include_directories: arrow_includes,
+ dependencies: arrow_deps,
+ install: true,
+)
+
+# Meson does not allow you to glob for headers to install. See also
+# https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard
+# install_subdir would be usable if the directory only contained headers
+install_headers(
+ [
+ 'api.h',
+ 'array.h',
+ 'buffer_builder.h',
+ 'buffer.h',
+ 'builder.h',
+ 'chunked_array.h',
+ 'chunk_resolver.h',
+ 'compare.h',
+ 'config.h',
+ 'datum.h',
+ 'device_allocation_type_set.h',
+ 'device.h',
+ 'extension_type.h',
+ 'memory_pool.h',
+ 'memory_pool_test.h',
+ 'pch.h',
+ 'pretty_print.h',
+ 'record_batch.h',
+ 'result.h',
+ 'scalar.h',
+ 'sparse_tensor.h',
+ 'status.h',
+ 'stl_allocator.h',
+ 'stl.h',
+ 'stl_iterator.h',
Review Comment:
Could you sort them?
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,325 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+dl_dep = dependency('dl')
+threads_dep = dependency('threads')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+arrow_components = {
+ 'arrow_array': {
+ 'sources': [
+ 'array/array_base.cc',
+ 'array/array_binary.cc',
+ 'array/array_decimal.cc',
+ 'array/array_dict.cc',
+ 'array/array_nested.cc',
+ 'array/array_primitive.cc',
+ 'array/array_run_end.cc',
+ 'array/builder_adaptive.cc',
+ 'array/builder_base.cc',
+ 'array/builder_binary.cc',
+ 'array/builder_decimal.cc',
+ 'array/builder_dict.cc',
+ 'array/builder_run_end.cc',
+ 'array/builder_nested.cc',
+ 'array/builder_primitive.cc',
+ 'array/builder_union.cc',
+ 'array/concatenate.cc',
+ 'array/data.cc',
+ 'array/diff.cc',
+ 'array/statistics.cc',
+ 'array/util.cc',
+ 'array/validate.cc',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+ 'arrow_compute': {
+ 'sources': [
+ 'compute/api_aggregate.cc',
+ 'compute/api_scalar.cc',
+ 'compute/api_vector.cc',
+ 'compute/cast.cc',
+ 'compute/exec.cc',
+ 'compute/expression.cc',
+ 'compute/function.cc',
+ 'compute/function_internal.cc',
+ 'compute/kernel.cc',
+ 'compute/ordering.cc',
+ 'compute/registry.cc',
+ 'compute/kernels/chunked_internal.cc',
+ 'compute/kernels/codegen_internal.cc',
+ 'compute/kernels/ree_util_internal.cc',
+ 'compute/kernels/scalar_cast_boolean.cc',
+ 'compute/kernels/scalar_cast_dictionary.cc',
+ 'compute/kernels/scalar_cast_extension.cc',
+ 'compute/kernels/scalar_cast_internal.cc',
+ 'compute/kernels/scalar_cast_nested.cc',
+ 'compute/kernels/scalar_cast_numeric.cc',
+ 'compute/kernels/scalar_cast_string.cc',
+ 'compute/kernels/scalar_cast_temporal.cc',
+ 'compute/kernels/util_internal.cc',
+ 'compute/kernels/vector_hash.cc',
+ 'compute/kernels/vector_selection.cc',
+ 'compute/kernels/vector_selection_filter_internal.cc',
+ 'compute/kernels/vector_selection_internal.cc',
+ 'compute/kernels/vector_selection_take_internal.cc',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+ 'arrow_io': {
+ 'sources': [
+ 'io/buffered.cc',
+ 'io/caching.cc',
+ 'io/compressed.cc',
+ 'io/file.cc',
+ 'io/hdfs.cc',
+ 'io/hdfs_internal.cc',
+ 'io/interfaces.cc',
+ 'io/memory.cc',
+ 'io/slow.cc',
+ 'io/stdio.cc',
+ 'io/transform.cc',
+ ],
+ 'include_dirs': [include_directories('../../thirdparty/hadoop/include')],
+ 'dependencies': [dl_dep],
+ },
+ 'arrow_util': {
+ 'sources': [
+ 'util/align_util.cc',
+ 'util/async_util.cc',
+ 'util/atfork_internal.cc',
+ 'util/basic_decimal.cc',
+ 'util/bit_block_counter.cc',
+ 'util/bit_run_reader.cc',
+ 'util/bit_util.cc',
+ 'util/bitmap.cc',
+ 'util/bitmap_builders.cc',
+ 'util/bitmap_ops.cc',
+ 'util/bpacking.cc',
+ 'util/byte_size.cc',
+ 'util/cancel.cc',
+ 'util/compression.cc',
+ 'util/counting_semaphore.cc',
+ 'util/cpu_info.cc',
+ 'util/crc32.cc',
+ 'util/debug.cc',
+ 'util/decimal.cc',
+ 'util/delimiting.cc',
+ 'util/dict_util.cc',
+ 'util/fixed_width_internal.cc',
+ 'util/float16.cc',
+ 'util/formatting.cc',
+ 'util/future.cc',
+ 'util/hashing.cc',
+ 'util/int_util.cc',
+ 'util/io_util.cc',
+ 'util/list_util.cc',
+ 'util/logger.cc',
+ 'util/logging.cc',
+ 'util/key_value_metadata.cc',
+ 'util/memory.cc',
+ 'util/mutex.cc',
+ 'util/ree_util.cc',
+ 'util/string.cc',
+ 'util/string_builder.cc',
+ 'util/task_group.cc',
+ 'util/tdigest.cc',
+ 'util/thread_pool.cc',
+ 'util/time.cc',
+ 'util/tracing.cc',
+ 'util/trie.cc',
+ 'util/union_util.cc',
+ 'util/unreachable.cc',
+ 'util/uri.cc',
+ 'util/utf8.cc',
+ 'util/value_parsing.cc',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [threads_dep],
+ },
+ 'memory_pool': {
+ 'sources': ['memory_pool.cc'],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+ 'vendored': {
+ 'sources': [
+ 'vendored/base64.cpp',
+ 'vendored/datetime.cpp',
+ 'vendored/double-conversion/bignum-dtoa.cc',
+ 'vendored/double-conversion/bignum.cc',
+ 'vendored/double-conversion/cached-powers.cc',
+ 'vendored/double-conversion/double-to-string.cc',
+ 'vendored/double-conversion/fast-dtoa.cc',
+ 'vendored/double-conversion/fixed-dtoa.cc',
+ 'vendored/double-conversion/string-to-double.cc',
+ 'vendored/double-conversion/strtod.cc',
+ 'vendored/musl/strptime.c',
+ 'vendored/uriparser/UriCommon.c',
+ 'vendored/uriparser/UriCompare.c',
+ 'vendored/uriparser/UriEscape.c',
+ 'vendored/uriparser/UriFile.c',
+ 'vendored/uriparser/UriIp4.c',
+ 'vendored/uriparser/UriIp4Base.c',
+ 'vendored/uriparser/UriMemory.c',
+ 'vendored/uriparser/UriNormalize.c',
+ 'vendored/uriparser/UriNormalizeBase.c',
+ 'vendored/uriparser/UriParse.c',
+ 'vendored/uriparser/UriParseBase.c',
+ 'vendored/uriparser/UriQuery.c',
+ 'vendored/uriparser/UriRecompose.c',
+ 'vendored/uriparser/UriResolve.c',
+ 'vendored/uriparser/UriShorten.c',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+ 'arrow_base': {
+ 'sources': [
+ 'builder.cc',
+ 'buffer.cc',
+ 'chunked_array.cc',
+ 'chunk_resolver.cc',
+ 'compare.cc',
+ 'config.cc',
+ 'datum.cc',
+ 'device.cc',
+ 'device_allocation_type_set.cc',
+ 'extension_type.cc',
+ 'extension/bool8.cc',
+ 'extension/json.cc',
+ 'extension/uuid.cc',
+ 'pretty_print.cc',
+ 'record_batch.cc',
+ 'result.cc',
+ 'scalar.cc',
+ 'sparse_tensor.cc',
+ 'status.cc',
+ 'table.cc',
+ 'table_builder.cc',
+ 'tensor.cc',
+ 'tensor/coo_converter.cc',
+ 'tensor/csf_converter.cc',
+ 'tensor/csx_converter.cc',
+ 'type.cc',
+ 'type_traits.cc',
+ 'visitor.cc',
+ 'c/bridge.cc',
+ 'c/dlpack.cc',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+}
+
+arrow_srcs = []
+include_dir = include_directories('..')
+arrow_includes = [include_dir]
+arrow_deps = []
+foreach key, val : arrow_components
+ arrow_srcs += val['sources']
+ arrow_includes += val['include_dirs']
+ arrow_deps += val['dependencies']
+endforeach
+
+arrow_lib = library(
+ 'arrow',
+ sources: arrow_srcs,
+ include_directories: arrow_includes,
+ dependencies: arrow_deps,
+ install: true,
+)
+
+# Meson does not allow you to glob for headers to install. See also
+# https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard
+# install_subdir would be usable if the directory only contained headers
+install_headers(
+ [
+ 'api.h',
+ 'array.h',
+ 'buffer_builder.h',
+ 'buffer.h',
+ 'builder.h',
+ 'chunked_array.h',
+ 'chunk_resolver.h',
+ 'compare.h',
+ 'config.h',
+ 'datum.h',
+ 'device_allocation_type_set.h',
+ 'device.h',
+ 'extension_type.h',
+ 'memory_pool.h',
+ 'memory_pool_test.h',
+ 'pch.h',
Review Comment:
```suggestion
```
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,325 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+dl_dep = dependency('dl')
+threads_dep = dependency('threads')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+arrow_components = {
+ 'arrow_array': {
+ 'sources': [
+ 'array/array_base.cc',
+ 'array/array_binary.cc',
+ 'array/array_decimal.cc',
+ 'array/array_dict.cc',
+ 'array/array_nested.cc',
+ 'array/array_primitive.cc',
+ 'array/array_run_end.cc',
+ 'array/builder_adaptive.cc',
+ 'array/builder_base.cc',
+ 'array/builder_binary.cc',
+ 'array/builder_decimal.cc',
+ 'array/builder_dict.cc',
+ 'array/builder_run_end.cc',
+ 'array/builder_nested.cc',
+ 'array/builder_primitive.cc',
+ 'array/builder_union.cc',
+ 'array/concatenate.cc',
+ 'array/data.cc',
+ 'array/diff.cc',
+ 'array/statistics.cc',
+ 'array/util.cc',
+ 'array/validate.cc',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+ 'arrow_compute': {
+ 'sources': [
+ 'compute/api_aggregate.cc',
+ 'compute/api_scalar.cc',
+ 'compute/api_vector.cc',
+ 'compute/cast.cc',
+ 'compute/exec.cc',
+ 'compute/expression.cc',
+ 'compute/function.cc',
+ 'compute/function_internal.cc',
+ 'compute/kernel.cc',
+ 'compute/ordering.cc',
+ 'compute/registry.cc',
+ 'compute/kernels/chunked_internal.cc',
+ 'compute/kernels/codegen_internal.cc',
+ 'compute/kernels/ree_util_internal.cc',
+ 'compute/kernels/scalar_cast_boolean.cc',
+ 'compute/kernels/scalar_cast_dictionary.cc',
+ 'compute/kernels/scalar_cast_extension.cc',
+ 'compute/kernels/scalar_cast_internal.cc',
+ 'compute/kernels/scalar_cast_nested.cc',
+ 'compute/kernels/scalar_cast_numeric.cc',
+ 'compute/kernels/scalar_cast_string.cc',
+ 'compute/kernels/scalar_cast_temporal.cc',
+ 'compute/kernels/util_internal.cc',
+ 'compute/kernels/vector_hash.cc',
+ 'compute/kernels/vector_selection.cc',
+ 'compute/kernels/vector_selection_filter_internal.cc',
+ 'compute/kernels/vector_selection_internal.cc',
+ 'compute/kernels/vector_selection_take_internal.cc',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+ 'arrow_io': {
+ 'sources': [
+ 'io/buffered.cc',
+ 'io/caching.cc',
+ 'io/compressed.cc',
+ 'io/file.cc',
+ 'io/hdfs.cc',
+ 'io/hdfs_internal.cc',
+ 'io/interfaces.cc',
+ 'io/memory.cc',
+ 'io/slow.cc',
+ 'io/stdio.cc',
+ 'io/transform.cc',
+ ],
+ 'include_dirs': [include_directories('../../thirdparty/hadoop/include')],
+ 'dependencies': [dl_dep],
+ },
+ 'arrow_util': {
+ 'sources': [
+ 'util/align_util.cc',
+ 'util/async_util.cc',
+ 'util/atfork_internal.cc',
+ 'util/basic_decimal.cc',
+ 'util/bit_block_counter.cc',
+ 'util/bit_run_reader.cc',
+ 'util/bit_util.cc',
+ 'util/bitmap.cc',
+ 'util/bitmap_builders.cc',
+ 'util/bitmap_ops.cc',
+ 'util/bpacking.cc',
+ 'util/byte_size.cc',
+ 'util/cancel.cc',
+ 'util/compression.cc',
+ 'util/counting_semaphore.cc',
+ 'util/cpu_info.cc',
+ 'util/crc32.cc',
+ 'util/debug.cc',
+ 'util/decimal.cc',
+ 'util/delimiting.cc',
+ 'util/dict_util.cc',
+ 'util/fixed_width_internal.cc',
+ 'util/float16.cc',
+ 'util/formatting.cc',
+ 'util/future.cc',
+ 'util/hashing.cc',
+ 'util/int_util.cc',
+ 'util/io_util.cc',
+ 'util/list_util.cc',
+ 'util/logger.cc',
+ 'util/logging.cc',
+ 'util/key_value_metadata.cc',
+ 'util/memory.cc',
+ 'util/mutex.cc',
+ 'util/ree_util.cc',
+ 'util/string.cc',
+ 'util/string_builder.cc',
+ 'util/task_group.cc',
+ 'util/tdigest.cc',
+ 'util/thread_pool.cc',
+ 'util/time.cc',
+ 'util/tracing.cc',
+ 'util/trie.cc',
+ 'util/union_util.cc',
+ 'util/unreachable.cc',
+ 'util/uri.cc',
+ 'util/utf8.cc',
+ 'util/value_parsing.cc',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [threads_dep],
+ },
+ 'memory_pool': {
+ 'sources': ['memory_pool.cc'],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+ 'vendored': {
+ 'sources': [
+ 'vendored/base64.cpp',
+ 'vendored/datetime.cpp',
+ 'vendored/double-conversion/bignum-dtoa.cc',
+ 'vendored/double-conversion/bignum.cc',
+ 'vendored/double-conversion/cached-powers.cc',
+ 'vendored/double-conversion/double-to-string.cc',
+ 'vendored/double-conversion/fast-dtoa.cc',
+ 'vendored/double-conversion/fixed-dtoa.cc',
+ 'vendored/double-conversion/string-to-double.cc',
+ 'vendored/double-conversion/strtod.cc',
+ 'vendored/musl/strptime.c',
+ 'vendored/uriparser/UriCommon.c',
+ 'vendored/uriparser/UriCompare.c',
+ 'vendored/uriparser/UriEscape.c',
+ 'vendored/uriparser/UriFile.c',
+ 'vendored/uriparser/UriIp4.c',
+ 'vendored/uriparser/UriIp4Base.c',
+ 'vendored/uriparser/UriMemory.c',
+ 'vendored/uriparser/UriNormalize.c',
+ 'vendored/uriparser/UriNormalizeBase.c',
+ 'vendored/uriparser/UriParse.c',
+ 'vendored/uriparser/UriParseBase.c',
+ 'vendored/uriparser/UriQuery.c',
+ 'vendored/uriparser/UriRecompose.c',
+ 'vendored/uriparser/UriResolve.c',
+ 'vendored/uriparser/UriShorten.c',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+ 'arrow_base': {
+ 'sources': [
+ 'builder.cc',
+ 'buffer.cc',
+ 'chunked_array.cc',
+ 'chunk_resolver.cc',
+ 'compare.cc',
+ 'config.cc',
+ 'datum.cc',
+ 'device.cc',
+ 'device_allocation_type_set.cc',
+ 'extension_type.cc',
+ 'extension/bool8.cc',
+ 'extension/json.cc',
+ 'extension/uuid.cc',
+ 'pretty_print.cc',
+ 'record_batch.cc',
+ 'result.cc',
+ 'scalar.cc',
+ 'sparse_tensor.cc',
+ 'status.cc',
+ 'table.cc',
+ 'table_builder.cc',
+ 'tensor.cc',
+ 'tensor/coo_converter.cc',
+ 'tensor/csf_converter.cc',
+ 'tensor/csx_converter.cc',
+ 'type.cc',
+ 'type_traits.cc',
+ 'visitor.cc',
+ 'c/bridge.cc',
+ 'c/dlpack.cc',
+ ],
+ 'include_dirs': [],
+ 'dependencies': [],
+ },
+}
+
+arrow_srcs = []
+include_dir = include_directories('..')
+arrow_includes = [include_dir]
+arrow_deps = []
+foreach key, val : arrow_components
+ arrow_srcs += val['sources']
+ arrow_includes += val['include_dirs']
+ arrow_deps += val['dependencies']
+endforeach
+
+arrow_lib = library(
+ 'arrow',
+ sources: arrow_srcs,
+ include_directories: arrow_includes,
+ dependencies: arrow_deps,
+ install: true,
+)
+
+# Meson does not allow you to glob for headers to install. See also
+# https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard
+# install_subdir would be usable if the directory only contained headers
+install_headers(
+ [
+ 'api.h',
+ 'array.h',
+ 'buffer_builder.h',
+ 'buffer.h',
+ 'builder.h',
+ 'chunked_array.h',
+ 'chunk_resolver.h',
+ 'compare.h',
+ 'config.h',
+ 'datum.h',
+ 'device_allocation_type_set.h',
+ 'device.h',
+ 'extension_type.h',
+ 'memory_pool.h',
+ 'memory_pool_test.h',
Review Comment:
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on code in PR #45441:
URL: https://github.com/apache/arrow/pull/45441#discussion_r1953624571
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
Review Comment:
Makes sense. I've still kept the top level dict for parity with CMake, and since some of the sources vary depending on compilation options (like arrow compute). Let me know if this is more in line with what you are thinking
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Add Minimal Meson Build of libarrow [arrow]
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2667960082
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit c7a91000a454303bcf860c629fa6a4d041a8fbad.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/37453960667) has more details. It also includes information about 6 possible false positives for unstable benchmarks that are known to sometimes produce them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #45441:
URL: https://github.com/apache/arrow/pull/45441#discussion_r1953606697
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
Review Comment:
(We don't need objlib feature entirely with Meson.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2661769363
@github-actions crossbow submit test-conda-cpp-meson
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Add Minimal Meson Build of libarrow to CI [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2664442452
Revision: 428c2f32c1addb36d626a8ff8678e0ed94d15acb
Submitted crossbow builds: [ursacomputing/crossbow @ actions-3c4e1b441c](https://github.com/ursacomputing/crossbow/branches/all?query=actions-3c4e1b441c)
|Task|Status|
|----|------|
|test-conda-cpp-meson|[](https://github.com/ursacomputing/crossbow/actions/runs/13381744109/job/37371349980)|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Add Minimal Meson Build of libarrow [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou merged PR #45441:
URL: https://github.com/apache/arrow/pull/45441
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2641723260
Yes. Only minimal `libarrow` (e.g. no compute, no filesystem and so on) is the right starting point.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Add Minimal Meson Build of libarrow to CI [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2664439764
@github-actions crossbow submit test-conda-cpp-meson
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Add Minimal Meson Build of libarrow to CI [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2664463839
Do you mean the commit message? I can squash up and change that if so. On Github I've already change the PR title
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Add Minimal Meson Build of libarrow to CI [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #45441:
URL: https://github.com/apache/arrow/pull/45441#discussion_r1958958437
##########
ci/scripts/cpp_test.sh:
##########
@@ -89,14 +89,21 @@ pushd ${build_dir}
if [ -z "${PYTHON}" ] && ! which python > /dev/null 2>&1; then
export PYTHON="${PYTHON:-python3}"
fi
-ctest \
+if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
+ ARROW_BUILD_EXAMPLES=OFF # TODO: Remove this
+ meson test \
+ --print-errorlogs \
+ "$@"
Review Comment:
Right. We'll add tests later.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Add Minimal Meson Build of libarrow to CI [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2665970502
Ah got it - I've updated the OP
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2640353075
Sure I can strip down further. So do think just something that builds libarrow is the right starting point?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on code in PR #45441:
URL: https://github.com/apache/arrow/pull/45441#discussion_r1951605163
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
+ 'arrow_array': {
+ 'sources': [
+ 'array/array_base.cc',
+ 'array/array_binary.cc',
+ 'array/array_decimal.cc',
+ 'array/array_dict.cc',
+ 'array/array_nested.cc',
+ 'array/array_primitive.cc',
+ 'array/array_run_end.cc',
+ 'array/builder_adaptive.cc',
+ 'array/builder_base.cc',
+ 'array/builder_binary.cc',
+ 'array/builder_decimal.cc',
+ 'array/builder_dict.cc',
+ 'array/builder_run_end.cc',
+ 'array/builder_nested.cc',
+ 'array/builder_primitive.cc',
+ 'array/builder_union.cc',
+ 'array/concatenate.cc',
+ 'array/data.cc',
+ 'array/diff.cc',
+ 'array/statistics.cc',
+ 'array/util.cc',
+ 'array/validate.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_compute': {
+ 'sources': [
+ 'compute/api_aggregate.cc',
+ 'compute/api_scalar.cc',
+ 'compute/api_vector.cc',
+ 'compute/cast.cc',
+ 'compute/exec.cc',
+ 'compute/expression.cc',
+ 'compute/function.cc',
+ 'compute/function_internal.cc',
+ 'compute/kernel.cc',
+ 'compute/ordering.cc',
+ 'compute/registry.cc',
+ 'compute/kernels/chunked_internal.cc',
+ 'compute/kernels/codegen_internal.cc',
+ 'compute/kernels/ree_util_internal.cc',
+ 'compute/kernels/scalar_cast_boolean.cc',
+ 'compute/kernels/scalar_cast_dictionary.cc',
+ 'compute/kernels/scalar_cast_extension.cc',
+ 'compute/kernels/scalar_cast_internal.cc',
+ 'compute/kernels/scalar_cast_nested.cc',
+ 'compute/kernels/scalar_cast_numeric.cc',
+ 'compute/kernels/scalar_cast_string.cc',
+ 'compute/kernels/scalar_cast_temporal.cc',
+ 'compute/kernels/util_internal.cc',
+ 'compute/kernels/vector_hash.cc',
+ 'compute/kernels/vector_selection.cc',
+ 'compute/kernels/vector_selection_filter_internal.cc',
+ 'compute/kernels/vector_selection_internal.cc',
+ 'compute/kernels/vector_selection_take_internal.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_io': {
+ 'sources': [
+ 'io/buffered.cc',
+ 'io/caching.cc',
+ 'io/compressed.cc',
+ 'io/file.cc',
+ 'io/hdfs.cc',
+ 'io/hdfs_internal.cc',
+ 'io/interfaces.cc',
+ 'io/memory.cc',
+ 'io/slow.cc',
+ 'io/stdio.cc',
+ 'io/transform.cc',
+ ],
+ 'include_dirs': [
+ include_dir,
+ include_directories('../../thirdparty/hadoop/include'),
+ ],
+ 'dependencies': [dl_dep],
+ },
+ 'arrow_util': {
+ 'sources': [
+ 'util/align_util.cc',
+ 'util/async_util.cc',
+ 'util/atfork_internal.cc',
+ 'util/basic_decimal.cc',
+ 'util/bit_block_counter.cc',
+ 'util/bit_run_reader.cc',
+ 'util/bit_util.cc',
+ 'util/bitmap.cc',
+ 'util/bitmap_builders.cc',
+ 'util/bitmap_ops.cc',
+ 'util/bpacking.cc',
+ 'util/byte_size.cc',
+ 'util/cancel.cc',
+ 'util/compression.cc',
+ 'util/counting_semaphore.cc',
+ 'util/cpu_info.cc',
+ 'util/crc32.cc',
+ 'util/debug.cc',
+ 'util/decimal.cc',
+ 'util/delimiting.cc',
+ 'util/dict_util.cc',
+ 'util/fixed_width_internal.cc',
+ 'util/float16.cc',
+ 'util/formatting.cc',
+ 'util/future.cc',
+ 'util/hashing.cc',
+ 'util/int_util.cc',
+ 'util/io_util.cc',
+ 'util/list_util.cc',
+ 'util/logger.cc',
+ 'util/logging.cc',
+ 'util/key_value_metadata.cc',
+ 'util/memory.cc',
+ 'util/mutex.cc',
+ 'util/ree_util.cc',
+ 'util/string.cc',
+ 'util/string_builder.cc',
+ 'util/task_group.cc',
+ 'util/tdigest.cc',
+ 'util/thread_pool.cc',
+ 'util/time.cc',
+ 'util/tracing.cc',
+ 'util/trie.cc',
+ 'util/union_util.cc',
+ 'util/unreachable.cc',
+ 'util/uri.cc',
+ 'util/utf8.cc',
+ 'util/value_parsing.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'memory_pool': {
+ 'sources': ['memory_pool.cc'],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'vendored': {
+ 'sources': [
+ 'vendored/base64.cpp',
+ 'vendored/datetime.cpp',
+ 'vendored/double-conversion/bignum-dtoa.cc',
+ 'vendored/double-conversion/bignum.cc',
+ 'vendored/double-conversion/cached-powers.cc',
+ 'vendored/double-conversion/double-to-string.cc',
+ 'vendored/double-conversion/fast-dtoa.cc',
+ 'vendored/double-conversion/fixed-dtoa.cc',
+ 'vendored/double-conversion/string-to-double.cc',
+ 'vendored/double-conversion/strtod.cc',
+ 'vendored/musl/strptime.c',
+ 'vendored/uriparser/UriCommon.c',
+ 'vendored/uriparser/UriCompare.c',
+ 'vendored/uriparser/UriEscape.c',
+ 'vendored/uriparser/UriFile.c',
+ 'vendored/uriparser/UriIp4.c',
+ 'vendored/uriparser/UriIp4Base.c',
+ 'vendored/uriparser/UriMemory.c',
+ 'vendored/uriparser/UriNormalize.c',
+ 'vendored/uriparser/UriNormalizeBase.c',
+ 'vendored/uriparser/UriParse.c',
+ 'vendored/uriparser/UriParseBase.c',
+ 'vendored/uriparser/UriQuery.c',
+ 'vendored/uriparser/UriRecompose.c',
+ 'vendored/uriparser/UriResolve.c',
+ 'vendored/uriparser/UriShorten.c',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+}
+
+objlibs = []
+foreach key, val : objlib_sources
+ slib = static_library(
+ key,
+ sources: val['sources'],
+ include_directories: val['include_dirs'],
+ dependencies: val['dependencies'],
+ build_by_default: false,
+ )
+ objlibs += slib.extract_all_objects(recursive: true)
+endforeach
+
+arrow_srcs = [
+ 'builder.cc',
+ 'buffer.cc',
+ 'chunked_array.cc',
+ 'chunk_resolver.cc',
+ 'compare.cc',
+ 'config.cc',
+ 'datum.cc',
+ 'device.cc',
+ 'device_allocation_type_set.cc',
+ 'extension_type.cc',
+ 'extension/bool8.cc',
+ 'extension/json.cc',
+ 'extension/uuid.cc',
+ 'pretty_print.cc',
+ 'record_batch.cc',
+ 'result.cc',
+ 'scalar.cc',
+ 'sparse_tensor.cc',
+ 'status.cc',
+ 'table.cc',
+ 'table_builder.cc',
+ 'tensor.cc',
+ 'tensor/coo_converter.cc',
+ 'tensor/csf_converter.cc',
+ 'tensor/csx_converter.cc',
+ 'type.cc',
+ 'type_traits.cc',
+ 'visitor.cc',
+ 'c/bridge.cc',
+ 'c/dlpack.cc',
+]
+
+arrow_lib = library(
+ 'arrow',
+ sources: [arrow_srcs],
+ objects: objlibs,
+ include_directories: [include_dir],
+ install: true,
+ # compute/expression.cc may have undefined IPC symbols in non-IPC builds
Review Comment:
Wasn't sure if this was intentional or not in the existing code base
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
+ 'arrow_array': {
+ 'sources': [
+ 'array/array_base.cc',
+ 'array/array_binary.cc',
+ 'array/array_decimal.cc',
+ 'array/array_dict.cc',
+ 'array/array_nested.cc',
+ 'array/array_primitive.cc',
+ 'array/array_run_end.cc',
+ 'array/builder_adaptive.cc',
+ 'array/builder_base.cc',
+ 'array/builder_binary.cc',
+ 'array/builder_decimal.cc',
+ 'array/builder_dict.cc',
+ 'array/builder_run_end.cc',
+ 'array/builder_nested.cc',
+ 'array/builder_primitive.cc',
+ 'array/builder_union.cc',
+ 'array/concatenate.cc',
+ 'array/data.cc',
+ 'array/diff.cc',
+ 'array/statistics.cc',
+ 'array/util.cc',
+ 'array/validate.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_compute': {
+ 'sources': [
+ 'compute/api_aggregate.cc',
+ 'compute/api_scalar.cc',
+ 'compute/api_vector.cc',
+ 'compute/cast.cc',
+ 'compute/exec.cc',
+ 'compute/expression.cc',
+ 'compute/function.cc',
+ 'compute/function_internal.cc',
+ 'compute/kernel.cc',
+ 'compute/ordering.cc',
+ 'compute/registry.cc',
+ 'compute/kernels/chunked_internal.cc',
+ 'compute/kernels/codegen_internal.cc',
+ 'compute/kernels/ree_util_internal.cc',
+ 'compute/kernels/scalar_cast_boolean.cc',
+ 'compute/kernels/scalar_cast_dictionary.cc',
+ 'compute/kernels/scalar_cast_extension.cc',
+ 'compute/kernels/scalar_cast_internal.cc',
+ 'compute/kernels/scalar_cast_nested.cc',
+ 'compute/kernels/scalar_cast_numeric.cc',
+ 'compute/kernels/scalar_cast_string.cc',
+ 'compute/kernels/scalar_cast_temporal.cc',
+ 'compute/kernels/util_internal.cc',
+ 'compute/kernels/vector_hash.cc',
+ 'compute/kernels/vector_selection.cc',
+ 'compute/kernels/vector_selection_filter_internal.cc',
+ 'compute/kernels/vector_selection_internal.cc',
+ 'compute/kernels/vector_selection_take_internal.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_io': {
+ 'sources': [
+ 'io/buffered.cc',
+ 'io/caching.cc',
+ 'io/compressed.cc',
+ 'io/file.cc',
+ 'io/hdfs.cc',
+ 'io/hdfs_internal.cc',
+ 'io/interfaces.cc',
+ 'io/memory.cc',
+ 'io/slow.cc',
+ 'io/stdio.cc',
+ 'io/transform.cc',
+ ],
+ 'include_dirs': [
+ include_dir,
+ include_directories('../../thirdparty/hadoop/include'),
+ ],
+ 'dependencies': [dl_dep],
+ },
+ 'arrow_util': {
+ 'sources': [
+ 'util/align_util.cc',
+ 'util/async_util.cc',
+ 'util/atfork_internal.cc',
+ 'util/basic_decimal.cc',
+ 'util/bit_block_counter.cc',
+ 'util/bit_run_reader.cc',
+ 'util/bit_util.cc',
+ 'util/bitmap.cc',
+ 'util/bitmap_builders.cc',
+ 'util/bitmap_ops.cc',
+ 'util/bpacking.cc',
+ 'util/byte_size.cc',
+ 'util/cancel.cc',
+ 'util/compression.cc',
+ 'util/counting_semaphore.cc',
+ 'util/cpu_info.cc',
+ 'util/crc32.cc',
+ 'util/debug.cc',
+ 'util/decimal.cc',
+ 'util/delimiting.cc',
+ 'util/dict_util.cc',
+ 'util/fixed_width_internal.cc',
+ 'util/float16.cc',
+ 'util/formatting.cc',
+ 'util/future.cc',
+ 'util/hashing.cc',
+ 'util/int_util.cc',
+ 'util/io_util.cc',
+ 'util/list_util.cc',
+ 'util/logger.cc',
+ 'util/logging.cc',
+ 'util/key_value_metadata.cc',
+ 'util/memory.cc',
+ 'util/mutex.cc',
+ 'util/ree_util.cc',
+ 'util/string.cc',
+ 'util/string_builder.cc',
+ 'util/task_group.cc',
+ 'util/tdigest.cc',
+ 'util/thread_pool.cc',
+ 'util/time.cc',
+ 'util/tracing.cc',
+ 'util/trie.cc',
+ 'util/union_util.cc',
+ 'util/unreachable.cc',
+ 'util/uri.cc',
+ 'util/utf8.cc',
+ 'util/value_parsing.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'memory_pool': {
+ 'sources': ['memory_pool.cc'],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'vendored': {
+ 'sources': [
+ 'vendored/base64.cpp',
+ 'vendored/datetime.cpp',
+ 'vendored/double-conversion/bignum-dtoa.cc',
+ 'vendored/double-conversion/bignum.cc',
+ 'vendored/double-conversion/cached-powers.cc',
+ 'vendored/double-conversion/double-to-string.cc',
+ 'vendored/double-conversion/fast-dtoa.cc',
+ 'vendored/double-conversion/fixed-dtoa.cc',
+ 'vendored/double-conversion/string-to-double.cc',
+ 'vendored/double-conversion/strtod.cc',
+ 'vendored/musl/strptime.c',
+ 'vendored/uriparser/UriCommon.c',
+ 'vendored/uriparser/UriCompare.c',
+ 'vendored/uriparser/UriEscape.c',
+ 'vendored/uriparser/UriFile.c',
+ 'vendored/uriparser/UriIp4.c',
+ 'vendored/uriparser/UriIp4Base.c',
+ 'vendored/uriparser/UriMemory.c',
+ 'vendored/uriparser/UriNormalize.c',
+ 'vendored/uriparser/UriNormalizeBase.c',
+ 'vendored/uriparser/UriParse.c',
+ 'vendored/uriparser/UriParseBase.c',
+ 'vendored/uriparser/UriQuery.c',
+ 'vendored/uriparser/UriRecompose.c',
+ 'vendored/uriparser/UriResolve.c',
+ 'vendored/uriparser/UriShorten.c',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+}
+
+objlibs = []
+foreach key, val : objlib_sources
+ slib = static_library(
+ key,
+ sources: val['sources'],
+ include_directories: val['include_dirs'],
+ dependencies: val['dependencies'],
+ build_by_default: false,
+ )
+ objlibs += slib.extract_all_objects(recursive: true)
+endforeach
+
+arrow_srcs = [
+ 'builder.cc',
+ 'buffer.cc',
+ 'chunked_array.cc',
+ 'chunk_resolver.cc',
+ 'compare.cc',
+ 'config.cc',
+ 'datum.cc',
+ 'device.cc',
+ 'device_allocation_type_set.cc',
+ 'extension_type.cc',
+ 'extension/bool8.cc',
+ 'extension/json.cc',
+ 'extension/uuid.cc',
+ 'pretty_print.cc',
+ 'record_batch.cc',
+ 'result.cc',
+ 'scalar.cc',
+ 'sparse_tensor.cc',
+ 'status.cc',
+ 'table.cc',
+ 'table_builder.cc',
+ 'tensor.cc',
+ 'tensor/coo_converter.cc',
+ 'tensor/csf_converter.cc',
+ 'tensor/csx_converter.cc',
+ 'type.cc',
+ 'type_traits.cc',
+ 'visitor.cc',
+ 'c/bridge.cc',
+ 'c/dlpack.cc',
+]
+
+arrow_lib = library(
+ 'arrow',
+ sources: [arrow_srcs],
+ objects: objlibs,
+ include_directories: [include_dir],
+ install: true,
+ # compute/expression.cc may have undefined IPC symbols in non-IPC builds
+ override_options: {'b_lundef': 'false'},
+)
+
+# Meson does not allow you to glob for headers to install. See also
+# https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard
+# install_subdir would be usable if the directory only contained headers
+install_headers(
+ [
+ 'api.h',
+ 'array.h',
+ 'buffer_builder.h',
+ 'buffer.h',
+ 'builder.h',
+ 'chunked_array.h',
+ 'chunk_resolver.h',
+ 'compare.h',
+ 'config.h',
+ 'datum.h',
+ 'device_allocation_type_set.h',
+ 'device.h',
+ 'extension_type.h',
+ 'memory_pool.h',
+ 'memory_pool_test.h',
+ 'pch.h',
+ 'pretty_print.h',
+ 'record_batch.h',
+ 'result.h',
+ 'scalar.h',
+ 'sparse_tensor.h',
+ 'status.h',
+ 'stl_allocator.h',
+ 'stl.h',
+ 'stl_iterator.h',
+ 'table_builder.h',
+ 'table.h',
+ 'tensor.h',
+ 'type_fwd.h',
+ 'type.h',
+ 'type_traits.h',
+ 'visit_array_inline.h',
+ 'visit_data_inline.h',
+ 'visitor_generate.h',
+ 'visitor.h',
+ 'visit_scalar_inline.h',
+ 'visit_type_inline.h',
+ ],
+ install_dir: 'arrow',
+)
+
+version = meson.project_version()
+# Remove any pre-release / build identifiers
+version_no_pre_release = version.split('-')[0]
+version_no_build = version_no_pre_release.split('+')[0]
+components = version_no_build.split('.')
+assert(
+ components.length() >= 3,
+ 'The version does not contain major, minor and patch',
+)
+ver_major = components[0]
+ver_minor = components[1]
+ver_patch = components[2]
+
+arrow_version = ver_major.to_int() * 1000 + ver_minor.to_int() * 1000 + ver_patch.to_int()
+arrow_so_version = (ver_major.to_int() * 100 + ver_minor.to_int()).to_string()
+arrow_full_so_version = '@0@.@1@.@2@'.format(arrow_so_version, ver_patch, 0)
+
+# TODO: The Meson generated .pc file does not include the Apache license
Review Comment:
I did not research this in too much detail yet; figured I'd check if it was a big deal before investing time into a resolution
##########
cpp/src/arrow/util/meson.build:
##########
@@ -0,0 +1,103 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+conf_data = configuration_data()
+
+conf_data.set('ARROW_VERSION_MAJOR', ver_major)
+conf_data.set('ARROW_VERSION_MINOR', ver_minor)
+conf_data.set('ARROW_VERSION_PATCH', ver_patch)
+
+conf_data.set('ARROW_VERSION', arrow_version)
+conf_data.set('ARROW_VERSION_STRING', arrow_version)
+
+conf_data.set('ARROW_SO_VERSION', arrow_so_version)
+conf_data.set('ARROW_FULL_SO_VERSION', arrow_full_so_version)
+
+# TODO: we may want to give Meson its own configuration file rather
Review Comment:
Instead of reusing the `config.h.cmake` file we would create one with directives specifically for Meson. That might make things slightly easier on the Meson side, although I'm not sure it is worth it to have two different config files
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
+ 'arrow_array': {
+ 'sources': [
+ 'array/array_base.cc',
+ 'array/array_binary.cc',
+ 'array/array_decimal.cc',
+ 'array/array_dict.cc',
+ 'array/array_nested.cc',
+ 'array/array_primitive.cc',
+ 'array/array_run_end.cc',
+ 'array/builder_adaptive.cc',
+ 'array/builder_base.cc',
+ 'array/builder_binary.cc',
+ 'array/builder_decimal.cc',
+ 'array/builder_dict.cc',
+ 'array/builder_run_end.cc',
+ 'array/builder_nested.cc',
+ 'array/builder_primitive.cc',
+ 'array/builder_union.cc',
+ 'array/concatenate.cc',
+ 'array/data.cc',
+ 'array/diff.cc',
+ 'array/statistics.cc',
+ 'array/util.cc',
+ 'array/validate.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_compute': {
+ 'sources': [
+ 'compute/api_aggregate.cc',
+ 'compute/api_scalar.cc',
+ 'compute/api_vector.cc',
+ 'compute/cast.cc',
+ 'compute/exec.cc',
+ 'compute/expression.cc',
+ 'compute/function.cc',
+ 'compute/function_internal.cc',
+ 'compute/kernel.cc',
+ 'compute/ordering.cc',
+ 'compute/registry.cc',
+ 'compute/kernels/chunked_internal.cc',
+ 'compute/kernels/codegen_internal.cc',
+ 'compute/kernels/ree_util_internal.cc',
+ 'compute/kernels/scalar_cast_boolean.cc',
+ 'compute/kernels/scalar_cast_dictionary.cc',
+ 'compute/kernels/scalar_cast_extension.cc',
+ 'compute/kernels/scalar_cast_internal.cc',
+ 'compute/kernels/scalar_cast_nested.cc',
+ 'compute/kernels/scalar_cast_numeric.cc',
+ 'compute/kernels/scalar_cast_string.cc',
+ 'compute/kernels/scalar_cast_temporal.cc',
+ 'compute/kernels/util_internal.cc',
+ 'compute/kernels/vector_hash.cc',
+ 'compute/kernels/vector_selection.cc',
+ 'compute/kernels/vector_selection_filter_internal.cc',
+ 'compute/kernels/vector_selection_internal.cc',
+ 'compute/kernels/vector_selection_take_internal.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_io': {
+ 'sources': [
+ 'io/buffered.cc',
+ 'io/caching.cc',
+ 'io/compressed.cc',
+ 'io/file.cc',
+ 'io/hdfs.cc',
+ 'io/hdfs_internal.cc',
+ 'io/interfaces.cc',
+ 'io/memory.cc',
+ 'io/slow.cc',
+ 'io/stdio.cc',
+ 'io/transform.cc',
+ ],
+ 'include_dirs': [
+ include_dir,
+ include_directories('../../thirdparty/hadoop/include'),
+ ],
+ 'dependencies': [dl_dep],
+ },
+ 'arrow_util': {
+ 'sources': [
+ 'util/align_util.cc',
+ 'util/async_util.cc',
+ 'util/atfork_internal.cc',
+ 'util/basic_decimal.cc',
+ 'util/bit_block_counter.cc',
+ 'util/bit_run_reader.cc',
+ 'util/bit_util.cc',
+ 'util/bitmap.cc',
+ 'util/bitmap_builders.cc',
+ 'util/bitmap_ops.cc',
+ 'util/bpacking.cc',
+ 'util/byte_size.cc',
+ 'util/cancel.cc',
+ 'util/compression.cc',
+ 'util/counting_semaphore.cc',
+ 'util/cpu_info.cc',
+ 'util/crc32.cc',
+ 'util/debug.cc',
+ 'util/decimal.cc',
+ 'util/delimiting.cc',
+ 'util/dict_util.cc',
+ 'util/fixed_width_internal.cc',
+ 'util/float16.cc',
+ 'util/formatting.cc',
+ 'util/future.cc',
+ 'util/hashing.cc',
+ 'util/int_util.cc',
+ 'util/io_util.cc',
+ 'util/list_util.cc',
+ 'util/logger.cc',
+ 'util/logging.cc',
+ 'util/key_value_metadata.cc',
+ 'util/memory.cc',
+ 'util/mutex.cc',
+ 'util/ree_util.cc',
+ 'util/string.cc',
+ 'util/string_builder.cc',
+ 'util/task_group.cc',
+ 'util/tdigest.cc',
+ 'util/thread_pool.cc',
+ 'util/time.cc',
+ 'util/tracing.cc',
+ 'util/trie.cc',
+ 'util/union_util.cc',
+ 'util/unreachable.cc',
+ 'util/uri.cc',
+ 'util/utf8.cc',
+ 'util/value_parsing.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'memory_pool': {
+ 'sources': ['memory_pool.cc'],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'vendored': {
+ 'sources': [
+ 'vendored/base64.cpp',
+ 'vendored/datetime.cpp',
+ 'vendored/double-conversion/bignum-dtoa.cc',
+ 'vendored/double-conversion/bignum.cc',
+ 'vendored/double-conversion/cached-powers.cc',
+ 'vendored/double-conversion/double-to-string.cc',
+ 'vendored/double-conversion/fast-dtoa.cc',
+ 'vendored/double-conversion/fixed-dtoa.cc',
+ 'vendored/double-conversion/string-to-double.cc',
+ 'vendored/double-conversion/strtod.cc',
+ 'vendored/musl/strptime.c',
+ 'vendored/uriparser/UriCommon.c',
+ 'vendored/uriparser/UriCompare.c',
+ 'vendored/uriparser/UriEscape.c',
+ 'vendored/uriparser/UriFile.c',
+ 'vendored/uriparser/UriIp4.c',
+ 'vendored/uriparser/UriIp4Base.c',
+ 'vendored/uriparser/UriMemory.c',
+ 'vendored/uriparser/UriNormalize.c',
+ 'vendored/uriparser/UriNormalizeBase.c',
+ 'vendored/uriparser/UriParse.c',
+ 'vendored/uriparser/UriParseBase.c',
+ 'vendored/uriparser/UriQuery.c',
+ 'vendored/uriparser/UriRecompose.c',
+ 'vendored/uriparser/UriResolve.c',
+ 'vendored/uriparser/UriShorten.c',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+}
+
+objlibs = []
+foreach key, val : objlib_sources
+ slib = static_library(
+ key,
+ sources: val['sources'],
+ include_directories: val['include_dirs'],
+ dependencies: val['dependencies'],
+ build_by_default: false,
+ )
+ objlibs += slib.extract_all_objects(recursive: true)
+endforeach
+
+arrow_srcs = [
+ 'builder.cc',
+ 'buffer.cc',
+ 'chunked_array.cc',
+ 'chunk_resolver.cc',
+ 'compare.cc',
+ 'config.cc',
+ 'datum.cc',
+ 'device.cc',
+ 'device_allocation_type_set.cc',
+ 'extension_type.cc',
+ 'extension/bool8.cc',
+ 'extension/json.cc',
+ 'extension/uuid.cc',
+ 'pretty_print.cc',
+ 'record_batch.cc',
+ 'result.cc',
+ 'scalar.cc',
+ 'sparse_tensor.cc',
+ 'status.cc',
+ 'table.cc',
+ 'table_builder.cc',
+ 'tensor.cc',
+ 'tensor/coo_converter.cc',
+ 'tensor/csf_converter.cc',
+ 'tensor/csx_converter.cc',
+ 'type.cc',
+ 'type_traits.cc',
+ 'visitor.cc',
+ 'c/bridge.cc',
+ 'c/dlpack.cc',
+]
+
+arrow_lib = library(
+ 'arrow',
+ sources: [arrow_srcs],
+ objects: objlibs,
+ include_directories: [include_dir],
+ install: true,
+ # compute/expression.cc may have undefined IPC symbols in non-IPC builds
+ override_options: {'b_lundef': 'false'},
+)
+
+# Meson does not allow you to glob for headers to install. See also
Review Comment:
Meson is pretty strict about wildcards for the reasons outlined in their FAQ. Idiomatically, Meson would want you to put the files you want to install in a separate directory and call `install_subdir`, but that would go beyond the scope of this initial PR I think
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on code in PR #45441:
URL: https://github.com/apache/arrow/pull/45441#discussion_r1957870289
##########
ci/scripts/cpp_test.sh:
##########
@@ -89,14 +89,21 @@ pushd ${build_dir}
if [ -z "${PYTHON}" ] && ! which python > /dev/null 2>&1; then
export PYTHON="${PYTHON:-python3}"
fi
-ctest \
+if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
+ ARROW_BUILD_EXAMPLES=OFF # TODO: Remove this
+ meson test \
+ --print-errorlogs \
+ "$@"
Review Comment:
We aren't building any tests now, are we? On the current CI:
```
+ meson test --print-errorlogs
No tests defined.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2661771094
Revision: 564df5f3735c0080252114b54b82ff4cd4e0a270
Submitted crossbow builds: [ursacomputing/crossbow @ actions-527e5649ae](https://github.com/ursacomputing/crossbow/branches/all?query=actions-527e5649ae)
|Task|Status|
|----|------|
|test-conda-cpp-meson|[](https://github.com/ursacomputing/crossbow/actions/runs/13361115082/job/37310893683)|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #45441:
URL: https://github.com/apache/arrow/pull/45441#discussion_r1951843281
##########
cpp/meson.build:
##########
@@ -0,0 +1,59 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+project(
+ 'arrow',
+ 'cpp',
+ 'c',
+ version: '19.0.0-SNAPSHOT',
+ license: 'Apache 2.0',
+ meson_version: '>=1.3.0',
+ default_options: [
+ 'buildtype=release',
+ 'c_std=c99',
+ 'warning_level=2',
+ 'cpp_std=c++17',
+ ],
+)
+
+project_args = [
+ '-Wno-unused-parameter',
+ '-Wno-array-bounds',
+ '-Wno-stringop-overflow',
+ '-Wno-aggressive-loop-optimizations',
+ '-Wno-nonnull',
+]
+
+c_compiler = meson.get_compiler('c')
+c_args = c_compiler.get_supported_arguments(project_args)
+add_project_arguments(c_args, language: 'c')
+
+cpp_compiler = meson.get_compiler('cpp')
+cpp_args = cpp_compiler.get_supported_arguments(project_args)
+add_project_arguments(cpp_args, language: 'cpp')
+
+git_id = get_option('git_id')
+if git_id == ''
+ git_id = run_command('git', 'log', '-n1', '--format=%H', check: true).stdout().strip()
+endif
+
+git_description = get_option('git_description')
+if git_description == ''
+ git_description = run_command('git', 'describe', '--tags', check: true).stdout().strip()
Review Comment:
```suggestion
git_description = run_command('git', 'describe', '--tags').stdout().strip()
```
##########
cpp/meson.build:
##########
@@ -0,0 +1,59 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+project(
+ 'arrow',
+ 'cpp',
+ 'c',
+ version: '19.0.0-SNAPSHOT',
+ license: 'Apache 2.0',
+ meson_version: '>=1.3.0',
+ default_options: [
+ 'buildtype=release',
+ 'c_std=c99',
+ 'warning_level=2',
+ 'cpp_std=c++17',
+ ],
+)
+
+project_args = [
+ '-Wno-unused-parameter',
+ '-Wno-array-bounds',
+ '-Wno-stringop-overflow',
+ '-Wno-aggressive-loop-optimizations',
+ '-Wno-nonnull',
+]
+
+c_compiler = meson.get_compiler('c')
+c_args = c_compiler.get_supported_arguments(project_args)
+add_project_arguments(c_args, language: 'c')
+
+cpp_compiler = meson.get_compiler('cpp')
+cpp_args = cpp_compiler.get_supported_arguments(project_args)
+add_project_arguments(cpp_args, language: 'cpp')
+
+git_id = get_option('git_id')
+if git_id == ''
+ git_id = run_command('git', 'log', '-n1', '--format=%H', check: true).stdout().strip()
Review Comment:
Can we ignore `git log` error? This will fail when we use source archive.
```suggestion
git_id = run_command('git', 'log', '-n1', '--format=%H').stdout().strip()
```
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
+ 'arrow_array': {
+ 'sources': [
+ 'array/array_base.cc',
+ 'array/array_binary.cc',
+ 'array/array_decimal.cc',
+ 'array/array_dict.cc',
+ 'array/array_nested.cc',
+ 'array/array_primitive.cc',
+ 'array/array_run_end.cc',
+ 'array/builder_adaptive.cc',
+ 'array/builder_base.cc',
+ 'array/builder_binary.cc',
+ 'array/builder_decimal.cc',
+ 'array/builder_dict.cc',
+ 'array/builder_run_end.cc',
+ 'array/builder_nested.cc',
+ 'array/builder_primitive.cc',
+ 'array/builder_union.cc',
+ 'array/concatenate.cc',
+ 'array/data.cc',
+ 'array/diff.cc',
+ 'array/statistics.cc',
+ 'array/util.cc',
+ 'array/validate.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_compute': {
+ 'sources': [
+ 'compute/api_aggregate.cc',
+ 'compute/api_scalar.cc',
+ 'compute/api_vector.cc',
+ 'compute/cast.cc',
+ 'compute/exec.cc',
+ 'compute/expression.cc',
+ 'compute/function.cc',
+ 'compute/function_internal.cc',
+ 'compute/kernel.cc',
+ 'compute/ordering.cc',
+ 'compute/registry.cc',
+ 'compute/kernels/chunked_internal.cc',
+ 'compute/kernels/codegen_internal.cc',
+ 'compute/kernels/ree_util_internal.cc',
+ 'compute/kernels/scalar_cast_boolean.cc',
+ 'compute/kernels/scalar_cast_dictionary.cc',
+ 'compute/kernels/scalar_cast_extension.cc',
+ 'compute/kernels/scalar_cast_internal.cc',
+ 'compute/kernels/scalar_cast_nested.cc',
+ 'compute/kernels/scalar_cast_numeric.cc',
+ 'compute/kernels/scalar_cast_string.cc',
+ 'compute/kernels/scalar_cast_temporal.cc',
+ 'compute/kernels/util_internal.cc',
+ 'compute/kernels/vector_hash.cc',
+ 'compute/kernels/vector_selection.cc',
+ 'compute/kernels/vector_selection_filter_internal.cc',
+ 'compute/kernels/vector_selection_internal.cc',
+ 'compute/kernels/vector_selection_take_internal.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_io': {
+ 'sources': [
+ 'io/buffered.cc',
+ 'io/caching.cc',
+ 'io/compressed.cc',
+ 'io/file.cc',
+ 'io/hdfs.cc',
+ 'io/hdfs_internal.cc',
+ 'io/interfaces.cc',
+ 'io/memory.cc',
+ 'io/slow.cc',
+ 'io/stdio.cc',
+ 'io/transform.cc',
+ ],
+ 'include_dirs': [
+ include_dir,
+ include_directories('../../thirdparty/hadoop/include'),
+ ],
+ 'dependencies': [dl_dep],
+ },
+ 'arrow_util': {
+ 'sources': [
+ 'util/align_util.cc',
+ 'util/async_util.cc',
+ 'util/atfork_internal.cc',
+ 'util/basic_decimal.cc',
+ 'util/bit_block_counter.cc',
+ 'util/bit_run_reader.cc',
+ 'util/bit_util.cc',
+ 'util/bitmap.cc',
+ 'util/bitmap_builders.cc',
+ 'util/bitmap_ops.cc',
+ 'util/bpacking.cc',
+ 'util/byte_size.cc',
+ 'util/cancel.cc',
+ 'util/compression.cc',
+ 'util/counting_semaphore.cc',
+ 'util/cpu_info.cc',
+ 'util/crc32.cc',
+ 'util/debug.cc',
+ 'util/decimal.cc',
+ 'util/delimiting.cc',
+ 'util/dict_util.cc',
+ 'util/fixed_width_internal.cc',
+ 'util/float16.cc',
+ 'util/formatting.cc',
+ 'util/future.cc',
+ 'util/hashing.cc',
+ 'util/int_util.cc',
+ 'util/io_util.cc',
+ 'util/list_util.cc',
+ 'util/logger.cc',
+ 'util/logging.cc',
+ 'util/key_value_metadata.cc',
+ 'util/memory.cc',
+ 'util/mutex.cc',
+ 'util/ree_util.cc',
+ 'util/string.cc',
+ 'util/string_builder.cc',
+ 'util/task_group.cc',
+ 'util/tdigest.cc',
+ 'util/thread_pool.cc',
+ 'util/time.cc',
+ 'util/tracing.cc',
+ 'util/trie.cc',
+ 'util/union_util.cc',
+ 'util/unreachable.cc',
+ 'util/uri.cc',
+ 'util/utf8.cc',
+ 'util/value_parsing.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'memory_pool': {
+ 'sources': ['memory_pool.cc'],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'vendored': {
+ 'sources': [
+ 'vendored/base64.cpp',
+ 'vendored/datetime.cpp',
+ 'vendored/double-conversion/bignum-dtoa.cc',
+ 'vendored/double-conversion/bignum.cc',
+ 'vendored/double-conversion/cached-powers.cc',
+ 'vendored/double-conversion/double-to-string.cc',
+ 'vendored/double-conversion/fast-dtoa.cc',
+ 'vendored/double-conversion/fixed-dtoa.cc',
+ 'vendored/double-conversion/string-to-double.cc',
+ 'vendored/double-conversion/strtod.cc',
+ 'vendored/musl/strptime.c',
+ 'vendored/uriparser/UriCommon.c',
+ 'vendored/uriparser/UriCompare.c',
+ 'vendored/uriparser/UriEscape.c',
+ 'vendored/uriparser/UriFile.c',
+ 'vendored/uriparser/UriIp4.c',
+ 'vendored/uriparser/UriIp4Base.c',
+ 'vendored/uriparser/UriMemory.c',
+ 'vendored/uriparser/UriNormalize.c',
+ 'vendored/uriparser/UriNormalizeBase.c',
+ 'vendored/uriparser/UriParse.c',
+ 'vendored/uriparser/UriParseBase.c',
+ 'vendored/uriparser/UriQuery.c',
+ 'vendored/uriparser/UriRecompose.c',
+ 'vendored/uriparser/UriResolve.c',
+ 'vendored/uriparser/UriShorten.c',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+}
+
+objlibs = []
+foreach key, val : objlib_sources
+ slib = static_library(
+ key,
+ sources: val['sources'],
+ include_directories: val['include_dirs'],
+ dependencies: val['dependencies'],
+ build_by_default: false,
+ )
+ objlibs += slib.extract_all_objects(recursive: true)
+endforeach
+
+arrow_srcs = [
+ 'builder.cc',
+ 'buffer.cc',
+ 'chunked_array.cc',
+ 'chunk_resolver.cc',
+ 'compare.cc',
+ 'config.cc',
+ 'datum.cc',
+ 'device.cc',
+ 'device_allocation_type_set.cc',
+ 'extension_type.cc',
+ 'extension/bool8.cc',
+ 'extension/json.cc',
+ 'extension/uuid.cc',
+ 'pretty_print.cc',
+ 'record_batch.cc',
+ 'result.cc',
+ 'scalar.cc',
+ 'sparse_tensor.cc',
+ 'status.cc',
+ 'table.cc',
+ 'table_builder.cc',
+ 'tensor.cc',
+ 'tensor/coo_converter.cc',
+ 'tensor/csf_converter.cc',
+ 'tensor/csx_converter.cc',
+ 'type.cc',
+ 'type_traits.cc',
+ 'visitor.cc',
+ 'c/bridge.cc',
+ 'c/dlpack.cc',
+]
+
+arrow_lib = library(
+ 'arrow',
+ sources: [arrow_srcs],
+ objects: objlibs,
+ include_directories: [include_dir],
+ install: true,
+ # compute/expression.cc may have undefined IPC symbols in non-IPC builds
+ override_options: {'b_lundef': 'false'},
Review Comment:
Why do we need this?
##########
cpp/meson.build:
##########
@@ -0,0 +1,59 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+project(
+ 'arrow',
+ 'cpp',
+ 'c',
+ version: '19.0.0-SNAPSHOT',
+ license: 'Apache 2.0',
Review Comment:
```suggestion
license: 'Apache-2.0',
```
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
+ 'arrow_array': {
+ 'sources': [
+ 'array/array_base.cc',
+ 'array/array_binary.cc',
+ 'array/array_decimal.cc',
+ 'array/array_dict.cc',
+ 'array/array_nested.cc',
+ 'array/array_primitive.cc',
+ 'array/array_run_end.cc',
+ 'array/builder_adaptive.cc',
+ 'array/builder_base.cc',
+ 'array/builder_binary.cc',
+ 'array/builder_decimal.cc',
+ 'array/builder_dict.cc',
+ 'array/builder_run_end.cc',
+ 'array/builder_nested.cc',
+ 'array/builder_primitive.cc',
+ 'array/builder_union.cc',
+ 'array/concatenate.cc',
+ 'array/data.cc',
+ 'array/diff.cc',
+ 'array/statistics.cc',
+ 'array/util.cc',
+ 'array/validate.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_compute': {
+ 'sources': [
+ 'compute/api_aggregate.cc',
+ 'compute/api_scalar.cc',
+ 'compute/api_vector.cc',
+ 'compute/cast.cc',
+ 'compute/exec.cc',
+ 'compute/expression.cc',
+ 'compute/function.cc',
+ 'compute/function_internal.cc',
+ 'compute/kernel.cc',
+ 'compute/ordering.cc',
+ 'compute/registry.cc',
+ 'compute/kernels/chunked_internal.cc',
+ 'compute/kernels/codegen_internal.cc',
+ 'compute/kernels/ree_util_internal.cc',
+ 'compute/kernels/scalar_cast_boolean.cc',
+ 'compute/kernels/scalar_cast_dictionary.cc',
+ 'compute/kernels/scalar_cast_extension.cc',
+ 'compute/kernels/scalar_cast_internal.cc',
+ 'compute/kernels/scalar_cast_nested.cc',
+ 'compute/kernels/scalar_cast_numeric.cc',
+ 'compute/kernels/scalar_cast_string.cc',
+ 'compute/kernels/scalar_cast_temporal.cc',
+ 'compute/kernels/util_internal.cc',
+ 'compute/kernels/vector_hash.cc',
+ 'compute/kernels/vector_selection.cc',
+ 'compute/kernels/vector_selection_filter_internal.cc',
+ 'compute/kernels/vector_selection_internal.cc',
+ 'compute/kernels/vector_selection_take_internal.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_io': {
+ 'sources': [
+ 'io/buffered.cc',
+ 'io/caching.cc',
+ 'io/compressed.cc',
+ 'io/file.cc',
+ 'io/hdfs.cc',
+ 'io/hdfs_internal.cc',
+ 'io/interfaces.cc',
+ 'io/memory.cc',
+ 'io/slow.cc',
+ 'io/stdio.cc',
+ 'io/transform.cc',
+ ],
+ 'include_dirs': [
+ include_dir,
+ include_directories('../../thirdparty/hadoop/include'),
+ ],
+ 'dependencies': [dl_dep],
+ },
+ 'arrow_util': {
+ 'sources': [
+ 'util/align_util.cc',
+ 'util/async_util.cc',
+ 'util/atfork_internal.cc',
+ 'util/basic_decimal.cc',
+ 'util/bit_block_counter.cc',
+ 'util/bit_run_reader.cc',
+ 'util/bit_util.cc',
+ 'util/bitmap.cc',
+ 'util/bitmap_builders.cc',
+ 'util/bitmap_ops.cc',
+ 'util/bpacking.cc',
+ 'util/byte_size.cc',
+ 'util/cancel.cc',
+ 'util/compression.cc',
+ 'util/counting_semaphore.cc',
+ 'util/cpu_info.cc',
+ 'util/crc32.cc',
+ 'util/debug.cc',
+ 'util/decimal.cc',
+ 'util/delimiting.cc',
+ 'util/dict_util.cc',
+ 'util/fixed_width_internal.cc',
+ 'util/float16.cc',
+ 'util/formatting.cc',
+ 'util/future.cc',
+ 'util/hashing.cc',
+ 'util/int_util.cc',
+ 'util/io_util.cc',
+ 'util/list_util.cc',
+ 'util/logger.cc',
+ 'util/logging.cc',
+ 'util/key_value_metadata.cc',
+ 'util/memory.cc',
+ 'util/mutex.cc',
+ 'util/ree_util.cc',
+ 'util/string.cc',
+ 'util/string_builder.cc',
+ 'util/task_group.cc',
+ 'util/tdigest.cc',
+ 'util/thread_pool.cc',
+ 'util/time.cc',
+ 'util/tracing.cc',
+ 'util/trie.cc',
+ 'util/union_util.cc',
+ 'util/unreachable.cc',
+ 'util/uri.cc',
+ 'util/utf8.cc',
+ 'util/value_parsing.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'memory_pool': {
+ 'sources': ['memory_pool.cc'],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'vendored': {
+ 'sources': [
+ 'vendored/base64.cpp',
+ 'vendored/datetime.cpp',
+ 'vendored/double-conversion/bignum-dtoa.cc',
+ 'vendored/double-conversion/bignum.cc',
+ 'vendored/double-conversion/cached-powers.cc',
+ 'vendored/double-conversion/double-to-string.cc',
+ 'vendored/double-conversion/fast-dtoa.cc',
+ 'vendored/double-conversion/fixed-dtoa.cc',
+ 'vendored/double-conversion/string-to-double.cc',
+ 'vendored/double-conversion/strtod.cc',
+ 'vendored/musl/strptime.c',
+ 'vendored/uriparser/UriCommon.c',
+ 'vendored/uriparser/UriCompare.c',
+ 'vendored/uriparser/UriEscape.c',
+ 'vendored/uriparser/UriFile.c',
+ 'vendored/uriparser/UriIp4.c',
+ 'vendored/uriparser/UriIp4Base.c',
+ 'vendored/uriparser/UriMemory.c',
+ 'vendored/uriparser/UriNormalize.c',
+ 'vendored/uriparser/UriNormalizeBase.c',
+ 'vendored/uriparser/UriParse.c',
+ 'vendored/uriparser/UriParseBase.c',
+ 'vendored/uriparser/UriQuery.c',
+ 'vendored/uriparser/UriRecompose.c',
+ 'vendored/uriparser/UriResolve.c',
+ 'vendored/uriparser/UriShorten.c',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+}
+
+objlibs = []
+foreach key, val : objlib_sources
+ slib = static_library(
+ key,
+ sources: val['sources'],
+ include_directories: val['include_dirs'],
+ dependencies: val['dependencies'],
+ build_by_default: false,
+ )
+ objlibs += slib.extract_all_objects(recursive: true)
+endforeach
+
+arrow_srcs = [
+ 'builder.cc',
+ 'buffer.cc',
+ 'chunked_array.cc',
+ 'chunk_resolver.cc',
+ 'compare.cc',
+ 'config.cc',
+ 'datum.cc',
+ 'device.cc',
+ 'device_allocation_type_set.cc',
+ 'extension_type.cc',
+ 'extension/bool8.cc',
+ 'extension/json.cc',
+ 'extension/uuid.cc',
+ 'pretty_print.cc',
+ 'record_batch.cc',
+ 'result.cc',
+ 'scalar.cc',
+ 'sparse_tensor.cc',
+ 'status.cc',
+ 'table.cc',
+ 'table_builder.cc',
+ 'tensor.cc',
+ 'tensor/coo_converter.cc',
+ 'tensor/csf_converter.cc',
+ 'tensor/csx_converter.cc',
+ 'type.cc',
+ 'type_traits.cc',
+ 'visitor.cc',
+ 'c/bridge.cc',
+ 'c/dlpack.cc',
+]
+
+arrow_lib = library(
+ 'arrow',
+ sources: [arrow_srcs],
+ objects: objlibs,
+ include_directories: [include_dir],
+ install: true,
+ # compute/expression.cc may have undefined IPC symbols in non-IPC builds
+ override_options: {'b_lundef': 'false'},
+)
+
+# Meson does not allow you to glob for headers to install. See also
+# https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard
+# install_subdir would be usable if the directory only contained headers
+install_headers(
+ [
+ 'api.h',
+ 'array.h',
+ 'buffer_builder.h',
+ 'buffer.h',
+ 'builder.h',
+ 'chunked_array.h',
+ 'chunk_resolver.h',
+ 'compare.h',
+ 'config.h',
+ 'datum.h',
+ 'device_allocation_type_set.h',
+ 'device.h',
+ 'extension_type.h',
+ 'memory_pool.h',
+ 'memory_pool_test.h',
+ 'pch.h',
+ 'pretty_print.h',
+ 'record_batch.h',
+ 'result.h',
+ 'scalar.h',
+ 'sparse_tensor.h',
+ 'status.h',
+ 'stl_allocator.h',
+ 'stl.h',
+ 'stl_iterator.h',
+ 'table_builder.h',
+ 'table.h',
+ 'tensor.h',
+ 'type_fwd.h',
+ 'type.h',
+ 'type_traits.h',
+ 'visit_array_inline.h',
+ 'visit_data_inline.h',
+ 'visitor_generate.h',
+ 'visitor.h',
+ 'visit_scalar_inline.h',
+ 'visit_type_inline.h',
+ ],
+ install_dir: 'arrow',
+)
+
+version = meson.project_version()
+# Remove any pre-release / build identifiers
+version_no_pre_release = version.split('-')[0]
+version_no_build = version_no_pre_release.split('+')[0]
+components = version_no_build.split('.')
+assert(
+ components.length() >= 3,
+ 'The version does not contain major, minor and patch',
+)
+ver_major = components[0]
+ver_minor = components[1]
+ver_patch = components[2]
+
+arrow_version = ver_major.to_int() * 1000 + ver_minor.to_int() * 1000 + ver_patch.to_int()
Review Comment:
```suggestion
arrow_version = (ver_major.to_int() * 1000 + ver_minor.to_int()) * 1000 + ver_patch.to_int()
```
##########
cpp/src/arrow/util/meson.build:
##########
@@ -0,0 +1,103 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+conf_data = configuration_data()
+
+conf_data.set('ARROW_VERSION_MAJOR', ver_major)
+conf_data.set('ARROW_VERSION_MINOR', ver_minor)
+conf_data.set('ARROW_VERSION_PATCH', ver_patch)
+
+conf_data.set('ARROW_VERSION', arrow_version)
+conf_data.set('ARROW_VERSION_STRING', arrow_version)
+
+conf_data.set('ARROW_SO_VERSION', arrow_so_version)
+conf_data.set('ARROW_FULL_SO_VERSION', arrow_full_so_version)
+
+# TODO: we may want to give Meson its own configuration file rather
+# than backfitting onto CMake's
+conf_data.set('CMAKE_CXX_COMPILER_ID', cpp_compiler.get_id())
+conf_data.set('CMAKE_CXX_COMPILER_VERSION', cpp_compiler.version())
+conf_data.set(
+ 'CMAKE_CXX_FLAGS',
+ ' '.join(cpp_compiler.get_supported_arguments()),
+)
+
+conf_data.set('UPPERCASE_BUILD_TYPE', get_option('buildtype').to_upper())
+
+conf_data.set('ARROW_PACKAGE_KIND', get_option('package_kind'))
+
+foreach cmakedefine : [
+ 'ARROW_COMPUTE',
+ 'ARROW_CSV',
+ 'ARROW_CUDA',
+ 'ARROW_DATASET',
+ 'ARROW_FILESYSTEM',
+ 'ARROW_FLIGHT',
+ 'ARROW_FLIGHT_SQL',
+ 'ARROW_IPC',
+ 'ARROW_JEMALLOC',
+ 'ARROW_JEMALLOC_VENDORED',
+ 'ARROW_JSON',
+ 'ARROW_MIMALLOC',
+ 'ARROW_ORC',
+ 'ARROW_PARQUET',
+ 'ARROW_SUBSTRAIT',
+ 'ARROW_AZURE',
+ 'ARROW_ENABLE_THREADING',
+ 'ARROW_GCS',
+ 'ARROW_HDFS',
+ 'ARROW_S3',
+ 'ARROW_USE_GLOG',
+ 'ARROW_USE_NATIVE_INT128',
+ 'ARROW_WITH_BROTLI',
+ 'ARROW_WITH_BZ2',
+ 'ARROW_WITH_LZ4',
+ 'ARROW_WITH_MUSL',
+ 'ARROW_WITH_OPENTELEMETRY',
+ 'ARROW_WITH_RE2',
+ 'ARROW_WITH_SNAPPY',
+ 'ARROW_WITH_UCX',
+ 'ARROW_WITH_UTF8PROC',
+ 'ARROW_WITH_ZLIB',
+ 'ARROW_WITH_ZSTD',
+ 'PARQUET_REQUIRE_ENCRYPTION',
+]
+ conf_data.set(cmakedefine, false)
+endforeach
+
+configure_file(
+ input: 'config.h.cmake',
+ output: 'config.h',
+ configuration: conf_data,
+ format: 'cmake@',
+ install: true,
+ install_dir: 'arrow',
+)
+
+internal_conf_data = configuration_data()
+
+internal_conf_data.set('ARROW_GIT_ID', git_id)
+internal_conf_data.set('ARROW_GIT_DESCRIPTION', git_description)
+
+configure_file(
+ input: 'config_internal.h.cmake',
+ output: 'config_internal.h',
+ configuration: internal_conf_data,
+ format: 'cmake@',
+ install: true,
+ install_dir: 'arrow',
Review Comment:
We don't need to install `_internal.h`:
```suggestion
```
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
+ 'arrow_array': {
+ 'sources': [
+ 'array/array_base.cc',
+ 'array/array_binary.cc',
+ 'array/array_decimal.cc',
+ 'array/array_dict.cc',
+ 'array/array_nested.cc',
+ 'array/array_primitive.cc',
+ 'array/array_run_end.cc',
+ 'array/builder_adaptive.cc',
+ 'array/builder_base.cc',
+ 'array/builder_binary.cc',
+ 'array/builder_decimal.cc',
+ 'array/builder_dict.cc',
+ 'array/builder_run_end.cc',
+ 'array/builder_nested.cc',
+ 'array/builder_primitive.cc',
+ 'array/builder_union.cc',
+ 'array/concatenate.cc',
+ 'array/data.cc',
+ 'array/diff.cc',
+ 'array/statistics.cc',
+ 'array/util.cc',
+ 'array/validate.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_compute': {
+ 'sources': [
+ 'compute/api_aggregate.cc',
+ 'compute/api_scalar.cc',
+ 'compute/api_vector.cc',
+ 'compute/cast.cc',
+ 'compute/exec.cc',
+ 'compute/expression.cc',
+ 'compute/function.cc',
+ 'compute/function_internal.cc',
+ 'compute/kernel.cc',
+ 'compute/ordering.cc',
+ 'compute/registry.cc',
+ 'compute/kernels/chunked_internal.cc',
+ 'compute/kernels/codegen_internal.cc',
+ 'compute/kernels/ree_util_internal.cc',
+ 'compute/kernels/scalar_cast_boolean.cc',
+ 'compute/kernels/scalar_cast_dictionary.cc',
+ 'compute/kernels/scalar_cast_extension.cc',
+ 'compute/kernels/scalar_cast_internal.cc',
+ 'compute/kernels/scalar_cast_nested.cc',
+ 'compute/kernels/scalar_cast_numeric.cc',
+ 'compute/kernels/scalar_cast_string.cc',
+ 'compute/kernels/scalar_cast_temporal.cc',
+ 'compute/kernels/util_internal.cc',
+ 'compute/kernels/vector_hash.cc',
+ 'compute/kernels/vector_selection.cc',
+ 'compute/kernels/vector_selection_filter_internal.cc',
+ 'compute/kernels/vector_selection_internal.cc',
+ 'compute/kernels/vector_selection_take_internal.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_io': {
+ 'sources': [
+ 'io/buffered.cc',
+ 'io/caching.cc',
+ 'io/compressed.cc',
+ 'io/file.cc',
+ 'io/hdfs.cc',
+ 'io/hdfs_internal.cc',
+ 'io/interfaces.cc',
+ 'io/memory.cc',
+ 'io/slow.cc',
+ 'io/stdio.cc',
+ 'io/transform.cc',
+ ],
+ 'include_dirs': [
+ include_dir,
+ include_directories('../../thirdparty/hadoop/include'),
+ ],
+ 'dependencies': [dl_dep],
+ },
+ 'arrow_util': {
+ 'sources': [
+ 'util/align_util.cc',
+ 'util/async_util.cc',
+ 'util/atfork_internal.cc',
+ 'util/basic_decimal.cc',
+ 'util/bit_block_counter.cc',
+ 'util/bit_run_reader.cc',
+ 'util/bit_util.cc',
+ 'util/bitmap.cc',
+ 'util/bitmap_builders.cc',
+ 'util/bitmap_ops.cc',
+ 'util/bpacking.cc',
+ 'util/byte_size.cc',
+ 'util/cancel.cc',
+ 'util/compression.cc',
+ 'util/counting_semaphore.cc',
+ 'util/cpu_info.cc',
+ 'util/crc32.cc',
+ 'util/debug.cc',
+ 'util/decimal.cc',
+ 'util/delimiting.cc',
+ 'util/dict_util.cc',
+ 'util/fixed_width_internal.cc',
+ 'util/float16.cc',
+ 'util/formatting.cc',
+ 'util/future.cc',
+ 'util/hashing.cc',
+ 'util/int_util.cc',
+ 'util/io_util.cc',
+ 'util/list_util.cc',
+ 'util/logger.cc',
+ 'util/logging.cc',
+ 'util/key_value_metadata.cc',
+ 'util/memory.cc',
+ 'util/mutex.cc',
+ 'util/ree_util.cc',
+ 'util/string.cc',
+ 'util/string_builder.cc',
+ 'util/task_group.cc',
+ 'util/tdigest.cc',
+ 'util/thread_pool.cc',
+ 'util/time.cc',
+ 'util/tracing.cc',
+ 'util/trie.cc',
+ 'util/union_util.cc',
+ 'util/unreachable.cc',
+ 'util/uri.cc',
+ 'util/utf8.cc',
+ 'util/value_parsing.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'memory_pool': {
+ 'sources': ['memory_pool.cc'],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'vendored': {
+ 'sources': [
+ 'vendored/base64.cpp',
+ 'vendored/datetime.cpp',
+ 'vendored/double-conversion/bignum-dtoa.cc',
+ 'vendored/double-conversion/bignum.cc',
+ 'vendored/double-conversion/cached-powers.cc',
+ 'vendored/double-conversion/double-to-string.cc',
+ 'vendored/double-conversion/fast-dtoa.cc',
+ 'vendored/double-conversion/fixed-dtoa.cc',
+ 'vendored/double-conversion/string-to-double.cc',
+ 'vendored/double-conversion/strtod.cc',
+ 'vendored/musl/strptime.c',
+ 'vendored/uriparser/UriCommon.c',
+ 'vendored/uriparser/UriCompare.c',
+ 'vendored/uriparser/UriEscape.c',
+ 'vendored/uriparser/UriFile.c',
+ 'vendored/uriparser/UriIp4.c',
+ 'vendored/uriparser/UriIp4Base.c',
+ 'vendored/uriparser/UriMemory.c',
+ 'vendored/uriparser/UriNormalize.c',
+ 'vendored/uriparser/UriNormalizeBase.c',
+ 'vendored/uriparser/UriParse.c',
+ 'vendored/uriparser/UriParseBase.c',
+ 'vendored/uriparser/UriQuery.c',
+ 'vendored/uriparser/UriRecompose.c',
+ 'vendored/uriparser/UriResolve.c',
+ 'vendored/uriparser/UriShorten.c',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+}
+
+objlibs = []
+foreach key, val : objlib_sources
+ slib = static_library(
+ key,
+ sources: val['sources'],
+ include_directories: val['include_dirs'],
+ dependencies: val['dependencies'],
+ build_by_default: false,
+ )
+ objlibs += slib.extract_all_objects(recursive: true)
+endforeach
+
+arrow_srcs = [
+ 'builder.cc',
+ 'buffer.cc',
+ 'chunked_array.cc',
+ 'chunk_resolver.cc',
+ 'compare.cc',
+ 'config.cc',
+ 'datum.cc',
+ 'device.cc',
+ 'device_allocation_type_set.cc',
+ 'extension_type.cc',
+ 'extension/bool8.cc',
+ 'extension/json.cc',
+ 'extension/uuid.cc',
+ 'pretty_print.cc',
+ 'record_batch.cc',
+ 'result.cc',
+ 'scalar.cc',
+ 'sparse_tensor.cc',
+ 'status.cc',
+ 'table.cc',
+ 'table_builder.cc',
+ 'tensor.cc',
+ 'tensor/coo_converter.cc',
+ 'tensor/csf_converter.cc',
+ 'tensor/csx_converter.cc',
+ 'type.cc',
+ 'type_traits.cc',
+ 'visitor.cc',
+ 'c/bridge.cc',
+ 'c/dlpack.cc',
+]
+
+arrow_lib = library(
+ 'arrow',
+ sources: [arrow_srcs],
+ objects: objlibs,
+ include_directories: [include_dir],
+ install: true,
+ # compute/expression.cc may have undefined IPC symbols in non-IPC builds
+ override_options: {'b_lundef': 'false'},
+)
+
+# Meson does not allow you to glob for headers to install. See also
+# https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard
+# install_subdir would be usable if the directory only contained headers
+install_headers(
+ [
+ 'api.h',
+ 'array.h',
+ 'buffer_builder.h',
+ 'buffer.h',
+ 'builder.h',
+ 'chunked_array.h',
+ 'chunk_resolver.h',
+ 'compare.h',
+ 'config.h',
+ 'datum.h',
+ 'device_allocation_type_set.h',
+ 'device.h',
+ 'extension_type.h',
+ 'memory_pool.h',
+ 'memory_pool_test.h',
+ 'pch.h',
+ 'pretty_print.h',
+ 'record_batch.h',
+ 'result.h',
+ 'scalar.h',
+ 'sparse_tensor.h',
+ 'status.h',
+ 'stl_allocator.h',
+ 'stl.h',
+ 'stl_iterator.h',
+ 'table_builder.h',
+ 'table.h',
+ 'tensor.h',
+ 'type_fwd.h',
+ 'type.h',
+ 'type_traits.h',
+ 'visit_array_inline.h',
+ 'visit_data_inline.h',
+ 'visitor_generate.h',
+ 'visitor.h',
+ 'visit_scalar_inline.h',
+ 'visit_type_inline.h',
+ ],
+ install_dir: 'arrow',
+)
+
+version = meson.project_version()
+# Remove any pre-release / build identifiers
+version_no_pre_release = version.split('-')[0]
+version_no_build = version_no_pre_release.split('+')[0]
+components = version_no_build.split('.')
+assert(
+ components.length() >= 3,
+ 'The version does not contain major, minor and patch',
+)
+ver_major = components[0]
+ver_minor = components[1]
+ver_patch = components[2]
Review Comment:
How about using `version_XXX` for consistency with `version_no_snapshot`?
```suggestion
version_major = components[0]
version_minor = components[1]
version_patch = components[2]
```
##########
cpp/src/arrow/util/meson.build:
##########
@@ -0,0 +1,103 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+conf_data = configuration_data()
+
+conf_data.set('ARROW_VERSION_MAJOR', ver_major)
+conf_data.set('ARROW_VERSION_MINOR', ver_minor)
+conf_data.set('ARROW_VERSION_PATCH', ver_patch)
+
+conf_data.set('ARROW_VERSION', arrow_version)
+conf_data.set('ARROW_VERSION_STRING', arrow_version)
+
+conf_data.set('ARROW_SO_VERSION', arrow_so_version)
+conf_data.set('ARROW_FULL_SO_VERSION', arrow_full_so_version)
+
+# TODO: we may want to give Meson its own configuration file rather
+# than backfitting onto CMake's
+conf_data.set('CMAKE_CXX_COMPILER_ID', cpp_compiler.get_id())
+conf_data.set('CMAKE_CXX_COMPILER_VERSION', cpp_compiler.version())
+conf_data.set(
+ 'CMAKE_CXX_FLAGS',
+ ' '.join(cpp_compiler.get_supported_arguments()),
+)
+
+conf_data.set('UPPERCASE_BUILD_TYPE', get_option('buildtype').to_upper())
+
+conf_data.set('ARROW_PACKAGE_KIND', get_option('package_kind'))
+
+foreach cmakedefine : [
+ 'ARROW_COMPUTE',
+ 'ARROW_CSV',
+ 'ARROW_CUDA',
+ 'ARROW_DATASET',
+ 'ARROW_FILESYSTEM',
+ 'ARROW_FLIGHT',
+ 'ARROW_FLIGHT_SQL',
+ 'ARROW_IPC',
+ 'ARROW_JEMALLOC',
+ 'ARROW_JEMALLOC_VENDORED',
+ 'ARROW_JSON',
+ 'ARROW_MIMALLOC',
+ 'ARROW_ORC',
+ 'ARROW_PARQUET',
+ 'ARROW_SUBSTRAIT',
+ 'ARROW_AZURE',
+ 'ARROW_ENABLE_THREADING',
+ 'ARROW_GCS',
+ 'ARROW_HDFS',
+ 'ARROW_S3',
+ 'ARROW_USE_GLOG',
+ 'ARROW_USE_NATIVE_INT128',
+ 'ARROW_WITH_BROTLI',
+ 'ARROW_WITH_BZ2',
+ 'ARROW_WITH_LZ4',
+ 'ARROW_WITH_MUSL',
+ 'ARROW_WITH_OPENTELEMETRY',
+ 'ARROW_WITH_RE2',
+ 'ARROW_WITH_SNAPPY',
+ 'ARROW_WITH_UCX',
+ 'ARROW_WITH_UTF8PROC',
+ 'ARROW_WITH_ZLIB',
+ 'ARROW_WITH_ZSTD',
+ 'PARQUET_REQUIRE_ENCRYPTION',
+]
+ conf_data.set(cmakedefine, false)
+endforeach
+
+configure_file(
+ input: 'config.h.cmake',
+ output: 'config.h',
+ configuration: conf_data,
+ format: 'cmake@',
+ install: true,
+ install_dir: 'arrow',
Review Comment:
```suggestion
install_dir: 'arrow/util',
```
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
+ 'arrow_array': {
+ 'sources': [
+ 'array/array_base.cc',
+ 'array/array_binary.cc',
+ 'array/array_decimal.cc',
+ 'array/array_dict.cc',
+ 'array/array_nested.cc',
+ 'array/array_primitive.cc',
+ 'array/array_run_end.cc',
+ 'array/builder_adaptive.cc',
+ 'array/builder_base.cc',
+ 'array/builder_binary.cc',
+ 'array/builder_decimal.cc',
+ 'array/builder_dict.cc',
+ 'array/builder_run_end.cc',
+ 'array/builder_nested.cc',
+ 'array/builder_primitive.cc',
+ 'array/builder_union.cc',
+ 'array/concatenate.cc',
+ 'array/data.cc',
+ 'array/diff.cc',
+ 'array/statistics.cc',
+ 'array/util.cc',
+ 'array/validate.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_compute': {
+ 'sources': [
+ 'compute/api_aggregate.cc',
+ 'compute/api_scalar.cc',
+ 'compute/api_vector.cc',
+ 'compute/cast.cc',
+ 'compute/exec.cc',
+ 'compute/expression.cc',
+ 'compute/function.cc',
+ 'compute/function_internal.cc',
+ 'compute/kernel.cc',
+ 'compute/ordering.cc',
+ 'compute/registry.cc',
+ 'compute/kernels/chunked_internal.cc',
+ 'compute/kernels/codegen_internal.cc',
+ 'compute/kernels/ree_util_internal.cc',
+ 'compute/kernels/scalar_cast_boolean.cc',
+ 'compute/kernels/scalar_cast_dictionary.cc',
+ 'compute/kernels/scalar_cast_extension.cc',
+ 'compute/kernels/scalar_cast_internal.cc',
+ 'compute/kernels/scalar_cast_nested.cc',
+ 'compute/kernels/scalar_cast_numeric.cc',
+ 'compute/kernels/scalar_cast_string.cc',
+ 'compute/kernels/scalar_cast_temporal.cc',
+ 'compute/kernels/util_internal.cc',
+ 'compute/kernels/vector_hash.cc',
+ 'compute/kernels/vector_selection.cc',
+ 'compute/kernels/vector_selection_filter_internal.cc',
+ 'compute/kernels/vector_selection_internal.cc',
+ 'compute/kernels/vector_selection_take_internal.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_io': {
+ 'sources': [
+ 'io/buffered.cc',
+ 'io/caching.cc',
+ 'io/compressed.cc',
+ 'io/file.cc',
+ 'io/hdfs.cc',
+ 'io/hdfs_internal.cc',
+ 'io/interfaces.cc',
+ 'io/memory.cc',
+ 'io/slow.cc',
+ 'io/stdio.cc',
+ 'io/transform.cc',
+ ],
+ 'include_dirs': [
+ include_dir,
+ include_directories('../../thirdparty/hadoop/include'),
+ ],
+ 'dependencies': [dl_dep],
+ },
+ 'arrow_util': {
+ 'sources': [
+ 'util/align_util.cc',
+ 'util/async_util.cc',
+ 'util/atfork_internal.cc',
+ 'util/basic_decimal.cc',
+ 'util/bit_block_counter.cc',
+ 'util/bit_run_reader.cc',
+ 'util/bit_util.cc',
+ 'util/bitmap.cc',
+ 'util/bitmap_builders.cc',
+ 'util/bitmap_ops.cc',
+ 'util/bpacking.cc',
+ 'util/byte_size.cc',
+ 'util/cancel.cc',
+ 'util/compression.cc',
+ 'util/counting_semaphore.cc',
+ 'util/cpu_info.cc',
+ 'util/crc32.cc',
+ 'util/debug.cc',
+ 'util/decimal.cc',
+ 'util/delimiting.cc',
+ 'util/dict_util.cc',
+ 'util/fixed_width_internal.cc',
+ 'util/float16.cc',
+ 'util/formatting.cc',
+ 'util/future.cc',
+ 'util/hashing.cc',
+ 'util/int_util.cc',
+ 'util/io_util.cc',
+ 'util/list_util.cc',
+ 'util/logger.cc',
+ 'util/logging.cc',
+ 'util/key_value_metadata.cc',
+ 'util/memory.cc',
+ 'util/mutex.cc',
+ 'util/ree_util.cc',
+ 'util/string.cc',
+ 'util/string_builder.cc',
+ 'util/task_group.cc',
+ 'util/tdigest.cc',
+ 'util/thread_pool.cc',
+ 'util/time.cc',
+ 'util/tracing.cc',
+ 'util/trie.cc',
+ 'util/union_util.cc',
+ 'util/unreachable.cc',
+ 'util/uri.cc',
+ 'util/utf8.cc',
+ 'util/value_parsing.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'memory_pool': {
+ 'sources': ['memory_pool.cc'],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'vendored': {
+ 'sources': [
+ 'vendored/base64.cpp',
+ 'vendored/datetime.cpp',
+ 'vendored/double-conversion/bignum-dtoa.cc',
+ 'vendored/double-conversion/bignum.cc',
+ 'vendored/double-conversion/cached-powers.cc',
+ 'vendored/double-conversion/double-to-string.cc',
+ 'vendored/double-conversion/fast-dtoa.cc',
+ 'vendored/double-conversion/fixed-dtoa.cc',
+ 'vendored/double-conversion/string-to-double.cc',
+ 'vendored/double-conversion/strtod.cc',
+ 'vendored/musl/strptime.c',
+ 'vendored/uriparser/UriCommon.c',
+ 'vendored/uriparser/UriCompare.c',
+ 'vendored/uriparser/UriEscape.c',
+ 'vendored/uriparser/UriFile.c',
+ 'vendored/uriparser/UriIp4.c',
+ 'vendored/uriparser/UriIp4Base.c',
+ 'vendored/uriparser/UriMemory.c',
+ 'vendored/uriparser/UriNormalize.c',
+ 'vendored/uriparser/UriNormalizeBase.c',
+ 'vendored/uriparser/UriParse.c',
+ 'vendored/uriparser/UriParseBase.c',
+ 'vendored/uriparser/UriQuery.c',
+ 'vendored/uriparser/UriRecompose.c',
+ 'vendored/uriparser/UriResolve.c',
+ 'vendored/uriparser/UriShorten.c',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+}
+
+objlibs = []
+foreach key, val : objlib_sources
+ slib = static_library(
+ key,
+ sources: val['sources'],
+ include_directories: val['include_dirs'],
+ dependencies: val['dependencies'],
+ build_by_default: false,
+ )
+ objlibs += slib.extract_all_objects(recursive: true)
+endforeach
+
+arrow_srcs = [
+ 'builder.cc',
+ 'buffer.cc',
+ 'chunked_array.cc',
+ 'chunk_resolver.cc',
+ 'compare.cc',
+ 'config.cc',
+ 'datum.cc',
+ 'device.cc',
+ 'device_allocation_type_set.cc',
+ 'extension_type.cc',
+ 'extension/bool8.cc',
+ 'extension/json.cc',
+ 'extension/uuid.cc',
+ 'pretty_print.cc',
+ 'record_batch.cc',
+ 'result.cc',
+ 'scalar.cc',
+ 'sparse_tensor.cc',
+ 'status.cc',
+ 'table.cc',
+ 'table_builder.cc',
+ 'tensor.cc',
+ 'tensor/coo_converter.cc',
+ 'tensor/csf_converter.cc',
+ 'tensor/csx_converter.cc',
+ 'type.cc',
+ 'type_traits.cc',
+ 'visitor.cc',
+ 'c/bridge.cc',
+ 'c/dlpack.cc',
+]
+
+arrow_lib = library(
+ 'arrow',
+ sources: [arrow_srcs],
+ objects: objlibs,
+ include_directories: [include_dir],
+ install: true,
+ # compute/expression.cc may have undefined IPC symbols in non-IPC builds
+ override_options: {'b_lundef': 'false'},
+)
+
+# Meson does not allow you to glob for headers to install. See also
+# https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard
+# install_subdir would be usable if the directory only contained headers
+install_headers(
+ [
+ 'api.h',
+ 'array.h',
+ 'buffer_builder.h',
+ 'buffer.h',
+ 'builder.h',
+ 'chunked_array.h',
+ 'chunk_resolver.h',
+ 'compare.h',
+ 'config.h',
+ 'datum.h',
+ 'device_allocation_type_set.h',
+ 'device.h',
+ 'extension_type.h',
+ 'memory_pool.h',
+ 'memory_pool_test.h',
+ 'pch.h',
+ 'pretty_print.h',
+ 'record_batch.h',
+ 'result.h',
+ 'scalar.h',
+ 'sparse_tensor.h',
+ 'status.h',
+ 'stl_allocator.h',
+ 'stl.h',
+ 'stl_iterator.h',
+ 'table_builder.h',
+ 'table.h',
+ 'tensor.h',
+ 'type_fwd.h',
+ 'type.h',
+ 'type_traits.h',
+ 'visit_array_inline.h',
+ 'visit_data_inline.h',
+ 'visitor_generate.h',
+ 'visitor.h',
+ 'visit_scalar_inline.h',
+ 'visit_type_inline.h',
+ ],
+ install_dir: 'arrow',
+)
+
+version = meson.project_version()
+# Remove any pre-release / build identifiers
+version_no_pre_release = version.split('-')[0]
+version_no_build = version_no_pre_release.split('+')[0]
+components = version_no_build.split('.')
Review Comment:
We use only `-SNAPSHOT` suffix.
```suggestion
# Remove -SNAPSHOT
version_no_snapshot = version.split('-SNAPSHOT')[0]
components = version_no_snapshot.split('.')
```
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
Review Comment:
We don't need to emulate objlib in Meson. It's just for faster build.
We can just use `library()`.
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
+ 'arrow_array': {
+ 'sources': [
+ 'array/array_base.cc',
+ 'array/array_binary.cc',
+ 'array/array_decimal.cc',
+ 'array/array_dict.cc',
+ 'array/array_nested.cc',
+ 'array/array_primitive.cc',
+ 'array/array_run_end.cc',
+ 'array/builder_adaptive.cc',
+ 'array/builder_base.cc',
+ 'array/builder_binary.cc',
+ 'array/builder_decimal.cc',
+ 'array/builder_dict.cc',
+ 'array/builder_run_end.cc',
+ 'array/builder_nested.cc',
+ 'array/builder_primitive.cc',
+ 'array/builder_union.cc',
+ 'array/concatenate.cc',
+ 'array/data.cc',
+ 'array/diff.cc',
+ 'array/statistics.cc',
+ 'array/util.cc',
+ 'array/validate.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_compute': {
+ 'sources': [
+ 'compute/api_aggregate.cc',
+ 'compute/api_scalar.cc',
+ 'compute/api_vector.cc',
+ 'compute/cast.cc',
+ 'compute/exec.cc',
+ 'compute/expression.cc',
+ 'compute/function.cc',
+ 'compute/function_internal.cc',
+ 'compute/kernel.cc',
+ 'compute/ordering.cc',
+ 'compute/registry.cc',
+ 'compute/kernels/chunked_internal.cc',
+ 'compute/kernels/codegen_internal.cc',
+ 'compute/kernels/ree_util_internal.cc',
+ 'compute/kernels/scalar_cast_boolean.cc',
+ 'compute/kernels/scalar_cast_dictionary.cc',
+ 'compute/kernels/scalar_cast_extension.cc',
+ 'compute/kernels/scalar_cast_internal.cc',
+ 'compute/kernels/scalar_cast_nested.cc',
+ 'compute/kernels/scalar_cast_numeric.cc',
+ 'compute/kernels/scalar_cast_string.cc',
+ 'compute/kernels/scalar_cast_temporal.cc',
+ 'compute/kernels/util_internal.cc',
+ 'compute/kernels/vector_hash.cc',
+ 'compute/kernels/vector_selection.cc',
+ 'compute/kernels/vector_selection_filter_internal.cc',
+ 'compute/kernels/vector_selection_internal.cc',
+ 'compute/kernels/vector_selection_take_internal.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_io': {
+ 'sources': [
+ 'io/buffered.cc',
+ 'io/caching.cc',
+ 'io/compressed.cc',
+ 'io/file.cc',
+ 'io/hdfs.cc',
+ 'io/hdfs_internal.cc',
+ 'io/interfaces.cc',
+ 'io/memory.cc',
+ 'io/slow.cc',
+ 'io/stdio.cc',
+ 'io/transform.cc',
+ ],
+ 'include_dirs': [
+ include_dir,
+ include_directories('../../thirdparty/hadoop/include'),
+ ],
+ 'dependencies': [dl_dep],
+ },
+ 'arrow_util': {
+ 'sources': [
+ 'util/align_util.cc',
+ 'util/async_util.cc',
+ 'util/atfork_internal.cc',
+ 'util/basic_decimal.cc',
+ 'util/bit_block_counter.cc',
+ 'util/bit_run_reader.cc',
+ 'util/bit_util.cc',
+ 'util/bitmap.cc',
+ 'util/bitmap_builders.cc',
+ 'util/bitmap_ops.cc',
+ 'util/bpacking.cc',
+ 'util/byte_size.cc',
+ 'util/cancel.cc',
+ 'util/compression.cc',
+ 'util/counting_semaphore.cc',
+ 'util/cpu_info.cc',
+ 'util/crc32.cc',
+ 'util/debug.cc',
+ 'util/decimal.cc',
+ 'util/delimiting.cc',
+ 'util/dict_util.cc',
+ 'util/fixed_width_internal.cc',
+ 'util/float16.cc',
+ 'util/formatting.cc',
+ 'util/future.cc',
+ 'util/hashing.cc',
+ 'util/int_util.cc',
+ 'util/io_util.cc',
+ 'util/list_util.cc',
+ 'util/logger.cc',
+ 'util/logging.cc',
+ 'util/key_value_metadata.cc',
+ 'util/memory.cc',
+ 'util/mutex.cc',
+ 'util/ree_util.cc',
+ 'util/string.cc',
+ 'util/string_builder.cc',
+ 'util/task_group.cc',
+ 'util/tdigest.cc',
+ 'util/thread_pool.cc',
+ 'util/time.cc',
+ 'util/tracing.cc',
+ 'util/trie.cc',
+ 'util/union_util.cc',
+ 'util/unreachable.cc',
+ 'util/uri.cc',
+ 'util/utf8.cc',
+ 'util/value_parsing.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'memory_pool': {
+ 'sources': ['memory_pool.cc'],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'vendored': {
+ 'sources': [
+ 'vendored/base64.cpp',
+ 'vendored/datetime.cpp',
+ 'vendored/double-conversion/bignum-dtoa.cc',
+ 'vendored/double-conversion/bignum.cc',
+ 'vendored/double-conversion/cached-powers.cc',
+ 'vendored/double-conversion/double-to-string.cc',
+ 'vendored/double-conversion/fast-dtoa.cc',
+ 'vendored/double-conversion/fixed-dtoa.cc',
+ 'vendored/double-conversion/string-to-double.cc',
+ 'vendored/double-conversion/strtod.cc',
+ 'vendored/musl/strptime.c',
+ 'vendored/uriparser/UriCommon.c',
+ 'vendored/uriparser/UriCompare.c',
+ 'vendored/uriparser/UriEscape.c',
+ 'vendored/uriparser/UriFile.c',
+ 'vendored/uriparser/UriIp4.c',
+ 'vendored/uriparser/UriIp4Base.c',
+ 'vendored/uriparser/UriMemory.c',
+ 'vendored/uriparser/UriNormalize.c',
+ 'vendored/uriparser/UriNormalizeBase.c',
+ 'vendored/uriparser/UriParse.c',
+ 'vendored/uriparser/UriParseBase.c',
+ 'vendored/uriparser/UriQuery.c',
+ 'vendored/uriparser/UriRecompose.c',
+ 'vendored/uriparser/UriResolve.c',
+ 'vendored/uriparser/UriShorten.c',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+}
+
+objlibs = []
+foreach key, val : objlib_sources
+ slib = static_library(
+ key,
+ sources: val['sources'],
+ include_directories: val['include_dirs'],
+ dependencies: val['dependencies'],
+ build_by_default: false,
+ )
+ objlibs += slib.extract_all_objects(recursive: true)
+endforeach
+
+arrow_srcs = [
+ 'builder.cc',
+ 'buffer.cc',
+ 'chunked_array.cc',
+ 'chunk_resolver.cc',
+ 'compare.cc',
+ 'config.cc',
+ 'datum.cc',
+ 'device.cc',
+ 'device_allocation_type_set.cc',
+ 'extension_type.cc',
+ 'extension/bool8.cc',
+ 'extension/json.cc',
+ 'extension/uuid.cc',
+ 'pretty_print.cc',
+ 'record_batch.cc',
+ 'result.cc',
+ 'scalar.cc',
+ 'sparse_tensor.cc',
+ 'status.cc',
+ 'table.cc',
+ 'table_builder.cc',
+ 'tensor.cc',
+ 'tensor/coo_converter.cc',
+ 'tensor/csf_converter.cc',
+ 'tensor/csx_converter.cc',
+ 'type.cc',
+ 'type_traits.cc',
+ 'visitor.cc',
+ 'c/bridge.cc',
+ 'c/dlpack.cc',
+]
+
+arrow_lib = library(
+ 'arrow',
+ sources: [arrow_srcs],
+ objects: objlibs,
+ include_directories: [include_dir],
+ install: true,
+ # compute/expression.cc may have undefined IPC symbols in non-IPC builds
+ override_options: {'b_lundef': 'false'},
+)
+
+# Meson does not allow you to glob for headers to install. See also
+# https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard
+# install_subdir would be usable if the directory only contained headers
+install_headers(
+ [
+ 'api.h',
+ 'array.h',
+ 'buffer_builder.h',
+ 'buffer.h',
+ 'builder.h',
+ 'chunked_array.h',
+ 'chunk_resolver.h',
+ 'compare.h',
+ 'config.h',
+ 'datum.h',
+ 'device_allocation_type_set.h',
+ 'device.h',
+ 'extension_type.h',
+ 'memory_pool.h',
+ 'memory_pool_test.h',
+ 'pch.h',
+ 'pretty_print.h',
+ 'record_batch.h',
+ 'result.h',
+ 'scalar.h',
+ 'sparse_tensor.h',
+ 'status.h',
+ 'stl_allocator.h',
+ 'stl.h',
+ 'stl_iterator.h',
+ 'table_builder.h',
+ 'table.h',
+ 'tensor.h',
+ 'type_fwd.h',
+ 'type.h',
+ 'type_traits.h',
+ 'visit_array_inline.h',
+ 'visit_data_inline.h',
+ 'visitor_generate.h',
+ 'visitor.h',
+ 'visit_scalar_inline.h',
+ 'visit_type_inline.h',
+ ],
+ install_dir: 'arrow',
+)
+
+version = meson.project_version()
+# Remove any pre-release / build identifiers
+version_no_pre_release = version.split('-')[0]
+version_no_build = version_no_pre_release.split('+')[0]
+components = version_no_build.split('.')
+assert(
+ components.length() >= 3,
+ 'The version does not contain major, minor and patch',
+)
+ver_major = components[0]
+ver_minor = components[1]
+ver_patch = components[2]
+
+arrow_version = ver_major.to_int() * 1000 + ver_minor.to_int() * 1000 + ver_patch.to_int()
+arrow_so_version = (ver_major.to_int() * 100 + ver_minor.to_int()).to_string()
+arrow_full_so_version = '@0@.@1@.@2@'.format(arrow_so_version, ver_patch, 0)
+
+# TODO: The Meson generated .pc file does not include the Apache license
Review Comment:
We don't need it.
`arrow.pc.in` has the license header because it's in this repository. Files that don't exist in this repository don't need it.
##########
cpp/src/arrow/util/meson.build:
##########
@@ -0,0 +1,103 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+conf_data = configuration_data()
+
+conf_data.set('ARROW_VERSION_MAJOR', ver_major)
+conf_data.set('ARROW_VERSION_MINOR', ver_minor)
+conf_data.set('ARROW_VERSION_PATCH', ver_patch)
+
+conf_data.set('ARROW_VERSION', arrow_version)
+conf_data.set('ARROW_VERSION_STRING', arrow_version)
+
+conf_data.set('ARROW_SO_VERSION', arrow_so_version)
+conf_data.set('ARROW_FULL_SO_VERSION', arrow_full_so_version)
+
+# TODO: we may want to give Meson its own configuration file rather
Review Comment:
We want to use `config.h.cmake` for both CMake and Meson (with `format: 'cmake@'`). It's for reducing maintenance cost.
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
+ 'arrow_array': {
+ 'sources': [
+ 'array/array_base.cc',
+ 'array/array_binary.cc',
+ 'array/array_decimal.cc',
+ 'array/array_dict.cc',
+ 'array/array_nested.cc',
+ 'array/array_primitive.cc',
+ 'array/array_run_end.cc',
+ 'array/builder_adaptive.cc',
+ 'array/builder_base.cc',
+ 'array/builder_binary.cc',
+ 'array/builder_decimal.cc',
+ 'array/builder_dict.cc',
+ 'array/builder_run_end.cc',
+ 'array/builder_nested.cc',
+ 'array/builder_primitive.cc',
+ 'array/builder_union.cc',
+ 'array/concatenate.cc',
+ 'array/data.cc',
+ 'array/diff.cc',
+ 'array/statistics.cc',
+ 'array/util.cc',
+ 'array/validate.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_compute': {
+ 'sources': [
+ 'compute/api_aggregate.cc',
+ 'compute/api_scalar.cc',
+ 'compute/api_vector.cc',
+ 'compute/cast.cc',
+ 'compute/exec.cc',
+ 'compute/expression.cc',
+ 'compute/function.cc',
+ 'compute/function_internal.cc',
+ 'compute/kernel.cc',
+ 'compute/ordering.cc',
+ 'compute/registry.cc',
+ 'compute/kernels/chunked_internal.cc',
+ 'compute/kernels/codegen_internal.cc',
+ 'compute/kernels/ree_util_internal.cc',
+ 'compute/kernels/scalar_cast_boolean.cc',
+ 'compute/kernels/scalar_cast_dictionary.cc',
+ 'compute/kernels/scalar_cast_extension.cc',
+ 'compute/kernels/scalar_cast_internal.cc',
+ 'compute/kernels/scalar_cast_nested.cc',
+ 'compute/kernels/scalar_cast_numeric.cc',
+ 'compute/kernels/scalar_cast_string.cc',
+ 'compute/kernels/scalar_cast_temporal.cc',
+ 'compute/kernels/util_internal.cc',
+ 'compute/kernels/vector_hash.cc',
+ 'compute/kernels/vector_selection.cc',
+ 'compute/kernels/vector_selection_filter_internal.cc',
+ 'compute/kernels/vector_selection_internal.cc',
+ 'compute/kernels/vector_selection_take_internal.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_io': {
+ 'sources': [
+ 'io/buffered.cc',
+ 'io/caching.cc',
+ 'io/compressed.cc',
+ 'io/file.cc',
+ 'io/hdfs.cc',
+ 'io/hdfs_internal.cc',
+ 'io/interfaces.cc',
+ 'io/memory.cc',
+ 'io/slow.cc',
+ 'io/stdio.cc',
+ 'io/transform.cc',
+ ],
+ 'include_dirs': [
+ include_dir,
+ include_directories('../../thirdparty/hadoop/include'),
+ ],
+ 'dependencies': [dl_dep],
+ },
+ 'arrow_util': {
+ 'sources': [
+ 'util/align_util.cc',
+ 'util/async_util.cc',
+ 'util/atfork_internal.cc',
+ 'util/basic_decimal.cc',
+ 'util/bit_block_counter.cc',
+ 'util/bit_run_reader.cc',
+ 'util/bit_util.cc',
+ 'util/bitmap.cc',
+ 'util/bitmap_builders.cc',
+ 'util/bitmap_ops.cc',
+ 'util/bpacking.cc',
+ 'util/byte_size.cc',
+ 'util/cancel.cc',
+ 'util/compression.cc',
+ 'util/counting_semaphore.cc',
+ 'util/cpu_info.cc',
+ 'util/crc32.cc',
+ 'util/debug.cc',
+ 'util/decimal.cc',
+ 'util/delimiting.cc',
+ 'util/dict_util.cc',
+ 'util/fixed_width_internal.cc',
+ 'util/float16.cc',
+ 'util/formatting.cc',
+ 'util/future.cc',
+ 'util/hashing.cc',
+ 'util/int_util.cc',
+ 'util/io_util.cc',
+ 'util/list_util.cc',
+ 'util/logger.cc',
+ 'util/logging.cc',
+ 'util/key_value_metadata.cc',
+ 'util/memory.cc',
+ 'util/mutex.cc',
+ 'util/ree_util.cc',
+ 'util/string.cc',
+ 'util/string_builder.cc',
+ 'util/task_group.cc',
+ 'util/tdigest.cc',
+ 'util/thread_pool.cc',
+ 'util/time.cc',
+ 'util/tracing.cc',
+ 'util/trie.cc',
+ 'util/union_util.cc',
+ 'util/unreachable.cc',
+ 'util/uri.cc',
+ 'util/utf8.cc',
+ 'util/value_parsing.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'memory_pool': {
+ 'sources': ['memory_pool.cc'],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'vendored': {
+ 'sources': [
+ 'vendored/base64.cpp',
+ 'vendored/datetime.cpp',
+ 'vendored/double-conversion/bignum-dtoa.cc',
+ 'vendored/double-conversion/bignum.cc',
+ 'vendored/double-conversion/cached-powers.cc',
+ 'vendored/double-conversion/double-to-string.cc',
+ 'vendored/double-conversion/fast-dtoa.cc',
+ 'vendored/double-conversion/fixed-dtoa.cc',
+ 'vendored/double-conversion/string-to-double.cc',
+ 'vendored/double-conversion/strtod.cc',
+ 'vendored/musl/strptime.c',
+ 'vendored/uriparser/UriCommon.c',
+ 'vendored/uriparser/UriCompare.c',
+ 'vendored/uriparser/UriEscape.c',
+ 'vendored/uriparser/UriFile.c',
+ 'vendored/uriparser/UriIp4.c',
+ 'vendored/uriparser/UriIp4Base.c',
+ 'vendored/uriparser/UriMemory.c',
+ 'vendored/uriparser/UriNormalize.c',
+ 'vendored/uriparser/UriNormalizeBase.c',
+ 'vendored/uriparser/UriParse.c',
+ 'vendored/uriparser/UriParseBase.c',
+ 'vendored/uriparser/UriQuery.c',
+ 'vendored/uriparser/UriRecompose.c',
+ 'vendored/uriparser/UriResolve.c',
+ 'vendored/uriparser/UriShorten.c',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+}
+
+objlibs = []
+foreach key, val : objlib_sources
+ slib = static_library(
+ key,
+ sources: val['sources'],
+ include_directories: val['include_dirs'],
+ dependencies: val['dependencies'],
+ build_by_default: false,
+ )
+ objlibs += slib.extract_all_objects(recursive: true)
+endforeach
+
+arrow_srcs = [
+ 'builder.cc',
+ 'buffer.cc',
+ 'chunked_array.cc',
+ 'chunk_resolver.cc',
+ 'compare.cc',
+ 'config.cc',
+ 'datum.cc',
+ 'device.cc',
+ 'device_allocation_type_set.cc',
+ 'extension_type.cc',
+ 'extension/bool8.cc',
+ 'extension/json.cc',
+ 'extension/uuid.cc',
+ 'pretty_print.cc',
+ 'record_batch.cc',
+ 'result.cc',
+ 'scalar.cc',
+ 'sparse_tensor.cc',
+ 'status.cc',
+ 'table.cc',
+ 'table_builder.cc',
+ 'tensor.cc',
+ 'tensor/coo_converter.cc',
+ 'tensor/csf_converter.cc',
+ 'tensor/csx_converter.cc',
+ 'type.cc',
+ 'type_traits.cc',
+ 'visitor.cc',
+ 'c/bridge.cc',
+ 'c/dlpack.cc',
+]
+
+arrow_lib = library(
+ 'arrow',
+ sources: [arrow_srcs],
+ objects: objlibs,
+ include_directories: [include_dir],
+ install: true,
+ # compute/expression.cc may have undefined IPC symbols in non-IPC builds
Review Comment:
Ah, we should disable features that depend on IPC in `cpp/src/arrow/compute/expression.cc` like GH-45171.
Could you open an issue for this?
##########
cpp/src/arrow/util/meson.build:
##########
@@ -0,0 +1,103 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+conf_data = configuration_data()
+
+conf_data.set('ARROW_VERSION_MAJOR', ver_major)
+conf_data.set('ARROW_VERSION_MINOR', ver_minor)
+conf_data.set('ARROW_VERSION_PATCH', ver_patch)
+
+conf_data.set('ARROW_VERSION', arrow_version)
+conf_data.set('ARROW_VERSION_STRING', arrow_version)
+
+conf_data.set('ARROW_SO_VERSION', arrow_so_version)
+conf_data.set('ARROW_FULL_SO_VERSION', arrow_full_so_version)
+
+# TODO: we may want to give Meson its own configuration file rather
+# than backfitting onto CMake's
+conf_data.set('CMAKE_CXX_COMPILER_ID', cpp_compiler.get_id())
+conf_data.set('CMAKE_CXX_COMPILER_VERSION', cpp_compiler.version())
+conf_data.set(
+ 'CMAKE_CXX_FLAGS',
+ ' '.join(cpp_compiler.get_supported_arguments()),
+)
+
+conf_data.set('UPPERCASE_BUILD_TYPE', get_option('buildtype').to_upper())
+
+conf_data.set('ARROW_PACKAGE_KIND', get_option('package_kind'))
+
+foreach cmakedefine : [
+ 'ARROW_COMPUTE',
+ 'ARROW_CSV',
+ 'ARROW_CUDA',
+ 'ARROW_DATASET',
+ 'ARROW_FILESYSTEM',
+ 'ARROW_FLIGHT',
+ 'ARROW_FLIGHT_SQL',
+ 'ARROW_IPC',
+ 'ARROW_JEMALLOC',
+ 'ARROW_JEMALLOC_VENDORED',
+ 'ARROW_JSON',
+ 'ARROW_MIMALLOC',
+ 'ARROW_ORC',
+ 'ARROW_PARQUET',
+ 'ARROW_SUBSTRAIT',
+ 'ARROW_AZURE',
+ 'ARROW_ENABLE_THREADING',
+ 'ARROW_GCS',
+ 'ARROW_HDFS',
+ 'ARROW_S3',
+ 'ARROW_USE_GLOG',
+ 'ARROW_USE_NATIVE_INT128',
+ 'ARROW_WITH_BROTLI',
+ 'ARROW_WITH_BZ2',
+ 'ARROW_WITH_LZ4',
+ 'ARROW_WITH_MUSL',
+ 'ARROW_WITH_OPENTELEMETRY',
+ 'ARROW_WITH_RE2',
+ 'ARROW_WITH_SNAPPY',
+ 'ARROW_WITH_UCX',
+ 'ARROW_WITH_UTF8PROC',
+ 'ARROW_WITH_ZLIB',
+ 'ARROW_WITH_ZSTD',
+ 'PARQUET_REQUIRE_ENCRYPTION',
+]
+ conf_data.set(cmakedefine, false)
+endforeach
Review Comment:
It seems that we don't need to use `foreach` here:
```meson
conf_data.set('ARROW_COMPUTE', false)
conf_data.set('ARROW_CSV', false)
...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2652532774
Sure no problem
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Add Minimal Meson Build of libarrow to CI [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2664389848
> I've rebased on main, added support for updating version in release process and added nightly CI job for Meson.
>
> Could you update the PR description?
I've addressed your feedback. Not sure I am doing what you are asking with respect to the PR description but I changed it to be more exact. Let me know if there is something else should be doing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Add Minimal Meson Build of libarrow to CI [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2664439518
> Not sure I am doing what you are asking with respect to the PR description but I changed it to be more exact.
We use the PR description for a commit message when we merge this. So we want to update the PR description to reflect the latest PR changes.
BTW, it seems that you didn't change the PR description yet. (You might forget to save your PR description change.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Add Minimal Meson Build of libarrow to CI [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2664680386
I mean the merge commit's commit message not commit messages of commits in this PRs.
You don't need to squash commits in this PR. Because we use "Squash and merge" feature provided by GitHub. We use the following commit message:
```text
${PR_TITLE}
${PR_DESCRIPTION}
```
For example, https://github.com/apache/arrow/commit/ec3d2839d102cc44d368c154cfa756eb946909ee 's commit message uses https://github.com/apache/arrow/pull/44375 's title and description. It doesn't use commit messages of commits in https://github.com/apache/arrow/pull/44375 .
> On Github I've already change the PR title
Could you also update the PR description?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2638361102
@kou this is a simplified attempt at adding Meson to address your comment https://github.com/apache/arrow/issues/41816#issuecomment-2131511532
This is currently slower than the CMake configuration by a good deal (pending investigation) and the configuration file is not 100% complete, but this should give us an idea of what a Meson configuration may look like.
To use, from the cpp directory developers can:
```bash
meson setup builddir -Dtests=true -Dcompute=true
meson compile -C builddir
meson test -C builddir
```
For ASAN/UBSAN, users could simply:
```bash
meson setup builddir -Dtests=true -Dcompute=true -Db_sanitize=address,undefined
```
Or if the project is already setup run:
```bash
meson configure -C builddir -Db_sanitize=address,undefined
```
Coverage can be enabled with:
```bash
meson configure -C builddir -Db_coverage=true
```
and tests can be run under valgrind with:
```bash
meson test -C builddir --wrap='valgrind --track-origins=yes --leak-check=full' --print-errorlog
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #45441:
URL: https://github.com/apache/arrow/pull/45441#issuecomment-2638610865
Thanks.
Can we start from more simplified version? For example, we don't need `libarrow_testing`, tests and so on at the first step.
We want to add a nightly CI for this to detect regression.
We want to update version information automatically in release process. For example: https://github.com/apache/arrow/blob/05569054edf4260eebbfbfd87ca524da05082afe/dev/release/utils-prepare.sh#L39-L44
(I can do it in this branch later.)
Anyway, I didn't know that `meson format` exists! I want to use it in `c_glib/` too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #45441:
URL: https://github.com/apache/arrow/pull/45441#discussion_r1953603555
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
Review Comment:
Ah, we can remove `objlib_sources` and `static_library()` for them entirely.
We can just add sources in `objlib_sources` to `arrow_srcs` and use it in one `library()` (that already exists in this PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on code in PR #45441:
URL: https://github.com/apache/arrow/pull/45441#discussion_r1952334284
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
+ 'arrow_array': {
+ 'sources': [
+ 'array/array_base.cc',
+ 'array/array_binary.cc',
+ 'array/array_decimal.cc',
+ 'array/array_dict.cc',
+ 'array/array_nested.cc',
+ 'array/array_primitive.cc',
+ 'array/array_run_end.cc',
+ 'array/builder_adaptive.cc',
+ 'array/builder_base.cc',
+ 'array/builder_binary.cc',
+ 'array/builder_decimal.cc',
+ 'array/builder_dict.cc',
+ 'array/builder_run_end.cc',
+ 'array/builder_nested.cc',
+ 'array/builder_primitive.cc',
+ 'array/builder_union.cc',
+ 'array/concatenate.cc',
+ 'array/data.cc',
+ 'array/diff.cc',
+ 'array/statistics.cc',
+ 'array/util.cc',
+ 'array/validate.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_compute': {
+ 'sources': [
+ 'compute/api_aggregate.cc',
+ 'compute/api_scalar.cc',
+ 'compute/api_vector.cc',
+ 'compute/cast.cc',
+ 'compute/exec.cc',
+ 'compute/expression.cc',
+ 'compute/function.cc',
+ 'compute/function_internal.cc',
+ 'compute/kernel.cc',
+ 'compute/ordering.cc',
+ 'compute/registry.cc',
+ 'compute/kernels/chunked_internal.cc',
+ 'compute/kernels/codegen_internal.cc',
+ 'compute/kernels/ree_util_internal.cc',
+ 'compute/kernels/scalar_cast_boolean.cc',
+ 'compute/kernels/scalar_cast_dictionary.cc',
+ 'compute/kernels/scalar_cast_extension.cc',
+ 'compute/kernels/scalar_cast_internal.cc',
+ 'compute/kernels/scalar_cast_nested.cc',
+ 'compute/kernels/scalar_cast_numeric.cc',
+ 'compute/kernels/scalar_cast_string.cc',
+ 'compute/kernels/scalar_cast_temporal.cc',
+ 'compute/kernels/util_internal.cc',
+ 'compute/kernels/vector_hash.cc',
+ 'compute/kernels/vector_selection.cc',
+ 'compute/kernels/vector_selection_filter_internal.cc',
+ 'compute/kernels/vector_selection_internal.cc',
+ 'compute/kernels/vector_selection_take_internal.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'arrow_io': {
+ 'sources': [
+ 'io/buffered.cc',
+ 'io/caching.cc',
+ 'io/compressed.cc',
+ 'io/file.cc',
+ 'io/hdfs.cc',
+ 'io/hdfs_internal.cc',
+ 'io/interfaces.cc',
+ 'io/memory.cc',
+ 'io/slow.cc',
+ 'io/stdio.cc',
+ 'io/transform.cc',
+ ],
+ 'include_dirs': [
+ include_dir,
+ include_directories('../../thirdparty/hadoop/include'),
+ ],
+ 'dependencies': [dl_dep],
+ },
+ 'arrow_util': {
+ 'sources': [
+ 'util/align_util.cc',
+ 'util/async_util.cc',
+ 'util/atfork_internal.cc',
+ 'util/basic_decimal.cc',
+ 'util/bit_block_counter.cc',
+ 'util/bit_run_reader.cc',
+ 'util/bit_util.cc',
+ 'util/bitmap.cc',
+ 'util/bitmap_builders.cc',
+ 'util/bitmap_ops.cc',
+ 'util/bpacking.cc',
+ 'util/byte_size.cc',
+ 'util/cancel.cc',
+ 'util/compression.cc',
+ 'util/counting_semaphore.cc',
+ 'util/cpu_info.cc',
+ 'util/crc32.cc',
+ 'util/debug.cc',
+ 'util/decimal.cc',
+ 'util/delimiting.cc',
+ 'util/dict_util.cc',
+ 'util/fixed_width_internal.cc',
+ 'util/float16.cc',
+ 'util/formatting.cc',
+ 'util/future.cc',
+ 'util/hashing.cc',
+ 'util/int_util.cc',
+ 'util/io_util.cc',
+ 'util/list_util.cc',
+ 'util/logger.cc',
+ 'util/logging.cc',
+ 'util/key_value_metadata.cc',
+ 'util/memory.cc',
+ 'util/mutex.cc',
+ 'util/ree_util.cc',
+ 'util/string.cc',
+ 'util/string_builder.cc',
+ 'util/task_group.cc',
+ 'util/tdigest.cc',
+ 'util/thread_pool.cc',
+ 'util/time.cc',
+ 'util/tracing.cc',
+ 'util/trie.cc',
+ 'util/union_util.cc',
+ 'util/unreachable.cc',
+ 'util/uri.cc',
+ 'util/utf8.cc',
+ 'util/value_parsing.cc',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'memory_pool': {
+ 'sources': ['memory_pool.cc'],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+ 'vendored': {
+ 'sources': [
+ 'vendored/base64.cpp',
+ 'vendored/datetime.cpp',
+ 'vendored/double-conversion/bignum-dtoa.cc',
+ 'vendored/double-conversion/bignum.cc',
+ 'vendored/double-conversion/cached-powers.cc',
+ 'vendored/double-conversion/double-to-string.cc',
+ 'vendored/double-conversion/fast-dtoa.cc',
+ 'vendored/double-conversion/fixed-dtoa.cc',
+ 'vendored/double-conversion/string-to-double.cc',
+ 'vendored/double-conversion/strtod.cc',
+ 'vendored/musl/strptime.c',
+ 'vendored/uriparser/UriCommon.c',
+ 'vendored/uriparser/UriCompare.c',
+ 'vendored/uriparser/UriEscape.c',
+ 'vendored/uriparser/UriFile.c',
+ 'vendored/uriparser/UriIp4.c',
+ 'vendored/uriparser/UriIp4Base.c',
+ 'vendored/uriparser/UriMemory.c',
+ 'vendored/uriparser/UriNormalize.c',
+ 'vendored/uriparser/UriNormalizeBase.c',
+ 'vendored/uriparser/UriParse.c',
+ 'vendored/uriparser/UriParseBase.c',
+ 'vendored/uriparser/UriQuery.c',
+ 'vendored/uriparser/UriRecompose.c',
+ 'vendored/uriparser/UriResolve.c',
+ 'vendored/uriparser/UriShorten.c',
+ ],
+ 'include_dirs': [include_dir],
+ 'dependencies': [],
+ },
+}
+
+objlibs = []
+foreach key, val : objlib_sources
+ slib = static_library(
+ key,
+ sources: val['sources'],
+ include_directories: val['include_dirs'],
+ dependencies: val['dependencies'],
+ build_by_default: false,
+ )
+ objlibs += slib.extract_all_objects(recursive: true)
+endforeach
+
+arrow_srcs = [
+ 'builder.cc',
+ 'buffer.cc',
+ 'chunked_array.cc',
+ 'chunk_resolver.cc',
+ 'compare.cc',
+ 'config.cc',
+ 'datum.cc',
+ 'device.cc',
+ 'device_allocation_type_set.cc',
+ 'extension_type.cc',
+ 'extension/bool8.cc',
+ 'extension/json.cc',
+ 'extension/uuid.cc',
+ 'pretty_print.cc',
+ 'record_batch.cc',
+ 'result.cc',
+ 'scalar.cc',
+ 'sparse_tensor.cc',
+ 'status.cc',
+ 'table.cc',
+ 'table_builder.cc',
+ 'tensor.cc',
+ 'tensor/coo_converter.cc',
+ 'tensor/csf_converter.cc',
+ 'tensor/csx_converter.cc',
+ 'type.cc',
+ 'type_traits.cc',
+ 'visitor.cc',
+ 'c/bridge.cc',
+ 'c/dlpack.cc',
+]
+
+arrow_lib = library(
+ 'arrow',
+ sources: [arrow_srcs],
+ objects: objlibs,
+ include_directories: [include_dir],
+ install: true,
+ # compute/expression.cc may have undefined IPC symbols in non-IPC builds
Review Comment:
No problem - see https://github.com/apache/arrow/issues/45512
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on code in PR #45441:
URL: https://github.com/apache/arrow/pull/45441#discussion_r1952356491
##########
cpp/src/arrow/meson.build:
##########
@@ -0,0 +1,333 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include_dir = include_directories('..')
+
+dl_dep = dependency('dl')
+
+# Meson does not natively support object libraries
+# https://github.com/mesonbuild/meson/issues/13843
+objlib_sources = {
Review Comment:
I have a pretty poor understanding of how object libraries actually work, but I don't think we can just convert these to using the `library` call unless we want the linker to allow undefined symbols in these libraries as well (?)
Trying to do what I think you suggest generates a huge amount of errors like:
```
[7/96] Linking target src/arrow/libarrow_io.so
FAILED: src/arrow/libarrow_io.so
c++ -o src/arrow/libarrow_io.so src/arrow/libarrow_io.so.p/io_buffered.cc.o src/arrow/libarrow_io.so.p/io_caching.cc.o src/arrow/libarrow_io.so.p/io_compressed.cc.o src/arrow/libarrow_io.so.p/io_file.cc.o src/arrow/libarrow_io.so.p/io_hdfs.cc.o src/arrow/libarrow_io.so.p/io_hdfs_internal.cc.o src/arrow/libarrow_io.so.p/io_interfaces.cc.o src/arrow/libarrow_io.so.p/io_memory.cc.o src/arrow/libarrow_io.so.p/io_slow.cc.o src/arrow/libarrow_io.so.p/io_stdio.cc.o src/arrow/libarrow_io.so.p/io_transform.cc.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,libarrow_io.so -Wl,--end-group
/usr/bin/ld: src/arrow/libarrow_io.so.p/io_buffered.cc.o: in function `arrow::io::BufferedInputStream::SetBufferSize(long)':
buffered.cc:(.text+0x13a9): undefined reference to `arrow::Buffer::CheckCPU() const'
/usr/bin/ld: buffered.cc:(.text+0x13b1): undefined reference to `arrow::Buffer::CheckMutable() const'
/usr/bin/ld: buffered.cc:(.text+0x1407): undefined reference to `arrow::util::detail::StringStreamWrapper::StringStreamWrapper()'
/usr/bin/ld: buffered.cc:(.text+0x149e): undefined reference to `arrow::util::detail::StringStreamWrapper::str[abi:cxx11]()'
/usr/bin/ld: buffered.cc:(.text+0x14a6): undefined reference to `arrow::util::detail::StringStreamWrapper::~StringStreamWrapper()'
/usr/bin/ld: buffered.cc:(.text+0x14b6): undefined reference to `arrow::Status::Status(arrow::StatusCode, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-41816: [C++] Meson Build System Support [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on code in PR #45441:
URL: https://github.com/apache/arrow/pull/45441#discussion_r1958932465
##########
ci/scripts/cpp_test.sh:
##########
@@ -89,14 +89,21 @@ pushd ${build_dir}
if [ -z "${PYTHON}" ] && ! which python > /dev/null 2>&1; then
export PYTHON="${PYTHON:-python3}"
fi
-ctest \
+if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
+ ARROW_BUILD_EXAMPLES=OFF # TODO: Remove this
+ meson test \
+ --print-errorlogs \
+ "$@"
Review Comment:
For now we aren't actually building any tests - just creating an MRE for Meson with libarrow
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org