protobuf: upgrade 3.21.12 -> 4.22.2
v2 cover protobuf: upgrade 3.21.12 -> 4.22.2
From: Xiangyu Chen <[email protected]>
The v2[1] patch for upgrading protobuf from 3.21.12 to 4.22.2.
After upgrading the protobuf, the package protobuf-c cannot compile anymore[2] due to the latest version protobuf is using c++14 and some of API name has been changed, so use another patch to add support of protobuf latest version in protobuf-c.
Ref:
[1] v1 thread please refer to https://lists.openembedded.org/g/openembedded-devel/message/101784
[2] https://errors.yoctoproject.org/Errors/Details/698756/
Xiangyu Chen (2):
protobuf: upgrade 3.21.12 -> 4.22.2
protobuf-c: add support of protobuf-4.22.x
.../0001-add-support-of-protobuf-4.22.x.patch | 332 ++++++++++++++++++
.../protobuf/protobuf-c_1.4.1.bb | 5 +-
...e-respect-CXX-LDFLAGS-variables-fix-.patch | 15 +-
...protobuf_3.21.12.bb => protobuf_4.22.2.bb} | 11 +-
4 files changed, 353 insertions(+), 10 deletions(-)
create mode 100644 meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch
rename meta-oe/recipes-devtools/protobuf/{protobuf_3.21.12.bb => protobuf_4.22.2.bb} (86%)Signature · 1 line
2.34.1
PATCH v2 1/2 protobuf: upgrade 3.21.12 -> 4.22.2
From: Xiangyu Chen <[email protected]>
---
...efile-respect-CXX-LDFLAGS-variables-fix-.patch | 15 +++++++++------
.../{protobuf_3.21.12.bb => protobuf_4.22.2.bb} | 11 ++++++++---
2 files changed, 17 insertions(+), 9 deletions(-)
rename meta-oe/recipes-devtools/protobuf/{protobuf_3.21.12.bb => protobuf_4.22.2.bb} (86%)meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +9 -6
@@ -30,7 +30,7 @@ Signed-off-by: Leon Anavi <[email protected]> 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/Makefile b/examples/Makefile -index 1c7ec8d63..85f591231 100644 +index ef7a4ef58..7206e14e1 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -2,6 +2,8 @@
@@ -42,17 +42,20 @@ index 1c7ec8d63..85f591231 100644 all: cpp java python cpp: add_person_cpp list_people_cpp -@@ -40,11 +42,11 @@ protoc_middleman_dart: addressbook.proto +@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto add_person_cpp: add_person.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed -- c++ -std=c++11 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` -+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp +- c++ -std=c++14 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp #$(CXX) -std=c++17 $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp list_people_cpp: list_people.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed -- c++ -std=c++11 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf` -+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp +- c++ -std=c++14 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf` ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp #$(CXX) -std=c++17 $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp add_person_dart: add_person.dart protoc_middleman_dart +-- +2.34.1 +
meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +8 -3
@@ -7,12 +7,12 @@ SECTION = "console/tools" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" -DEPENDS = "zlib" +DEPENDS = "zlib abseil-cpp" DEPENDS:append:class-target = " protobuf-native" -SRCREV = "f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c" +SRCREV = "81f89d509d6771dcccb619cbe26ac86cec472582" -SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=21.x;protocol=https \ +SRC_URI = "gitsm://github.com/protocolbuffers/protobuf.git;branch=22.x;protocol=https \ file://run-ptest \ file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ file://0001-Fix-linking-error-with-ld-gold.patch \
@@ -35,6 +35,7 @@ EXTRA_OECMAKE += "\ -Dprotobuf_BUILD_LIBPROTOC=ON \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_BUILD_EXAMPLES=OFF \ + -Dprotobuf_ABSL_PROVIDER="package" \ " TEST_SRC_DIR = "examples"
@@ -52,7 +53,11 @@ do_compile_ptest() { cp ${S}/${TEST_SRC_DIR}/Makefile "${B}/${TEST_SRC_DIR}/" sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Cflags:|Cflags: -I${WORKDIR}/recipe-sysroot-native${includedir} |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Libs:|Libs: -L${B}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -L${WORKDIR}/recipe-sysroot-native/usr/lib|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -labsl_log_internal_check_op |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -labsl_log_internal_message |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" # Until out-of-tree build of examples is supported, we have to use this approach sed -e 's|../src/google/protobuf/.libs/timestamp.pb.o|${B}/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o|' -i "${B}/${TEST_SRC_DIR}/Makefile" export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}"
Signature · 1 line
2.34.1
it stil fails
Summary: 2 tasks failed:
virtual:native:/mnt/b/yoe/master/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb:do_compile /mnt/b/yoe/master/sources/meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb:do_configure
Summary: There were 4 ERROR messages, returning a non-zero exit code.
Quoted 95 lines · Xiangyu Chen
From: Xiangyu Chen <[email protected]>
Signed-off-by Xiangyu Chen <[email protected]>--- ...efile-respect-CXX-LDFLAGS-variables-fix-.patch | 15 +++++++++------ .../{protobuf_3.21.12.bb => protobuf_4.22.2.bb} | 11 ++++++++--- 2 files changed, 17 insertions(+), 9 deletions(-) rename meta-oe/recipes-devtools/protobuf/{protobuf_3.21.12.bb => protobuf_4.22.2.bb} (86%)meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +9
-6@@ -30,7 +30,7 @@ Signed-off-by: Leon Anavi <[email protected]> 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/Makefile b/examples/Makefile -index 1c7ec8d63..85f591231 100644 +index ef7a4ef58..7206e14e1 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -2,6 +2,8 @@@@ -42,17 +42,20 @@ index 1c7ec8d63..85f591231 100644 all: cpp java python cpp: add_person_cpp list_people_cpp -@@ -40,11 +42,11 @@ protoc_middleman_dart: addressbook.proto +@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto add_person_cpp: add_person.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed -- c++ -std=c++11 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` -+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp +- c++ -std=c++14 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp #$(CXX) -std=c++17 $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp list_people_cpp: list_people.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed -- c++ -std=c++11 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf` -+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp +- c++ -std=c++14 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf` ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp #$(CXX) -std=c++17 $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp add_person_dart: add_person.dart protoc_middleman_dart +-- +2.34.1 +meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +8
-4@@ -7,12 +7,12 @@ SECTION = "console/tools" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" -DEPENDS = "zlib" +DEPENDS = "zlib abseil-cpp" DEPENDS:append:class-target = " protobuf-native" -SRCREV = "f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c" +SRCREV = "81f89d509d6771dcccb619cbe26ac86cec472582" -SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=21.x;protocol=https \ +SRC_URI = "gitsm://github.com/protocolbuffers/protobuf.git;branch=22.x;protocol=https \ file://run-ptest \ file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ file://0001-Fix-linking-error-with-ld-gold.patch \@@ -35,6 +35,7 @@ EXTRA_OECMAKE += "\ -Dprotobuf_BUILD_LIBPROTOC=ON \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_BUILD_EXAMPLES=OFF \ + -Dprotobuf_ABSL_PROVIDER="package" \ " TEST_SRC_DIR = "examples"@@ -52,7 +53,11 @@ do_compile_ptest() { cp ${S}/${TEST_SRC_DIR}/Makefile "${B}/${TEST_SRC_DIR}/" sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Cflags:|Cflags: -I${WORKDIR}/recipe-sysroot-native${includedir} |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Libs:|Libs: -L${B}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -L${WORKDIR}/recipe-sysroot-native/usr/lib|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -labsl_log_internal_check_op |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -labsl_log_internal_message |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" # Until out-of-tree build of examples is supported, we have to use this approach sed -e 's|../src/google/protobuf/.libs/timestamp.pb.o|${B}/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o|' -i "${B}/${TEST_SRC_DIR}/Makefile" export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}" --2.34.1
Hello,
Quoted 9 lines · Khem Raj
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.it stil fails
Summary: 2 tasks failed:
virtual:native:/mnt/b/yoe/master/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb:do_compile /mnt/b/yoe/master/sources/meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb:do_configure
Summary: There were 4 ERROR messages, returning a non-zero exit code.
Could you please help to share the error log with me? thanks.
I applied the protobuf-c related patch cannot reproduce in my local setup with "bitbake protobuf-c -c cleanall;bitbake protobuf-c" .
Br,
Xiangyu
Quoted 97 lines
Quoted 94 lines · Xiangyu Chen
From: Xiangyu Chen <[email protected]>
Signed-off-by Xiangyu Chen <[email protected]>--- ...efile-respect-CXX-LDFLAGS-variables-fix-.patch | 15 +++++++++------ .../{protobuf_3.21.12.bb => protobuf_4.22.2.bb} | 11 ++++++++--- 2 files changed, 17 insertions(+), 9 deletions(-)rename meta-oe/recipes-devtools/protobuf/{protobuf_3.21.12.bb => protobuf_4.22.2.bb} (86%)
meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +9
-6@@ -30,7 +30,7 @@ Signed-off-by: Leon Anavi <[email protected]> 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/Makefile b/examples/Makefile -index 1c7ec8d63..85f591231 100644 +index ef7a4ef58..7206e14e1 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -2,6 +2,8 @@@@ -42,17 +42,20 @@ index 1c7ec8d63..85f591231 100644 all: cpp java python cpp: add_person_cpp list_people_cpp -@@ -40,11 +42,11 @@ protoc_middleman_dart: addressbook.proto +@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto add_person_cpp: add_person.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed -- c++ -std=c++11 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` -+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp +- c++ -std=c++14 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp #$(CXX) -std=c++17 $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp list_people_cpp: list_people.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed -- c++ -std=c++11 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf` -+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp +- c++ -std=c++14 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf` ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp #$(CXX) -std=c++17 $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp add_person_dart: add_person.dart protoc_middleman_dart +-- +2.34.1 +meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +8
-4@@ -7,12 +7,12 @@ SECTION = "console/tools" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" -DEPENDS = "zlib" +DEPENDS = "zlib abseil-cpp" DEPENDS:append:class-target = " protobuf-native" -SRCREV = "f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c" +SRCREV = "81f89d509d6771dcccb619cbe26ac86cec472582" -SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=21.x;protocol=https \ +SRC_URI = "gitsm://github.com/protocolbuffers/protobuf.git;branch=22.x;protocol=https \ file://run-ptest \ file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ file://0001-Fix-linking-error-with-ld-gold.patch \@@ -35,6 +35,7 @@ EXTRA_OECMAKE += "\ -Dprotobuf_BUILD_LIBPROTOC=ON \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_BUILD_EXAMPLES=OFF \ + -Dprotobuf_ABSL_PROVIDER="package" \ " TEST_SRC_DIR = "examples"@@ -52,7 +53,11 @@ do_compile_ptest() { cp ${S}/${TEST_SRC_DIR}/Makefile "${B}/${TEST_SRC_DIR}/" sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Cflags:|Cflags: -I${WORKDIR}/recipe-sysroot-native${includedir} |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Libs:|Libs: -L${B}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -L${WORKDIR}/recipe-sysroot-native/usr/lib|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -labsl_log_internal_check_op |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -labsl_log_internal_message |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" # Until out-of-tree build of examples is supported, we have to use this approach sed -e 's|../src/google/protobuf/.libs/timestamp.pb.o|${B}/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o|' -i "${B}/${TEST_SRC_DIR}/Makefile" export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}" --2.34.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
Quoted 9 lines · Xiangyu Chen
Hello,
Quoted 5 lines · Khem Raj
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.it stil fails
Quoted 9 lines
Quoted 4 lines
Summary: 2 tasks failed:
virtual:native:/mnt/b/yoe/master/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb:do_compile /mnt/b/yoe/master/sources/meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb:do_configure
Summary: There were 4 ERROR messages, returning a non-zero exit code.Could you please help to share the error log with me? thanks.
I applied the protobuf-c related patch cannot reproduce in my local setup with "bitbake protobuf-c -c cleanall;bitbake protobuf-c" .
Upgrading protobuf caused the mosh compile error has already fixed and sent a patch to mosh upstream[1], this commit will contain in V3 patch,
but regarding protobuf-c, after applying the patch that was sent to oe-dev list[2] yesterday is building normal in my local setup. could you help to
share the error log which happens on build server? thanks!
[1] https://github.com/mobile-shell/mosh/pull/1266
[2] https://lists.openembedded.org/g/openembedded-devel/message/101797
Thanks!
Quoted 134 lines
Br,
Xiangyu
Quoted 112 lines
Quoted 109 lines · Xiangyu Chen
From: Xiangyu Chen <[email protected]>
Signed-off-by Xiangyu Chen <[email protected]>---
...efile-respect-CXX-LDFLAGS-variables-fix-.patch | 15
+++++++++------
.../{protobuf_3.21.12.bb => protobuf_4.22.2.bb} | 11 ++++++++---2 files changed, 17 insertions(+), 9 deletions(-)rename meta-oe/recipes-devtools/protobuf/{protobuf_3.21.12.bb => protobuf_4.22.2.bb} (86%)
meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +0
-0index
36c3c597a..7c4bf260e100644
---a/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch
+++b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patchmeta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +0
-0@@ -30,7 +30,7 @@ Signed-off-by: Leon Anavi <[email protected]> 1 file changed, 4 insertions(+), 2 deletions(-)diff --git a/examples/Makefile b/examples/Makefile
meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +1
-1-index 1c7ec8d63..85f591231 100644 +index ef7a4ef58..7206e14e1 100644--- a/examples/Makefile
+++ b/examples/Makefile
@@ -2,6 +2,8 @@meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +0
-0@@ -42,17 +42,20 @@ index 1c7ec8d63..85f591231 100644all: cpp java python
cpp: add_person_cpp
list_people_cpp
-@@ -40,11 +42,11 @@protoc_middleman_dart: addressbook.proto +@@ -41,11 +43,11 @@protoc_middleman_dart: addressbook.proto
add_person_cpp: add_person.ccprotoc_middleman
pkg-config --cflags protobuf # fails if protobuf is not installed
-- c++ -std=c++11 add_person.cc addressbook.pb.cc -oadd_person_cpppkg-config --cflags --libs protobuf
-+ $(CXX) $(CXXFLAGS) $(LDFLAGS)../src/google/protobuf/.libs/timestamp.pb.o$(PROTOBUF) add_person.cc addressbook.pb.cc -oadd_person_cpp
+- c++ -std=c++14 add_person.cc addressbook.pb.cc -oadd_person_cpppkg-config --cflags --libs protobuf
++ $(CXX) $(CXXFLAGS) $(LDFLAGS)../src/google/protobuf/.libs/timestamp.pb.o$(PROTOBUF) add_person.cc addressbook.pb.cc -oadd_person_cpp#$(CXX) -std=c++17 $(PROTOBUF) add_person.cc addressbook.pb.cc -oadd_person_cpp
list_people_cpp: list_people.ccprotoc_middleman
pkg-config --cflags protobuf # fails if protobuf is not installed
-- c++ -std=c++11 list_people.cc addressbook.pb.cc -olist_people_cpppkg-config --cflags --libs protobuf
-+ $(CXX) $(CXXFLAGS) $(LDFLAGS)../src/google/protobuf/.libs/timestamp.pb.o$(PROTOBUF) list_people.cc addressbook.pb.cc -olist_people_cpp+- c++ -std=c++14 list_people.cc addressbook.pb.cc -olist_people_cpppkg-config --cflags --libs protobuf
++ $(CXX) $(CXXFLAGS) $(LDFLAGS)../src/google/protobuf/.libs/timestamp.pb.o$(PROTOBUF) list_people.cc addressbook.pb.cc -olist_people_cpp#$(CXX) -std=c++17 $(PROTOBUF) list_people.cc addressbook.pb.cc -olist_people_cpp
add_person_dart: add_person.dartprotoc_middleman_dart+--
+2.34.1meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +1
-0+meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +0
-0@@ -7,12 +7,12 @@ SECTION = "console/tools"LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM= "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b"meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +1
-1-DEPENDS = "zlib" +DEPENDS = "zlib abseil-cpp"DEPENDS:append:class-target = " protobuf-native"
meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +1
-2-SRCREV = "f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c" +SRCREV = "81f89d509d6771dcccb619cbe26ac86cec472582" -SRC_URI ="
git://github.com/protocolbuffers/protobuf.git;branch=21.x;protocol=https\
+SRC_URI = "gitsm://github.com/protocolbuffers/protobuf.git;branch=22.x;protocol=https \
file://run-ptest \
file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \
file://0001-Fix-linking-error-with-ld-gold.patch \meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +1
-0@@ -35,6 +35,7 @@ EXTRA_OECMAKE += "\ -Dprotobuf_BUILD_LIBPROTOC=ON \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_BUILD_EXAMPLES=OFF \ + -Dprotobuf_ABSL_PROVIDER="package" \"
TEST_SRC_DIR= "examples"meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +0
-0@@ -52,7 +53,11 @@ do_compile_ptest() {cp ${S}/${TEST_SRC_DIR}/Makefile "${B}/${TEST_SRC_DIR}/"
sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"+ sed -e 's|Cflags:|Cflags:
-I${WORKDIR}/recipe-sysroot-native${includedir} |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
sed -e 's|Libs:|Libs: -L${B}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs:
-L${WORKDIR}/recipe-sysroot-native/usr/lib|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
+ sed -e 's|Libs:|Libs: -labsl_log_internal_check_op |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
+ sed -e 's|Libs:|Libs: -labsl_log_internal_message |' -iQuoted 8 lines
Quoted 8 lines
"${B}/${TEST_SRC_DIR}/protobuf.pc"
# Until out-of-tree build of examples is supported, we have to use this approach
sed -e 's|../src/google/protobuf/.libs/timestamp.pb.o|${B}/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o|' -i "${B}/${TEST_SRC_DIR}/Makefile"
export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}"Signature · 1 line
2.34.1-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#101802): https://lists.openembedded.org/g/openembedded-devel/message/101802
Mute This Topic: https://lists.openembedded.org/mt/97900181/7175143
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 25 lines · Xiangyu Chen
Hi,
Quoted 15 lines · Xiangyu Chen
Hello,
Quoted 10 lines · Khem Raj
CAUTION: This email comes from a non Wind River email account! Do not click links or open attachments unless you recognize the sender and know the content is safe.
it stil fails
Summary: 2 tasks failed:
virtual:native:/mnt/b/yoe/master/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb:do_compile /mnt/b/yoe/master/sources/meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb:do_configure
Summary: There were 4 ERROR messages, returning a non-zero exit code.Quoted 5 lines
Could you please help to share the error log with me? thanks.
I applied the protobuf-c related patch cannot reproduce in my local setup with "bitbake protobuf-c -c cleanall;bitbake protobuf-c" .
Quoted 8 lines
Upgrading protobuf caused the mosh compile error has already fixed and sent a patch to mosh upstream[1], this commit will contain in V3 patch,
but regarding protobuf-c, after applying the patch that was sent to oe-dev list[2] yesterday is building normal in my local setup. could you help to
share the error log which happens on build server? thanks!
Try building with clang perhaps thats is whats failing.
Quoted 164 lines
[1] https://github.com/mobile-shell/mosh/pull/1266
[2] https://lists.openembedded.org/g/openembedded-devel/message/101797
Thanks!
Quoted 154 lines
Br,
Xiangyu
Quoted 132 lines
Quoted 129 lines · Xiangyu Chen
From: Xiangyu Chen <[email protected]>
Signed-off-by Xiangyu Chen <[email protected]>--- ...efile-respect-CXX-LDFLAGS-variables-fix-.patch | 15 +++++++++------ .../{protobuf_3.21.12.bb => protobuf_4.22.2.bb} | 11 ++++++++--- 2 files changed, 17 insertions(+), 9 deletions(-)rename meta-oe/recipes-devtools/protobuf/{protobuf_3.21.12.bb =>
protobuf_4.22.2.bb} (86%)diff --git
a/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patchb/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patchindex
36c3c597a..7c4bf260e100644
---a/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch
+++b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patchmeta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +2
-2@@ -30,7 +30,7 @@ Signed-off-by: Leon Anavi <[email protected]> 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/Makefile b/examples/Makefile -index 1c7ec8d63..85f591231 100644 +index ef7a4ef58..7206e14e1 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -2,6 +2,8 @@@@ -42,17 +42,20 @@ index 1c7ec8d63..85f591231 100644 all: cpp java python cpp: add_person_cpp list_people_cpp -@@ -40,11 +42,11 @@ protoc_middleman_dart: addressbook.proto +@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto add_person_cpp: add_person.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is notinstalled
-- c++ -std=c++11 add_person.cc addressbook.pb.cc -oadd_person_cpppkg-config --cflags --libs protobuf
-+ $(CXX) $(CXXFLAGS) $(LDFLAGS)../src/google/protobuf/.libs/timestamp.pb.o$(PROTOBUF) add_person.cc addressbook.pb.cc -oadd_person_cpp
+- c++ -std=c++14 add_person.cc addressbook.pb.cc -oadd_person_cpppkg-config --cflags --libs protobuf
++ $(CXX) $(CXXFLAGS) $(LDFLAGS)../src/google/protobuf/.libs/timestamp.pb.o$(PROTOBUF) add_person.cc addressbook.pb.cc -oadd_person_cpp#$(CXX) -std=c++17 $(PROTOBUF) add_person.cc addressbook.pb.cc -oadd_person_cpp
list_people_cpp: list_people.ccprotoc_middleman
pkg-config --cflags protobuf # fails if protobuf is not
installed
-- c++ -std=c++11 list_people.cc addressbook.pb.cc -olist_people_cpppkg-config --cflags --libs protobuf
-+ $(CXX) $(CXXFLAGS) $(LDFLAGS)../src/google/protobuf/.libs/timestamp.pb.o$(PROTOBUF) list_people.cc addressbook.pb.cc -olist_people_cpp
+- c++ -std=c++14 list_people.cc addressbook.pb.cc -olist_people_cpppkg-config --cflags --libs protobuf
++ $(CXX) $(CXXFLAGS) $(LDFLAGS)../src/google/protobuf/.libs/timestamp.pb.o$(PROTOBUF) list_people.cc addressbook.pb.cc -olist_people_cpp#$(CXX) -std=c++17 $(PROTOBUF) list_people.cc addressbook.pb.cc -olist_people_cpp
add_person_dart: add_person.dartprotoc_middleman_dart+--
+2.34.1meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +1
-0+meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +0
-0@@ -7,12 +7,12 @@ SECTION = "console/tools" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM ="file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b"
meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +2
-3-DEPENDS = "zlib" +DEPENDS = "zlib abseil-cpp" DEPENDS:append:class-target = " protobuf-native" -SRCREV = "f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c" +SRCREV = "81f89d509d6771dcccb619cbe26ac86cec472582" -SRC_URI ="
git://github.com/protocolbuffers/protobuf.git;branch=21.x;protocol=https\
+SRC_URI = "gitsm://github.com/protocolbuffers/protobuf.git;branch=22.x;protocol=https\ file://run-ptest \ file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ file://0001-Fix-linking-error-with-ld-gold.patch \meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +1
-0@@ -35,6 +35,7 @@ EXTRA_OECMAKE += "\ -Dprotobuf_BUILD_LIBPROTOC=ON \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_BUILD_EXAMPLES=OFF \ + -Dprotobuf_ABSL_PROVIDER="package" \ " TEST_SRC_DIR = "examples"@@ -52,7 +53,11 @@ do_compile_ptest() { cp ${S}/${TEST_SRC_DIR}/Makefile "${B}/${TEST_SRC_DIR}/" sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i"${B}/${TEST_SRC_DIR}/protobuf.pc"
sed -e 's|Cflags:|Cflags: -I${S}/src|' -i"${B}/${TEST_SRC_DIR}/protobuf.pc"
meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +1
-1+ sed -e 's|Cflags:|Cflags: -I${WORKDIR}/recipe-sysroot-native${includedir} |' -i"${B}/${TEST_SRC_DIR}/protobuf.pc"
sed -e 's|Libs:|Libs: -L${B}|' -i"${B}/${TEST_SRC_DIR}/protobuf.pc"
meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +1
-1+ sed -e 's|Libs:|Libs: -L${WORKDIR}/recipe-sysroot-native/usr/lib|' -i"${B}/${TEST_SRC_DIR}/protobuf.pc"
+ sed -e 's|Libs:|Libs: -labsl_log_internal_check_op |' -i
"${B}/${TEST_SRC_DIR}/protobuf.pc"
+ sed -e 's|Libs:|Libs: -labsl_log_internal_message |' -i
"${B}/${TEST_SRC_DIR}/protobuf.pc"
# Until out-of-tree build of examples is supported, we haveQuoted 8 lines
Quoted 8 lines
to use this approach
sed -e
's|../src/google/protobuf/.libs/timestamp.pb.o|${B}/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o|' -i "${B}/${TEST_SRC_DIR}/Makefile"export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}"--
2.34.1-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#101802): https://lists.openembedded.org/g/openembedded-devel/message/101802
Mute This Topic: https://lists.openembedded.org/mt/97900181/7175143
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH v2 2/2 protobuf-c: add support of protobuf-4.22.x
In reply to Xiangyu ChenFrom: Xiangyu Chen <[email protected]>
--- .../0001-add-support-of-protobuf-4.22.x.patch | 332 ++++++++++++++++++ .../protobuf/protobuf-c_1.4.1.bb | 5 +- 2 files changed, 336 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch
meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch new file +332 -0
@@ -0,0 +1,332 @@ +From 0bf2e81d7196fcc5538a82da9da339657b3fae9a Mon Sep 17 00:00:00 2001 +From: Xiangyu Chen <[email protected]> +Date: Tue, 28 Mar 2023 14:21:53 +0800 +Subject: [PATCH] add support of protobuf 4.22.x + +After upgrading the protobuf to 4.22.x, the protobuf-c cannot compile anymore due to following changes: +1. protobuf using c++14, that cause the command_line_interface.h report error +2. protobuf using abseil-cpp library instead the trace API with GOOGLE_ header +3. removed GOOGLE_DISALLOW_EVIL_CONSTRUCTORS + +Upstream-Status: Pending [https://github.com/protobuf-c/protobuf-c/pull/548] + +Signed-off-by: Xiangyu Chen <[email protected]> +--- + Makefile.am | 2 +- + configure.ac | 9 +++++---- + protoc-c/c_bytes_field.h | 1 - + protoc-c/c_enum.h | 1 - + protoc-c/c_enum_field.h | 1 - + protoc-c/c_extension.h | 1 - + protoc-c/c_field.cc | 2 +- + protoc-c/c_field.h | 3 --- + protoc-c/c_file.h | 1 - + protoc-c/c_generator.h | 2 -- + protoc-c/c_helpers.cc | 4 ++-- + protoc-c/c_message.cc | 4 ++-- + protoc-c/c_message.h | 1 - + protoc-c/c_message_field.h | 3 --- + protoc-c/c_primitive_field.cc | 6 +++--- + protoc-c/c_primitive_field.h | 3 --- + protoc-c/c_service.h | 1 - + protoc-c/c_string_field.h | 1 - + 18 files changed, 14 insertions(+), 32 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index c7339ef..884b5eb 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -20,7 +20,7 @@ AM_CPPFLAGS = \ + -I${top_builddir} \ + -I${top_srcdir} + AM_CFLAGS = ${my_CFLAGS} +-AM_LDFLAGS = ++AM_LDFLAGS = ${my_LDFLAGS} + + # code coverage + +diff --git a/configure.ac b/configure.ac +index f5a0261..0717934 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -23,7 +23,7 @@ LT_INIT + + AC_CONFIG_HEADERS(config.h) + AC_CONFIG_FILES([Makefile protobuf-c/libprotobuf-c.pc]) +- ++my_LDFLAGS="" + my_CFLAGS="\ + -Wall \ + -Wchar-subscripts \ +@@ -76,11 +76,10 @@ AC_ARG_ENABLE([protoc], + if test "x$enable_protoc" != "xno"; then + AC_LANG_PUSH([C++]) + +- AX_CXX_COMPILE_STDCXX(11, noext, mandatory) ++ AX_CXX_COMPILE_STDCXX(14, noext, mandatory) + + PKG_CHECK_MODULES([protobuf], [protobuf >= 3.0.0], +- [proto3_supported=yes], +- [PKG_CHECK_MODULES([protobuf], [protobuf >= 2.6.0])] ++ [my_LDFLAGS="-Wl,--copy-dt-needed-entries"] + ) + + save_CPPFLAGS="$CPPFLAGS" +@@ -109,6 +108,8 @@ AM_CONDITIONAL([CROSS_COMPILING], [test "x$cross_compiling" != "xno"]) + + AM_COND_IF([BUILD_PROTO3], [AC_DEFINE([HAVE_PROTO3], [1], [Support proto3 syntax])]) + ++AC_SUBST([my_LDFLAGS]) ++ + gl_LD_VERSION_SCRIPT + + gl_VALGRIND_TESTS +diff --git a/protoc-c/c_bytes_field.h b/protoc-c/c_bytes_field.h +index bf873f0..8fc63d3 100644 +--- a/protoc-c/c_bytes_field.h ++++ b/protoc-c/c_bytes_field.h +@@ -88,7 +88,6 @@ class BytesFieldGenerator : public FieldGenerator { + private: + std::map<std::string, std::string> variables_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(BytesFieldGenerator); + }; + + +diff --git a/protoc-c/c_enum.h b/protoc-c/c_enum.h +index 9c34b69..d5e58f0 100644 +--- a/protoc-c/c_enum.h ++++ b/protoc-c/c_enum.h +@@ -107,7 +107,6 @@ class EnumGenerator { + const EnumDescriptor* descriptor_; + std::string dllexport_decl_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_enum_field.h b/protoc-c/c_enum_field.h +index 3f8c005..03eb402 100644 +--- a/protoc-c/c_enum_field.h ++++ b/protoc-c/c_enum_field.h +@@ -86,7 +86,6 @@ class EnumFieldGenerator : public FieldGenerator { + private: + std::map<std::string, std::string> variables_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator); + }; + + +diff --git a/protoc-c/c_extension.h b/protoc-c/c_extension.h +index 9541388..9c5797d 100644 +--- a/protoc-c/c_extension.h ++++ b/protoc-c/c_extension.h +@@ -99,7 +99,6 @@ class ExtensionGenerator { + std::string type_traits_; + std::string dllexport_decl_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_field.cc b/protoc-c/c_field.cc +index 0716744..4abdc6d 100644 +--- a/protoc-c/c_field.cc ++++ b/protoc-c/c_field.cc +@@ -231,7 +231,7 @@ FieldGeneratorMap::~FieldGeneratorMap() {} + + const FieldGenerator& FieldGeneratorMap::get( + const FieldDescriptor* field) const { +- GOOGLE_CHECK_EQ(field->containing_type(), descriptor_); ++ ABSL_CHECK_EQ(field->containing_type(), descriptor_); + return *field_generators_[field->index()]; + } + +diff --git a/protoc-c/c_field.h b/protoc-c/c_field.h +index 3cad35d..76d3b0b 100644 +--- a/protoc-c/c_field.h ++++ b/protoc-c/c_field.h +@@ -104,8 +104,6 @@ class FieldGenerator { + const std::string &descriptor_addr) const; + const FieldDescriptor *descriptor_; + +- private: +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator); + }; + + // Convenience class which constructs FieldGenerators for a Descriptor. +@@ -122,7 +120,6 @@ class FieldGeneratorMap { + + static FieldGenerator* MakeGenerator(const FieldDescriptor* field); + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGeneratorMap); + }; + + } // namespace c +diff --git a/protoc-c/c_file.h b/protoc-c/c_file.h +index 8dfd8ba..ec55906 100644 +--- a/protoc-c/c_file.h ++++ b/protoc-c/c_file.h +@@ -104,7 +104,6 @@ class FileGenerator { + std::unique_ptr<std::unique_ptr<ServiceGenerator>[]> service_generators_; + std::unique_ptr<std::unique_ptr<ExtensionGenerator>[]> extension_generators_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_generator.h b/protoc-c/c_generator.h +index ac1ffaf..9260116 100644 +--- a/protoc-c/c_generator.h ++++ b/protoc-c/c_generator.h +@@ -94,8 +94,6 @@ class PROTOC_C_EXPORT CGenerator : public CodeGenerator { + OutputDirectory* output_directory, + std::string* error) const; + +- private: +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_helpers.cc b/protoc-c/c_helpers.cc +index 6fd0cd3..1eaeeb4 100644 +--- a/protoc-c/c_helpers.cc ++++ b/protoc-c/c_helpers.cc +@@ -286,7 +286,7 @@ const char* const kKeywordList[] = { + + std::set<std::string> MakeKeywordsMap() { + std::set<std::string> result; +- for (int i = 0; i < GOOGLE_ARRAYSIZE(kKeywordList); i++) { ++ for (int i = 0; i < ABSL_ARRAYSIZE(kKeywordList); i++) { + result.insert(kKeywordList[i]); + } + return result; +@@ -548,7 +548,7 @@ std::string CEscape(const std::string& src) { + std::unique_ptr<char[]> dest(new char[dest_length]); + const int len = CEscapeInternal(src.data(), src.size(), + dest.get(), dest_length, false); +- GOOGLE_DCHECK_GE(len, 0); ++ ABSL_DCHECK_GE(len, 0); + return std::string(dest.get(), len); + } + +diff --git a/protoc-c/c_message.cc b/protoc-c/c_message.cc +index 37e8bf8..c7e8515 100755 +--- a/protoc-c/c_message.cc ++++ b/protoc-c/c_message.cc +@@ -499,7 +499,7 @@ GenerateMessageDescriptor(io::Printer* printer, bool gen_init) { + // NOTE: not supported by protobuf + vars["maybe_static"] = ""; + vars["field_dv_ctype"] = "{ ... }"; +- GOOGLE_LOG(DFATAL) << "Messages can't have default values!"; ++ ABSL_LOG(FATAL) << "Messages can't have default values!"; + break; + case FieldDescriptor::CPPTYPE_STRING: + if (fd->type() == FieldDescriptor::TYPE_BYTES || opt.string_as_bytes()) +@@ -521,7 +521,7 @@ GenerateMessageDescriptor(io::Printer* printer, bool gen_init) { + break; + } + default: +- GOOGLE_LOG(DFATAL) << "Unknown CPPTYPE"; ++ ABSL_LOG(FATAL) << "Unknown CPPTYPE"; + break; + } + if (!already_defined) +diff --git a/protoc-c/c_message.h b/protoc-c/c_message.h +index ea1c3ab..e90782b 100644 +--- a/protoc-c/c_message.h ++++ b/protoc-c/c_message.h +@@ -137,7 +137,6 @@ class MessageGenerator { + std::unique_ptr<std::unique_ptr<EnumGenerator>[]> enum_generators_; + std::unique_ptr<std::unique_ptr<ExtensionGenerator>[]> extension_generators_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_message_field.h b/protoc-c/c_message_field.h +index 39b8d99..42efe36 100644 +--- a/protoc-c/c_message_field.h ++++ b/protoc-c/c_message_field.h +@@ -83,9 +83,6 @@ class MessageFieldGenerator : public FieldGenerator { + std::string GetDefaultValue(void) const; + void GenerateStaticInit(io::Printer* printer) const; + +- private: +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator); + }; + + +diff --git a/protoc-c/c_primitive_field.cc b/protoc-c/c_primitive_field.cc +index 6990893..d5a7b60 100644 +--- a/protoc-c/c_primitive_field.cc ++++ b/protoc-c/c_primitive_field.cc +@@ -99,7 +99,7 @@ void PrimitiveFieldGenerator::GenerateStructMembers(io::Printer* printer) const + case FieldDescriptor::TYPE_STRING : + case FieldDescriptor::TYPE_BYTES : + case FieldDescriptor::TYPE_GROUP : +- case FieldDescriptor::TYPE_MESSAGE : GOOGLE_LOG(FATAL) << "not a primitive type"; break; ++ case FieldDescriptor::TYPE_MESSAGE : ABSL_LOG(FATAL) << "not a primitive type"; break; + + // No default because we want the compiler to complain if any new + // types are added. +@@ -143,7 +143,7 @@ std::string PrimitiveFieldGenerator::GetDefaultValue() const + case FieldDescriptor::CPPTYPE_BOOL: + return descriptor_->default_value_bool() ? "1" : "0"; + default: +- GOOGLE_LOG(DFATAL) << "unexpected CPPTYPE in c_primitive_field"; ++ ABSL_LOG(FATAL) << "unexpected CPPTYPE in c_primitive_field"; + return "UNEXPECTED_CPPTYPE"; + } + } +@@ -197,7 +197,7 @@ void PrimitiveFieldGenerator::GenerateDescriptorInitializer(io::Printer* printer + case FieldDescriptor::TYPE_STRING : + case FieldDescriptor::TYPE_BYTES : + case FieldDescriptor::TYPE_GROUP : +- case FieldDescriptor::TYPE_MESSAGE : GOOGLE_LOG(FATAL) << "not a primitive type"; break; ++ case FieldDescriptor::TYPE_MESSAGE : ABSL_LOG(FATAL) << "not a primitive type"; break; + + // No default because we want the compiler to complain if any new + // types are added. +diff --git a/protoc-c/c_primitive_field.h b/protoc-c/c_primitive_field.h +index a9eb893..d2bb724 100644 +--- a/protoc-c/c_primitive_field.h ++++ b/protoc-c/c_primitive_field.h +@@ -83,9 +83,6 @@ class PrimitiveFieldGenerator : public FieldGenerator { + std::string GetDefaultValue(void) const; + void GenerateStaticInit(io::Printer* printer) const; + +- private: +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_service.h b/protoc-c/c_service.h +index 27125a6..4737ff3 100644 +--- a/protoc-c/c_service.h ++++ b/protoc-c/c_service.h +@@ -101,7 +101,6 @@ class ServiceGenerator { + const ServiceDescriptor* descriptor_; + std::map<std::string, std::string> vars_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_string_field.h b/protoc-c/c_string_field.h +index 513cea7..ba258e4 100644 +--- a/protoc-c/c_string_field.h ++++ b/protoc-c/c_string_field.h +@@ -88,7 +88,6 @@ class StringFieldGenerator : public FieldGenerator { + private: + std::map<std::string, std::string> variables_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StringFieldGenerator); + }; + + +-- +2.34.1 +
meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb +4 -1
@@ -12,7 +12,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=9f725889e0d77383e26cb42b0b62cea2" DEPENDS = "protobuf-native protobuf" -SRC_URI = "git://github.com/protobuf-c/protobuf-c.git;branch=master;protocol=https" +SRC_URI = "git://github.com/protobuf-c/protobuf-c.git;branch=master;protocol=https \ + file://0001-add-support-of-protobuf-4.22.x.patch \ + " + SRCREV = "abc67a11c6db271bedbb9f58be85d6f4e2ea8389" S = "${WORKDIR}/git"
Signature · 1 line
2.34.1