Skip to content

Commit

Permalink
protobuf-c: Export native protoc
Browse files Browse the repository at this point in the history
configure detects protoc based on some pkgconfig logic which confuses
cross compilation and ends up choosing /usr/bin/protoc causing build
failures when host system has version mismatched protoc installed, it
works ok as long as compatible protoc is installed

Fixes
./protobuf-c/protobuf-c.pb.h:17:2: error: This file was generated by an older version of protoc which is
 ^

Signed-off-by: Khem Raj <raj.khem@gmail.com>
  • Loading branch information
kraj committed Nov 10, 2021
1 parent 3208388 commit bf1e71c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ S = "${WORKDIR}/git"

inherit autotools pkgconfig

export PROTOC = "${STAGING_BINDIR_NATIVE}/protoc"

# After several fix attempts there is still a race between generating
# t.test-full.pb.h and compiling cxx_generate_packed_data.c despite
# BUILT_SOURCES and explicit dependencies.
Expand Down

0 comments on commit bf1e71c

Please sign in to comment.