openembedded/meta-openembedded

python3-protobuf not ussing cpp backend.

Opened this issue · 0 comments

Issue:
The current implementation of the python3-protobuf recipe has 2 issues. Tested this in Kirkstone release. At least problem one occurs in other releases, too.

1: The python3-protobuf recipe is using the Python backend which is very slow and should NOT be the default for protobuf. https://github.com/protocolbuffers/protobuf/tree/main/python#implementation-backends.
The current recipe is intended to use the cpp backend: https://github.com/openembedded/meta-openembedded/blob/kirkstone/meta-python/recipes-devtools/python/python3-protobuf_3.20.3.bb#L34
But this doesn't work! I tried to fix it locally by adding
SETUPTOOLS_BUILD_ARGS:append = " --cpp_implementation" to the recipe the the next error occurs

2: Both recipes
Python: https://github.com/openembedded/meta-openembedded/blob/kirkstone/meta-python/recipes-devtools/python/python3-protobuf_3.20.3.bb
cpp: https://github.com/openembedded/meta-openembedded/blob/kirkstone/meta-oe/recipes-devtools/protobuf/protobuf_3.19.6.bb
have different versions and don't work together. They need to point to the same version to get the cpp backend working.

Expected result:
Python protobuf should use cpp backend as default. To make this happen, we need to fix the dependency and make sure to provide same versions for both Python and cpp in a yocto released version.