Skip to content

protobuf: fix meson check for protoc and fix usage from contribs

Protobuf and protoc version naming changed starting after version 21.7.11.x, at version 22.x.y1. Other versioning changes during the 21.* cycle were made right before2.

The new versioning is described on the specific page from protocol buffers website3.

For instance, protoc from archlinux currently outputs version 25.3, leading to the following message if checking a 3-number version number like the version in the contribs:

Program protoc found: NO found 25.3 but need: '25.3.0' (/usr/bin/protoc)

After this patch we have the following with version 25.3:

Program protoc found: YES 25.3 25.3 (/usr/bin/protoc)

and with version 21.1 from contrib:

Program protoc found: YES 3.21.1 3.21.1

This MR also provides the protoc and luac binaries from the contribs to meson through the generated meson-machinefile, so that this problem can be tested locally with the contribs.

  1. https://protobuf.dev/news/2022-07-06/

  2. https://protobuf.dev/news/2022-05-06/

  3. https://protobuf.dev/support/version-support/

Merge request reports