Skip to content

Add Apache Avro wrap - #2270

Open
stephanlachnit wants to merge 2 commits into
mesonbuild:masterfrom
stephanlachnit:p-avro-cpp
Open

stephanlachnit wants to merge 2 commits into
mesonbuild:masterfrom
stephanlachnit:p-avro-cpp

Conversation

@stephanlachnit

@stephanlachnit stephanlachnit commented Jul 15, 2025

Copy link
Copy Markdown
Collaborator

Adds a wrap for the C++ bindings of Apache Avro. Since it's only possible to build it without Boost using main, we need to wait until a new release.

TODO:

/cc @WillAyd

@stephanlachnit
stephanlachnit force-pushed the p-avro-cpp branch 5 times, most recently from f1fa5ae to 3146511 Compare July 15, 2025 10:10
@stephanlachnit

Copy link
Copy Markdown
Collaborator Author

Can we add program_names to a wrap for a program that might be disabled to be built or is that an issue?

@WillAyd WillAyd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cool - thanks for doing this!

Comment thread subprojects/packagefiles/avro-cpp/lang/c++/meson.build Outdated
Comment thread subprojects/packagefiles/avro-cpp/meson_options.txt Outdated
Comment thread releases.json
Comment thread subprojects/packagefiles/avro-cpp/meson_options.txt
@stephanlachnit

Copy link
Copy Markdown
Collaborator Author

@bgilbert any idea why the CI fails with this cryptic message:

Run ./tools/fake_tty.py ./tools/sanity_checks.py
  ./tools/fake_tty.py ./tools/sanity_checks.py
  shell: /usr/bin/bash -e {0}
  env:
    TEST_ANNOTATE_CONTEXT: yes
    TEST_SKIP_BUILD: yes
Traceback (most recent call last):
  File "/home/runner/work/wrapdb/wrapdb/./tools/fake_tty.py", line 6, in <module>
    sys.exit(os.waitstatus_to_exitcode(pty.spawn(sys.argv[1:])))
                                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/pty.py", line 195, in spawn
    os.execlp(argv[0], *argv)
  File "<frozen os>", line 563, in execlp
  File "<frozen os>", line 580, in execvp
  File "<frozen os>", line 603, in _execvpe
PermissionError: [Errno 13] Permission denied
Error: Process completed with exit code 1.

@bgilbert

Copy link
Copy Markdown
Collaborator

Can we add program_names to a wrap for a program that might be disabled

Yes, add a skip_program_check in ci_config.json.

any idea why the CI fails with this cryptic message

The patch to sanity_checks.py removes its executable bit for some reason.

image

Comment thread subprojects/packagefiles/avro-cpp/lang/c++/meson.build Outdated
Comment thread releases.json Outdated
Comment thread subprojects/avro-cpp.wrap Outdated
Comment thread subprojects/packagefiles/avro-cpp/lang/c++/meson.build Outdated
@stephanlachnit
stephanlachnit force-pushed the p-avro-cpp branch 7 times, most recently from a5213e5 to 9d80573 Compare August 31, 2025 15:58
@stephanlachnit

Copy link
Copy Markdown
Collaborator Author

@WillAyd how should the dependency be named? For avro-c the pkg-config file is named avro-c, but avro-cpp does not have a pkg-config file upstream. The CMake target is called Avro - should we go with that, or rather go with a more descriptive avro-cpp? Probably makes sense to add pkg-config support upstream then as well.

@stephanlachnit
stephanlachnit force-pushed the p-avro-cpp branch 3 times, most recently from 89395e7 to 586d6b9 Compare September 3, 2025 08:03
@WillAyd

WillAyd commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

Hmm following the c pattern it sounds like avro-cpp is best. @eli-schwartz may have a suggestion here as well

@eli-schwartz

Copy link
Copy Markdown
Member

We definitely want to align with upstream. I agree that given the name "avro-c" it makes a decent amount of sense to use "avro-cpp" as well.

Avro upstream has only added CMake package config files for avro-cpp, not for avro-c, and it did that in January which hasn't been incorporated in a release yet. So it can be changed.

https://issues.apache.org/jira/browse/AVRO-3088 asked for "this way one could just use find_package(avrocpp) but it looks like unfortunately a decision was made to provide find_package(Avro) instead, which would mean it will be hard to have consistent naming.

@WillAyd

WillAyd commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

FYI @wgtmac - you may be interested in the discussion around the package name for Avro

@stephanlachnit
stephanlachnit force-pushed the p-avro-cpp branch 11 times, most recently from 88f8e44 to 8cc69e6 Compare December 18, 2025 13:00
@stephanlachnit

Copy link
Copy Markdown
Collaborator Author

Ok, so I think I go the symbol visibility to work. There are some warning for certain inline methods but I don't think they are critical to fix. The only thing that is missing is the armv7 and x86 failure on Alpine, which seem to be actual 32-bit bugs. However, I don't think that those should be a blocker for WrapDB...?

In any case, we need to wait for 1.12.2 which includes the symbol visibility patch.

@eli-schwartz

Copy link
Copy Markdown
Member

The only thing that is missing is the armv7 and x86 failure on Alpine, which seem to be actual 32-bit bugs. However, I don't think that those should be a blocker for WrapDB...?

You are correct -- they aren't blockers, just a useful heads up. Please report them upstream anyway, of course. :)

@stephanlachnit
stephanlachnit force-pushed the p-avro-cpp branch 2 times, most recently from 6a7fec0 to ae7d15b Compare April 21, 2026 12:06
@stephanlachnit

Copy link
Copy Markdown
Collaborator Author

@martin-g @WillAyd any news on a 1.12.2 release? I saw apache/avro#3724 but not much activity otherwise

@martin-g

Copy link
Copy Markdown

I don't have any other information too.

@manuzhang

Copy link
Copy Markdown

@stephanlachnit avro 1.12.2 has been released, can you revive this PR?

@stephanlachnit
stephanlachnit force-pushed the p-avro-cpp branch 3 times, most recently from c09c9f9 to 7d2d15d Compare August 20, 2026 17:37
@stephanlachnit
stephanlachnit marked this pull request as ready for review August 20, 2026 17:41
@stephanlachnit

Copy link
Copy Markdown
Collaborator Author

@stephanlachnit avro 1.12.2 has been released, can you revive this PR?

Thanks for the headsup - I rebased and now it seems to work nicely (Alpine CI failures are unrelated).

…port symbols

Fine on Unix, but otherwise the CI will fail on Windows
@stephanlachnit

Copy link
Copy Markdown
Collaborator Author

There seems to be an interesting failure on x86 and armv7:

../subprojects/avro-cpp-1.12.2/test/DataFileTests.cc(428): error: in "DataFile tests_ test9.df/DataFileTest__testReaderSyncSeek": check num == count has failed [0 != 1000]
../subprojects/avro-cpp-1.12.2/test/DataFileTests.cc(430): error: in "DataFile tests_ test9.df/DataFileTest__testReaderSyncSeek": check actual.size() == count has failed [0 != 1000]
../subprojects/avro-cpp-1.12.2/test/DataFileTests.cc(469): error: in "DataFile tests_ test10.df/DataFileTest__testReaderSyncDiscovery": check sync_points_syncing == sync_points_reading has failed
../subprojects/avro-cpp-1.12.2/test/DataFileTests.cc(472): error: in "DataFile tests_ test10.df/DataFileTest__testReaderSyncDiscovery": check sync_points_syncing.size() > 10 has failed [1 <= 10]
../subprojects/avro-cpp-1.12.2/test/DataFileTests.cc(497): error: in "DataFile tests_ test11.df/DataFileTest__testReaderSplits": check actual_count == count has failed [0 != 1000]

@stephanlachnit

Copy link
Copy Markdown
Collaborator Author

@WillAyd if you want to take another at this PR, it is ready to be merged

@WillAyd WillAyd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants