* [oe][meta-oe][PATCH v2 0/2] protobuf: upgrade 3.21.12 -> 4.22.2 @ 2023-03-28 6:42 Xiangyu Chen 2023-03-28 6:42 ` [oe][meta-oe][PATCH v2 1/2] " Xiangyu Chen 2023-03-28 6:42 ` [oe][meta-oe][PATCH v2 2/2] protobuf-c: add support of protobuf-4.22.x Xiangyu Chen 0 siblings, 2 replies; 7+ messages in thread From: Xiangyu Chen @ 2023-03-28 6:42 UTC (permalink / raw) To: raj.khem, openembedded-devel From: Xiangyu Chen <xiangyu.chen@windriver.com> 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%) -- 2.34.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [oe][meta-oe][PATCH v2 1/2] protobuf: upgrade 3.21.12 -> 4.22.2 2023-03-28 6:42 [oe][meta-oe][PATCH v2 0/2] protobuf: upgrade 3.21.12 -> 4.22.2 Xiangyu Chen @ 2023-03-28 6:42 ` Xiangyu Chen 2023-03-28 7:22 ` Khem Raj 2023-03-28 6:42 ` [oe][meta-oe][PATCH v2 2/2] protobuf-c: add support of protobuf-4.22.x Xiangyu Chen 1 sibling, 1 reply; 7+ messages in thread From: Xiangyu Chen @ 2023-03-28 6:42 UTC (permalink / raw) To: raj.khem, openembedded-devel From: Xiangyu Chen <xiangyu.chen@windriver.com> Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> --- ...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-.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch index 36c3c597a..7c4bf260e 100644 --- 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-.patch @@ -30,7 +30,7 @@ Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> 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 + diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb b/meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb similarity index 86% rename from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb rename to meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb index 343933033..0c6b446dc 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb @@ -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 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [oe][meta-oe][PATCH v2 1/2] protobuf: upgrade 3.21.12 -> 4.22.2 2023-03-28 6:42 ` [oe][meta-oe][PATCH v2 1/2] " Xiangyu Chen @ 2023-03-28 7:22 ` Khem Raj 2023-03-28 7:48 ` Xiangyu Chen [not found] ` <175085C237DCAF2E.28404@lists.openembedded.org> 0 siblings, 2 replies; 7+ messages in thread From: Khem Raj @ 2023-03-28 7:22 UTC (permalink / raw) To: Xiangyu Chen; +Cc: openembedded-devel 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. On Mon, Mar 27, 2023 at 11:43 PM Xiangyu Chen <xiangyu.chen@eng.windriver.com> wrote: > > From: Xiangyu Chen <xiangyu.chen@windriver.com> > > Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> > --- > ...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-.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch > index 36c3c597a..7c4bf260e 100644 > --- 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-.patch > @@ -30,7 +30,7 @@ Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> > 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 > + > diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb b/meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb > similarity index 86% > rename from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb > rename to meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb > index 343933033..0c6b446dc 100644 > --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb > +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb > @@ -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 > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [oe][meta-oe][PATCH v2 1/2] protobuf: upgrade 3.21.12 -> 4.22.2 2023-03-28 7:22 ` Khem Raj @ 2023-03-28 7:48 ` Xiangyu Chen [not found] ` <175085C237DCAF2E.28404@lists.openembedded.org> 1 sibling, 0 replies; 7+ messages in thread From: Xiangyu Chen @ 2023-03-28 7:48 UTC (permalink / raw) To: Khem Raj; +Cc: openembedded-devel Hello, On 3/28/23 15:22, Khem Raj wrote: > 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 > > On Mon, Mar 27, 2023 at 11:43 PM Xiangyu Chen > <xiangyu.chen@eng.windriver.com> wrote: >> From: Xiangyu Chen <xiangyu.chen@windriver.com> >> >> Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> >> --- >> ...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-.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch >> index 36c3c597a..7c4bf260e 100644 >> --- 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-.patch >> @@ -30,7 +30,7 @@ Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> >> 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 >> + >> diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb b/meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb >> similarity index 86% >> rename from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb >> rename to meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb >> index 343933033..0c6b446dc 100644 >> --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb >> +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb >> @@ -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 >> ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <175085C237DCAF2E.28404@lists.openembedded.org>]
* Re: [oe][meta-oe][PATCH v2 1/2] protobuf: upgrade 3.21.12 -> 4.22.2 [not found] ` <175085C237DCAF2E.28404@lists.openembedded.org> @ 2023-03-29 1:57 ` Xiangyu Chen 2023-03-29 2:12 ` Khem Raj 0 siblings, 1 reply; 7+ messages in thread From: Xiangyu Chen @ 2023-03-29 1:57 UTC (permalink / raw) To: Khem Raj; +Cc: openembedded-devel Hi, On 3/28/23 15:48, Xiangyu Chen wrote: > Hello, > > > On 3/28/23 15:22, Khem Raj wrote: >> 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" . > 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! > > Br, > > Xiangyu > >> >> On Mon, Mar 27, 2023 at 11:43 PM Xiangyu Chen >> <xiangyu.chen@eng.windriver.com> wrote: >>> From: Xiangyu Chen <xiangyu.chen@windriver.com> >>> >>> Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> >>> --- >>> ...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-.patch >>> b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch >>> >>> index 36c3c597a..7c4bf260e 100644 >>> --- >>> 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-.patch >>> @@ -30,7 +30,7 @@ Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> >>> 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 >>> + >>> diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb >>> b/meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb >>> similarity index 86% >>> rename from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb >>> rename to meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb >>> index 343933033..0c6b446dc 100644 >>> --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb >>> +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb >>> @@ -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 >>> > > -=-=-=-=-=-=-=-=-=-=-=- > 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: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [xiangyu.chen@eng.windriver.com] > -=-=-=-=-=-=-=-=-=-=-=- > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [oe][meta-oe][PATCH v2 1/2] protobuf: upgrade 3.21.12 -> 4.22.2 2023-03-29 1:57 ` Xiangyu Chen @ 2023-03-29 2:12 ` Khem Raj 0 siblings, 0 replies; 7+ messages in thread From: Khem Raj @ 2023-03-29 2:12 UTC (permalink / raw) To: Xiangyu Chen; +Cc: openembedded-devel On Tue, Mar 28, 2023 at 6:57 PM Xiangyu Chen <xiangyu.chen@eng.windriver.com> wrote: > > Hi, > > > On 3/28/23 15:48, Xiangyu Chen wrote: > > Hello, > > > > > > On 3/28/23 15:22, Khem Raj wrote: > >> 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" . > > > 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. > > > [1] https://github.com/mobile-shell/mosh/pull/1266 > > [2] https://lists.openembedded.org/g/openembedded-devel/message/101797 > > > Thanks! > > > > > > Br, > > > > Xiangyu > > > >> > >> On Mon, Mar 27, 2023 at 11:43 PM Xiangyu Chen > >> <xiangyu.chen@eng.windriver.com> wrote: > >>> From: Xiangyu Chen <xiangyu.chen@windriver.com> > >>> > >>> Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> > >>> --- > >>> ...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-.patch > >>> b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch > >>> > >>> index 36c3c597a..7c4bf260e 100644 > >>> --- > >>> 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-.patch > >>> @@ -30,7 +30,7 @@ Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> > >>> 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 > >>> + > >>> diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb > >>> b/meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb > >>> similarity index 86% > >>> rename from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb > >>> rename to meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb > >>> index 343933033..0c6b446dc 100644 > >>> --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb > >>> +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb > >>> @@ -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 > >>> > > > > -=-=-=-=-=-=-=-=-=-=-=- > > 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: openembedded-devel+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [xiangyu.chen@eng.windriver.com] > > -=-=-=-=-=-=-=-=-=-=-=- > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* [oe][meta-oe][PATCH v2 2/2] protobuf-c: add support of protobuf-4.22.x 2023-03-28 6:42 [oe][meta-oe][PATCH v2 0/2] protobuf: upgrade 3.21.12 -> 4.22.2 Xiangyu Chen 2023-03-28 6:42 ` [oe][meta-oe][PATCH v2 1/2] " Xiangyu Chen @ 2023-03-28 6:42 ` Xiangyu Chen 1 sibling, 0 replies; 7+ messages in thread From: Xiangyu Chen @ 2023-03-28 6:42 UTC (permalink / raw) To: raj.khem, openembedded-devel From: Xiangyu Chen <xiangyu.chen@windriver.com> Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> --- .../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 diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch new file mode 100644 index 000000000..80808273d --- /dev/null +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch @@ -0,0 +1,332 @@ +From 0bf2e81d7196fcc5538a82da9da339657b3fae9a Mon Sep 17 00:00:00 2001 +From: Xiangyu Chen <xiangyu.chen@windriver.com> +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 <xiangyu.chen@windriver.com> +--- + 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 + diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb index d724287d6..bdaf43a54 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb @@ -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" -- 2.34.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-03-29 2:12 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-03-28 6:42 [oe][meta-oe][PATCH v2 0/2] protobuf: upgrade 3.21.12 -> 4.22.2 Xiangyu Chen 2023-03-28 6:42 ` [oe][meta-oe][PATCH v2 1/2] " Xiangyu Chen 2023-03-28 7:22 ` Khem Raj 2023-03-28 7:48 ` Xiangyu Chen [not found] ` <175085C237DCAF2E.28404@lists.openembedded.org> 2023-03-29 1:57 ` Xiangyu Chen 2023-03-29 2:12 ` Khem Raj 2023-03-28 6:42 ` [oe][meta-oe][PATCH v2 2/2] protobuf-c: add support of protobuf-4.22.x Xiangyu Chen
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.