Skip to content

protobuf-compiler not including the protobuf compiler (in sdk) #628

@DAdolfsson

Description

@DAdolfsson

Hi,
I recently attempted to assemble a sdk for one of my colleagues but we had problems.

The SDK was successfully built but no protoc compiler was included.
From what i can tell it was not included in the nativesdk-protobuf-compiler package.

I am far from an expert in this, and lots of the recipe goes above my head.
But, to resolve my issues i changed a single line that looked wrong in the recipe:

diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.5.bb b/meta-oe/recipes-devtools/protobuf/protobuf_3.21.5.bb
index 0bc9cbedc..e7486857f 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.5.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf_3.21.5.bb
@@ -27,7 +27,7 @@ inherit cmake pkgconfig ptest
 PACKAGECONFIG ??= ""
 PACKAGECONFIG:class-native ?= "compiler"
 PACKAGECONFIG[python] = ",,"
-PACKAGECONFIG[compiler] = "-Dprotobuf_BUILD_PROTOC_BINARIES=ON,-Dprotobuf_BUILD_PROTOC_BINARIES=OFF"
+PACKAGECONFIG[compiler] = "-Dprotobuf_BUILD_PROTOC_BINARIES=ON"
 
 EXTRA_OECMAKE += "\
     -Dprotobuf_BUILD_SHARED_LIBS=ON \

From my understanding of the precompiler, by adding the same variable twice with different values it will only respect the last one.

Best Regards
Daniel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions