Skip to content

[C++] Allow more Flatbuffers versions to compile Arrow #45636

Closed as not planned
Closed as not planned

Description

@WillAyd

Describe the enhancement requested

Right now the project strictly requires the vendored version of flatbuffers, and places static assertions on main that the version of flatbuffers being used is 23.5.26

Instead of forcing the use of the vendored copy, we could open the project up to detecting a system dependency first, only falling back to the vendored copy when none is detected.

The origin of this conversation stems from the setup of the Meson build system in #45596 (comment)

@kou

Component(s)

C++

Activity

  1. WillAyd commented on Mar 5, 2025

    @WillAyd
    ContributorAuthor

    So the more I've looked at this I've started to question if its worth the effort. From what I can read, it is a hard requirement for flatbuffers that the compiler and runtime versions match exactly. The odds of that are pretty low, so maybe not worth all of the extra CMake work here?

    @kou

  2. changed the title [-]Use System Provided Flatbuffers[/-] [+][C++] Use System Provided Flatbuffers[/+] on Mar 6, 2025
  3. kou commented on Mar 6, 2025

    @kou
    Member

    I thought this is one of blockers of Meson support. If so, I'll take a look at this.

  4. WillAyd commented on Mar 6, 2025

    @WillAyd
    ContributorAuthor

    I think the easiest path to Meson support would be to upgrade the vendored flatbuffers that CMake uses to a version that also exists in Meson's WrapDB. I'll investigate that further

  5. kou commented on Mar 6, 2025

    @kou
    Member

    OK. Could you open a separated issue for upgrading the vendored Flatbuffers?
    We may work on using system provided Flatbuffers later.

  6. WillAyd commented on Mar 7, 2025

    @WillAyd
    ContributorAuthor

    Makes sense - see #45694

  7. WillAyd commented on Apr 22, 2025

    @WillAyd
    ContributorAuthor

    Closing as I don't think it is valuable to do this - flatbuffers requires the version used to create the proto files is exactly the same version used to compile them. It seems highly unlikely Arrow can find a system installed version that satisfies that requirement

  8. WillAyd commented on May 8, 2025

    @WillAyd
    ContributorAuthor

    Actually I think there is still value in this. If Arrow is used as a subproject of another project, then by nature of how it distributes flatbuffers-generated code today it requires that the host system use a specific version of flatbuffers even for the main project, which I think is rather limiting.

    Instead of distributing the generated files as part of the source, we may want to look into generating the files during the build, so that we can open up flatbuffers to more than just a single version

  9. reopened this on May 8, 2025
  10. WillAyd commented on May 9, 2025

    @WillAyd
    ContributorAuthor

    See also the conversation here mesonbuild/wrapdb#2099 (comment)

  11. changed the title [-][C++] Use System Provided Flatbuffers[/-] [+][C++] Allow more Flatbuffers versions to compile Arrow[/+] on May 9, 2025
  12. github-actions commented on May 21, 2026

    @github-actions

    This issue has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this issue will be closed in 14 days. If this improvement is still desired but has no current owner, please add the 'Status: needs champion' label.

  13. added
    Status: stale-warningIssues and PRs flagged as stale which are due to be closed if no indication otherwise
    on May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions