Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-45589: [C++] Enable singular test in Meson configuration #45596

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WillAyd
Copy link
Contributor

@WillAyd WillAyd commented Feb 20, 2025

Rationale for this change

Adding this singular test helps us make incremental progress on Meson as a build system generator

What changes are included in this PR?

A single array-test for libarrow is being added

Are these changes tested?

Yes - see CI

Are there any user-facing changes?

No - this is only for developers

Copy link

⚠️ GitHub issue #45589 has been automatically assigned in GitHub to PR creator.

gmock_dep = disabler()
endif

arrow_test_lib = static_library(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The static_library is required here because the Meson wrap dependency for gtest only provides consumers with the source files, and when using that in two different shared libraries then linking together you get an ODR violation.

See also mesonbuild/wrapdb#1937

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Feb 20, 2025
@@ -56,4 +56,10 @@ if git_description == ''
git_description = run_command('git', 'describe', '--tags', check: false).stdout().strip()
endif

needs_integration = false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to follow along with the CMake configuration. The option doesn't yet exist in Meson so I've hard-coded for now

Comment on lines 113 to +116
meson setup \
--prefix=${MESON_PREFIX:-${ARROW_HOME}} \
--buildtype=${ARROW_BUILD_TYPE:-debug} \
-Dtests=true \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
meson setup \
--prefix=${MESON_PREFIX:-${ARROW_HOME}} \
--buildtype=${ARROW_BUILD_TYPE:-debug} \
-Dtests=true \
function meson_boolean() {
if [ "${1}" = "ON" ]; then
echo "true"
else
echo "false"
fi
}
meson setup \
--prefix=${MESON_PREFIX:-${ARROW_HOME}} \
--buildtype=${ARROW_BUILD_TYPE:-debug} \
-Dtests=$(meson_boolean ${ARROW_BUILD_TESTS:-OFF}) \

Comment on lines +49 to +51
subprojects/*
!subprojects/packagefiles
!subprojects/*.wrap
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
subprojects/*
!subprojects/packagefiles
!subprojects/*.wrap
/subprojects/*
!/subprojects/packagefiles
!/subprojects/*.wrap

@kou
Copy link
Member

kou commented Feb 22, 2025

@github-actions crossbow submit test-conda-cpp-meson

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Feb 22, 2025
Copy link

Revision: 65779fa

Submitted crossbow builds: ursacomputing/crossbow @ actions-b0685743f1

Task Status
test-conda-cpp-meson GitHub Actions

@kou
Copy link
Member

kou commented Feb 22, 2025

https://github.com/ursacomputing/crossbow/actions/runs/13468923214/job/37639840316#step:6:448

Run-time dependency rapidjson found: NO (tried pkgconfig and cmake)

Hmm. It's strange that RapidJSON wasn't found. RapidJSON exists in the environment:

https://github.com/ursacomputing/crossbow/actions/runs/13468923214/job/37639840316#step:6:351

rapidjson                 1.1.0.post20240409      hac33072_1    conda-forge

@WillAyd
Copy link
Contributor Author

WillAyd commented Feb 25, 2025

Sorry I've been away for a few days.

Hmm. It's strange that RapidJSON wasn't found. RapidJSON exists in the environment:

In spite of Meson not finding the system RapidJSON, it does still fall back to using the wrap file to download an appropriate copy. Seems like the error message from that run has to do with resolving the filepath to the bundled flatbuffers. Will investigate further

@WillAyd
Copy link
Contributor Author

WillAyd commented Feb 25, 2025

FWIW it might even be worthwhile to use Meson's wrap and subproject systems for flatbuffers instead of using a vendored copy. The limiting factor was that Arrow seems to statically assert the required major/minor version of flatbuffers, and the minor version requested does not exist in the wrapdb.

If there is some flexibility on that version check we could go down that path

@kou
Copy link
Member

kou commented Feb 26, 2025

We should add support for system Flatbuffers, right? (We can fallback to the vendored Flatbuffers and generated files when system Flatbuffers don't exist.)

Could you open an issue for this? Let's discuss this in the new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants