Message ID | 20250317060612.4111152-1-hongxu.jia@windriver.com |
---|---|
State | Under Review |
Headers | show |
Series | [meta-oe,v4] protobuf: 4.25.5 -> 4.30.0 | expand |
On 2025-03-17 2:06 a.m., hongxu via lists.openembedded.org wrote: > Refresh local patches > - 0001-Fix-build-on-mips-clang.patch > - 0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch > > Fix protobuf-native build failure with gcc 10 > > Changelog: > https://github.com/protocolbuffers/protobuf/releases/tag/v30.0 > > Signed-off-by: Hongxu Jia<hongxu.jia@windriver.com> > --- > .../0001-Fix-build-on-mips-clang.patch | 26 +++++++---- > ...e-respect-CXX-LDFLAGS-variables-fix-.patch | 25 +++++------ > ...buf-native-build-failure-with-gcc-10.patch | 43 +++++++++++++++++++ > ...{protobuf_4.25.5.bb => protobuf_4.30.0.bb} | 5 ++- Ping Khem: Does that fix the ubu-20.04 problem? Also, Hongxu, should the python package also be updated? ❯ fd protobuf_4 meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb meta-python/recipes-devtools/python/python3-protobuf_4.25.3.bb ../Randy > 4 files changed, 76 insertions(+), 23 deletions(-) > create mode 100644 meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch > rename meta-oe/recipes-devtools/protobuf/{protobuf_4.25.5.bb => protobuf_4.30.0.bb} (97%) > > diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch > index 9f6116c4c4..6db22c26d3 100644 > --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch > +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch > @@ -1,6 +1,6 @@ > -From 08e46feb6553af670754e65d94c3bb6fcd4e0cf9 Mon Sep 17 00:00:00 2001 > +From fd5a966a6385165506a1b84298465cbb9f44222d Mon Sep 17 00:00:00 2001 > From: Khem Raj<raj.khem@gmail.com> > -Date: Sun, 31 Oct 2021 23:39:44 -0700 > +Date: Mon, 10 Mar 2025 19:59:19 -0700 > Subject: [PATCH] Fix build on mips/clang > > clang13 crashes on mips, until its fixed upstream disable tailcall on > @@ -10,17 +10,25 @@https://bugs.llvm.org/show_bug.cgi?id=52367 > > Upstream-Status: Inappropriate [Clang workaround] > Signed-off-by: Khem Raj<raj.khem@gmail.com> > + > +Rebase to v4.30.0 > +Signed-off-by: Hongxu Jia<hongxu.jia@windriver.com> > --- > - src/google/protobuf/port_def.inc | 2 +- > - 1 file changed, 1 insertion(+), 1 deletion(-) > + src/google/protobuf/port_def.inc | 1 + > + 1 file changed, 1 insertion(+) > > +diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc > +index 35f49afb4..e9597af0d 100644 > --- a/src/google/protobuf/port_def.inc > +++ b/src/google/protobuf/port_def.inc > -@@ -255,6 +255,7 @@ > +@@ -222,6 +222,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3), > #error PROTOBUF_TAILCALL was previously defined > #endif > - #if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \ > + #if ABSL_HAVE_CPP_ATTRIBUTE(clang::musttail) && !defined(__arm__) && \ > + !defined(__mips__) && \ > - !defined(_ARCH_PPC) && !defined(__wasm__) && \ > - !(defined(_MSC_VER) && defined(_M_IX86)) && \ > - !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24) > + !defined(_ARCH_PPC) && !defined(__wasm__) && \ > + !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) > + // Compilation fails on ARM32: b/195943306 > +-- > +2.25.1 > + > 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 7c4bf260eb..1b68c24c96 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 > @@ -1,13 +1,12 @@ > -From e3fa241637ab5a7fa78c0d474802134cff75f91e Mon Sep 17 00:00:00 2001 > +From 9d50661003d78a4debfc7eda532f0b53df51fd7c Mon Sep 17 00:00:00 2001 > From: Martin Jansa<Martin.Jansa@gmail.com> > -Date: Fri, 28 Jun 2019 13:50:52 +0000 > -Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build > - with gold > +Date: Thu, 13 Mar 2025 10:54:01 +0800 > +Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables > > * move pkg-config call to separate variable, so that the final version > of the whole command so it's shown in log.do_compile_ptest_base > * add ../src/google/protobuf/.libs/timestamp.pb.o when linking > - add_person_cpp otherwise it fails to link with gold: > + add_person_cpp otherwise it fails: > i686-oe-linux-g++ -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=core2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` > /tmp/cccjSJQs.o:addressbook.pb.cc:scc_info_Person_addressbook_2eproto: error: undefined reference to 'scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto' > /tmp/cccjSJQs.o:addressbook.pb.cc:descriptor_table_addressbook_2eproto_deps: error: undefined reference to 'descriptor_table_google_2fprotobuf_2ftimestamp_2eproto' > @@ -25,12 +24,14 @@ Upstream-Status: Pending > Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com> > Signed-off-by: Leon Anavi<leon.anavi@konsulko.com> > > +Rebase to v4.30.0 > +Signed-off-by: Hongxu Jia<hongxu.jia@windriver.com> > --- > examples/Makefile | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/examples/Makefile b/examples/Makefile > -index ef7a4ef58..7206e14e1 100644 > +index 5290fdb03f..3b9545bf2a 100644 > --- a/examples/Makefile > +++ b/examples/Makefile > @@ -2,6 +2,8 @@ > @@ -42,20 +43,20 @@ index ef7a4ef58..7206e14e1 100644 > all: cpp java python > > cpp: add_person_cpp list_people_cpp > -@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto > +@@ -46,11 +48,11 @@ protoc_middleman_ruby: addressbook.proto > > add_person_cpp: add_person.cc protoc_middleman > pkg-config --cflags protobuf # fails if protobuf is not installed > -- 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 > +- c++ 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 > > list_people_cpp: list_people.cc protoc_middleman > pkg-config --cflags protobuf # fails if protobuf is not installed > -- 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 > +- c++ 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 > > add_person_dart: add_person.dart protoc_middleman_dart > > --- > +-- > 2.34.1 > > diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch > new file mode 100644 > index 0000000000..d7c9f38eff > --- /dev/null > +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch > @@ -0,0 +1,43 @@ > +From 03dabf4b153071ec1bdcd2c278461984cc6f1714 Mon Sep 17 00:00:00 2001 > +From: Khem Raj<raj.khem@gmail.com> > +Date: Mon, 17 Mar 2025 13:28:13 +0800 > +Subject: [PATCH] fix protobuf-native build failure with gcc 10 > + > +Build protobuf-native failed on ubuntu 20.04 which has gcc 10 > + > +protobuf-native/4.30.0/git/src/google/protobuf/port_def.inc:105:48: > +error: static assertion failed: Protobuf only supports C+ > + ↪ +17 and newer. > + | 105 | #define PROTOBUF_CPLUSPLUS_MIN(x) (__cplusplus >= x) > + | | ~~~~~~~~~~~~~^~~~~ > + | /home/kraj01/yoe/build/tmp/work/x86_64-linux/protobuf-native/4.30.0/git/src/google/protobuf/port_def.inc:119:15: > +note: in expansion of macro ‘PROTOBUF_CPLUSPLUS_MIN’ > + | 119 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201703L), > + | | ^~~~~~~~~~~~~~~~~~~~~~ > + > +Upstream-Status: Pending > + > +Signed-off-by: Khem Raj<raj.khem@gmail.com> > +Signed-off-by: Hongxu Jia<hongxu.jia@windriver.com> > +--- > + CMakeLists.txt | 4 ++++ > + 1 file changed, 4 insertions(+) > + > +diff --git a/CMakeLists.txt b/CMakeLists.txt > +index ae3c324..eda19aa 100644 > +--- a/CMakeLists.txt > ++++ b/CMakeLists.txt > +@@ -14,6 +14,10 @@ endif() > + # Project > + project(protobuf C CXX) > + > ++set(CMAKE_CXX_STANDARD 17) > ++set(CMAKE_CXX_STANDARD_REQUIRED ON) > ++set(CMAKE_CXX_EXTENSIONS OFF) > ++ > + if(protobuf_DEPRECATED_CMAKE_SUBDIRECTORY_USAGE) > + if(CMAKE_PROJECT_NAME STREQUAL "protobuf") > + get_filename_component(CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR} DIRECTORY) > +-- > +2.34.1 > + > diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb b/meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb > similarity index 97% > rename from meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb > rename to meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb > index a470a7c643..0d6123dfa0 100644 > --- a/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb > +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb > @@ -14,11 +14,12 @@ LIC_FILES_CHKSUM = " \ > DEPENDS = "zlib abseil-cpp jsoncpp" > DEPENDS:append:class-target = " protobuf-native" > > -SRCREV = "9d0ec0f92b5b5fdeeda11f9dcecc1872ff378014" > +SRCREV = "d295af5c3002c08e1bfd9d7f9e175d0a4d015f1e" > > -SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=25.x;protocol=https \ > +SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=30.x;protocol=https \ > file://run-ptest \ > file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ > +file://0001-fix-protobuf-native-build-failure-with-gcc-10.patch \ > " > SRC_URI:append:mips:toolchain-clang =" file://0001-Fix-build-on-mips-clang.patch " > SRC_URI:append:mipsel:toolchain-clang =" file://0001-Fix-build-on-mips-clang.patch " > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#116020):https://lists.openembedded.org/g/openembedded-devel/message/116020 > Mute This Topic:https://lists.openembedded.org/mt/111744582/3616765 > Group Owner:openembedded-devel+owner@lists.openembedded.org > Unsubscribe:https://lists.openembedded.org/g/openembedded-devel/unsub [randy.macleod@windriver.com] > -=-=-=-=-=-=-=-=-=-=-=- >
btw this breaks qtgrpc from meta-qt6 | /mnt/b/yoe/master/build/tmp/work/x86_64-linux/qtgrpc-native/6.9.0/git/src/tools/qtprotobufgen/qprotobufgenerator.cpp:205:82: error: could not convert ‘file->google::protobuf::FileDescriptor::dependency(i)->google::protobuf::FileDescriptor::name()’ from ‘google::protobuf::internal::DescriptorStringView’ {aka ‘std::basic_string_view<char>’} to ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} | 205 | internalIncludes.insert(utils::removeFileSuffix(file->dependency(i)->name()) | | ~~~~~~~~~~~~~~~~~~~~~~~~~^~ | | | | | google::protobuf::internal::DescriptorStringView {aka std::basic_string_view<char>} On Wed, Mar 19, 2025 at 10:46 AM Randy MacLeod <randy.macleod@windriver.com> wrote: > > On 2025-03-17 2:06 a.m., hongxu via lists.openembedded.org wrote: > > Refresh local patches > - 0001-Fix-build-on-mips-clang.patch > - 0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch > > Fix protobuf-native build failure with gcc 10 > > Changelog: > https://github.com/protocolbuffers/protobuf/releases/tag/v30.0 > > Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > --- > .../0001-Fix-build-on-mips-clang.patch | 26 +++++++---- > ...e-respect-CXX-LDFLAGS-variables-fix-.patch | 25 +++++------ > ...buf-native-build-failure-with-gcc-10.patch | 43 +++++++++++++++++++ > ...{protobuf_4.25.5.bb => protobuf_4.30.0.bb} | 5 ++- > > > Ping Khem: > Does that fix the ubu-20.04 problem? > > Also, Hongxu, should the python package also be updated? > > ❯ fd protobuf_4 > meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb > meta-python/recipes-devtools/python/python3-protobuf_4.25.3.bb > > ../Randy > > > 4 files changed, 76 insertions(+), 23 deletions(-) > create mode 100644 meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch > rename meta-oe/recipes-devtools/protobuf/{protobuf_4.25.5.bb => protobuf_4.30.0.bb} (97%) > > diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch > index 9f6116c4c4..6db22c26d3 100644 > --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch > +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch > @@ -1,6 +1,6 @@ > -From 08e46feb6553af670754e65d94c3bb6fcd4e0cf9 Mon Sep 17 00:00:00 2001 > +From fd5a966a6385165506a1b84298465cbb9f44222d Mon Sep 17 00:00:00 2001 > From: Khem Raj <raj.khem@gmail.com> > -Date: Sun, 31 Oct 2021 23:39:44 -0700 > +Date: Mon, 10 Mar 2025 19:59:19 -0700 > Subject: [PATCH] Fix build on mips/clang > > clang13 crashes on mips, until its fixed upstream disable tailcall on > @@ -10,17 +10,25 @@ https://bugs.llvm.org/show_bug.cgi?id=52367 > > Upstream-Status: Inappropriate [Clang workaround] > Signed-off-by: Khem Raj <raj.khem@gmail.com> > + > +Rebase to v4.30.0 > +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > --- > - src/google/protobuf/port_def.inc | 2 +- > - 1 file changed, 1 insertion(+), 1 deletion(-) > + src/google/protobuf/port_def.inc | 1 + > + 1 file changed, 1 insertion(+) > > +diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc > +index 35f49afb4..e9597af0d 100644 > --- a/src/google/protobuf/port_def.inc > +++ b/src/google/protobuf/port_def.inc > -@@ -255,6 +255,7 @@ > +@@ -222,6 +222,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3), > #error PROTOBUF_TAILCALL was previously defined > #endif > - #if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \ > + #if ABSL_HAVE_CPP_ATTRIBUTE(clang::musttail) && !defined(__arm__) && \ > + !defined(__mips__) && \ > - !defined(_ARCH_PPC) && !defined(__wasm__) && \ > - !(defined(_MSC_VER) && defined(_M_IX86)) && \ > - !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24) > + !defined(_ARCH_PPC) && !defined(__wasm__) && \ > + !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) > + // Compilation fails on ARM32: b/195943306 > +-- > +2.25.1 > + > 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 7c4bf260eb..1b68c24c96 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 > @@ -1,13 +1,12 @@ > -From e3fa241637ab5a7fa78c0d474802134cff75f91e Mon Sep 17 00:00:00 2001 > +From 9d50661003d78a4debfc7eda532f0b53df51fd7c Mon Sep 17 00:00:00 2001 > From: Martin Jansa <Martin.Jansa@gmail.com> > -Date: Fri, 28 Jun 2019 13:50:52 +0000 > -Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build > - with gold > +Date: Thu, 13 Mar 2025 10:54:01 +0800 > +Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables > > * move pkg-config call to separate variable, so that the final version > of the whole command so it's shown in log.do_compile_ptest_base > * add ../src/google/protobuf/.libs/timestamp.pb.o when linking > - add_person_cpp otherwise it fails to link with gold: > + add_person_cpp otherwise it fails: > i686-oe-linux-g++ -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=core2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` > /tmp/cccjSJQs.o:addressbook.pb.cc:scc_info_Person_addressbook_2eproto: error: undefined reference to 'scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto' > /tmp/cccjSJQs.o:addressbook.pb.cc:descriptor_table_addressbook_2eproto_deps: error: undefined reference to 'descriptor_table_google_2fprotobuf_2ftimestamp_2eproto' > @@ -25,12 +24,14 @@ Upstream-Status: Pending > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> > Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> > > +Rebase to v4.30.0 > +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > --- > examples/Makefile | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/examples/Makefile b/examples/Makefile > -index ef7a4ef58..7206e14e1 100644 > +index 5290fdb03f..3b9545bf2a 100644 > --- a/examples/Makefile > +++ b/examples/Makefile > @@ -2,6 +2,8 @@ > @@ -42,20 +43,20 @@ index ef7a4ef58..7206e14e1 100644 > all: cpp java python > > cpp: add_person_cpp list_people_cpp > -@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto > +@@ -46,11 +48,11 @@ protoc_middleman_ruby: addressbook.proto > > add_person_cpp: add_person.cc protoc_middleman > pkg-config --cflags protobuf # fails if protobuf is not installed > -- 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 > +- c++ 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 > > list_people_cpp: list_people.cc protoc_middleman > pkg-config --cflags protobuf # fails if protobuf is not installed > -- 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 > +- c++ 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 > > add_person_dart: add_person.dart protoc_middleman_dart > > --- > +-- > 2.34.1 > > diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch > new file mode 100644 > index 0000000000..d7c9f38eff > --- /dev/null > +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch > @@ -0,0 +1,43 @@ > +From 03dabf4b153071ec1bdcd2c278461984cc6f1714 Mon Sep 17 00:00:00 2001 > +From: Khem Raj <raj.khem@gmail.com> > +Date: Mon, 17 Mar 2025 13:28:13 +0800 > +Subject: [PATCH] fix protobuf-native build failure with gcc 10 > + > +Build protobuf-native failed on ubuntu 20.04 which has gcc 10 > + > +protobuf-native/4.30.0/git/src/google/protobuf/port_def.inc:105:48: > +error: static assertion failed: Protobuf only supports C+ > + ↪ +17 and newer. > + | 105 | #define PROTOBUF_CPLUSPLUS_MIN(x) (__cplusplus >= x) > + | | ~~~~~~~~~~~~~^~~~~ > + | /home/kraj01/yoe/build/tmp/work/x86_64-linux/protobuf-native/4.30.0/git/src/google/protobuf/port_def.inc:119:15: > +note: in expansion of macro ‘PROTOBUF_CPLUSPLUS_MIN’ > + | 119 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201703L), > + | | ^~~~~~~~~~~~~~~~~~~~~~ > + > +Upstream-Status: Pending > + > +Signed-off-by: Khem Raj <raj.khem@gmail.com> > +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > +--- > + CMakeLists.txt | 4 ++++ > + 1 file changed, 4 insertions(+) > + > +diff --git a/CMakeLists.txt b/CMakeLists.txt > +index ae3c324..eda19aa 100644 > +--- a/CMakeLists.txt > ++++ b/CMakeLists.txt > +@@ -14,6 +14,10 @@ endif() > + # Project > + project(protobuf C CXX) > + > ++set(CMAKE_CXX_STANDARD 17) > ++set(CMAKE_CXX_STANDARD_REQUIRED ON) > ++set(CMAKE_CXX_EXTENSIONS OFF) > ++ > + if(protobuf_DEPRECATED_CMAKE_SUBDIRECTORY_USAGE) > + if(CMAKE_PROJECT_NAME STREQUAL "protobuf") > + get_filename_component(CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR} DIRECTORY) > +-- > +2.34.1 > + > diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb b/meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb > similarity index 97% > rename from meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb > rename to meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb > index a470a7c643..0d6123dfa0 100644 > --- a/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb > +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb > @@ -14,11 +14,12 @@ LIC_FILES_CHKSUM = " \ > DEPENDS = "zlib abseil-cpp jsoncpp" > DEPENDS:append:class-target = " protobuf-native" > > -SRCREV = "9d0ec0f92b5b5fdeeda11f9dcecc1872ff378014" > +SRCREV = "d295af5c3002c08e1bfd9d7f9e175d0a4d015f1e" > > -SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=25.x;protocol=https \ > +SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=30.x;protocol=https \ > file://run-ptest \ > file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ > + file://0001-fix-protobuf-native-build-failure-with-gcc-10.patch \ > " > SRC_URI:append:mips:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " > SRC_URI:append:mipsel:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#116020): https://lists.openembedded.org/g/openembedded-devel/message/116020 > Mute This Topic: https://lists.openembedded.org/mt/111744582/3616765 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [randy.macleod@windriver.com] > -=-=-=-=-=-=-=-=-=-=-=- > > > -- > # Randy MacLeod > # Wind River Linux
This version update is imho wrong. 4.30.x is not a C++ tag, please check https://protobuf.dev/support/version-support/#cpp We should either take 5.29.4 to have "new LTS" (patch releases for 1 year) or 6.30.1 to have the latest and greatest (patch releases for 3 months) I think 5.29.x is the correct choice, but since next Yocto LTS is still 1 year ahead, 6.30.x is also acceptable with risk that dependent components may get broken a lot. Peter > -----Original Message----- > From: openembedded-devel@lists.openembedded.org <openembedded- > devel@lists.openembedded.org> On Behalf Of Khem Raj via > lists.openembedded.org > Sent: Thursday, March 20, 2025 4:12 > To: Randy MacLeod <randy.macleod@windriver.com> > Cc: hongxu.jia@eng.windriver.com; openembedded- > devel@lists.openembedded.org > Subject: Re: [oe] [meta-oe][PATCH v4] protobuf: 4.25.5 -> 4.30.0 > > btw this breaks qtgrpc from meta-qt6 > > | /mnt/b/yoe/master/build/tmp/work/x86_64-linux/qtgrpc- > native/6.9.0/git/src/tools/qtprotobufgen/qprotobufgenerator.cpp:205:82: > error: could not convert > ‘file->google::protobuf::FileDescriptor::dependency(i)- > >google::protobuf::FileDescriptor::name()’ > from ‘google::protobuf::internal::DescriptorStringView’ {aka > ‘std::basic_string_view<char>’} to ‘std::string’ {aka > ‘std::__cxx11::basic_string<char>’} > | 205 | > internalIncludes.insert(utils::removeFileSuffix(file->dependency(i)->name()) > | | > ~~~~~~~~~~~~~~~~~~~~~~~~~^~ > | | > | > | | > google::protobuf::internal::DescriptorStringView > {aka std::basic_string_view<char>} > > On Wed, Mar 19, 2025 at 10:46 AM Randy MacLeod > <randy.macleod@windriver.com> wrote: > > > > On 2025-03-17 2:06 a.m., hongxu via lists.openembedded.org wrote: > > > > Refresh local patches > > - 0001-Fix-build-on-mips-clang.patch > > - 0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch > > > > Fix protobuf-native build failure with gcc 10 > > > > Changelog: > > https://github.com/protocolbuffers/protobuf/releases/tag/v30.0 > > > > Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > > --- > > .../0001-Fix-build-on-mips-clang.patch | 26 +++++++---- > > ...e-respect-CXX-LDFLAGS-variables-fix-.patch | 25 +++++------ > > ...buf-native-build-failure-with-gcc-10.patch | 43 +++++++++++++++++++ > > ...{protobuf_4.25.5.bb => protobuf_4.30.0.bb} | 5 ++- > > > > > > Ping Khem: > > Does that fix the ubu-20.04 problem? > > > > Also, Hongxu, should the python package also be updated? > > > > ❯ fd protobuf_4 > > meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb > > meta-python/recipes-devtools/python/python3-protobuf_4.25.3.bb > > > > ../Randy > > > > > > 4 files changed, 76 insertions(+), 23 deletions(-) > > create mode 100644 meta-oe/recipes-devtools/protobuf/protobuf/0001-fix- > protobuf-native-build-failure-with-gcc-10.patch > > rename meta-oe/recipes-devtools/protobuf/{protobuf_4.25.5.bb => > protobuf_4.30.0.bb} (97%) > > > > diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips- > clang.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips- > clang.patch > > index 9f6116c4c4..6db22c26d3 100644 > > --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips- > clang.patch > > +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips- > clang.patch > > @@ -1,6 +1,6 @@ > > -From 08e46feb6553af670754e65d94c3bb6fcd4e0cf9 Mon Sep 17 00:00:00 2001 > > +From fd5a966a6385165506a1b84298465cbb9f44222d Mon Sep 17 00:00:00 > 2001 > > From: Khem Raj <raj.khem@gmail.com> > > -Date: Sun, 31 Oct 2021 23:39:44 -0700 > > +Date: Mon, 10 Mar 2025 19:59:19 -0700 > > Subject: [PATCH] Fix build on mips/clang > > > > clang13 crashes on mips, until its fixed upstream disable tailcall on > > @@ -10,17 +10,25 @@ https://bugs.llvm.org/show_bug.cgi?id=52367 > > > > Upstream-Status: Inappropriate [Clang workaround] > > Signed-off-by: Khem Raj <raj.khem@gmail.com> > > + > > +Rebase to v4.30.0 > > +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > > --- > > - src/google/protobuf/port_def.inc | 2 +- > > - 1 file changed, 1 insertion(+), 1 deletion(-) > > + src/google/protobuf/port_def.inc | 1 + > > + 1 file changed, 1 insertion(+) > > > > +diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc > > +index 35f49afb4..e9597af0d 100644 > > --- a/src/google/protobuf/port_def.inc > > +++ b/src/google/protobuf/port_def.inc > > -@@ -255,6 +255,7 @@ > > +@@ -222,6 +222,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3), > > #error PROTOBUF_TAILCALL was previously defined > > #endif > > - #if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \ > > + #if ABSL_HAVE_CPP_ATTRIBUTE(clang::musttail) && !defined(__arm__) && \ > > + !defined(__mips__) && \ > > - !defined(_ARCH_PPC) && !defined(__wasm__) && \ > > - !(defined(_MSC_VER) && defined(_M_IX86)) && \ > > - !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24) > > + !defined(_ARCH_PPC) && !defined(__wasm__) && \ > > + !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) > > + // Compilation fails on ARM32: b/195943306 > > +-- > > +2.25.1 > > + > > 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 7c4bf260eb..1b68c24c96 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 > > @@ -1,13 +1,12 @@ > > -From e3fa241637ab5a7fa78c0d474802134cff75f91e Mon Sep 17 00:00:00 2001 > > +From 9d50661003d78a4debfc7eda532f0b53df51fd7c Mon Sep 17 00:00:00 > 2001 > > From: Martin Jansa <Martin.Jansa@gmail.com> > > -Date: Fri, 28 Jun 2019 13:50:52 +0000 > > -Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix > build > > - with gold > > +Date: Thu, 13 Mar 2025 10:54:01 +0800 > > +Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables > > > > * move pkg-config call to separate variable, so that the final version > > of the whole command so it's shown in log.do_compile_ptest_base > > * add ../src/google/protobuf/.libs/timestamp.pb.o when linking > > - add_person_cpp otherwise it fails to link with gold: > > + add_person_cpp otherwise it fails: > > i686-oe-linux-g++ -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -- > sysroot=core2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot -Wl,-O1 -Wl,--hash- > style=gnu -Wl,--as-needed add_person.cc addressbook.pb.cc -o add_person_cpp > `pkg-config --cflags --libs protobuf` > > /tmp/cccjSJQs.o:addressbook.pb.cc:scc_info_Person_addressbook_2eproto: > error: undefined reference to > 'scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto' > > > /tmp/cccjSJQs.o:addressbook.pb.cc:descriptor_table_addressbook_2eproto_dep > s: error: undefined reference to > 'descriptor_table_google_2fprotobuf_2ftimestamp_2eproto' > > @@ -25,12 +24,14 @@ Upstream-Status: Pending > > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> > > Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> > > > > +Rebase to v4.30.0 > > +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > > --- > > examples/Makefile | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/examples/Makefile b/examples/Makefile > > -index ef7a4ef58..7206e14e1 100644 > > +index 5290fdb03f..3b9545bf2a 100644 > > --- a/examples/Makefile > > +++ b/examples/Makefile > > @@ -2,6 +2,8 @@ > > @@ -42,20 +43,20 @@ index ef7a4ef58..7206e14e1 100644 > > all: cpp java python > > > > cpp: add_person_cpp list_people_cpp > > -@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto > > +@@ -46,11 +48,11 @@ protoc_middleman_ruby: addressbook.proto > > > > add_person_cpp: add_person.cc protoc_middleman > > pkg-config --cflags protobuf # fails if protobuf is not installed > > -- 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 > > +- c++ 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 > > > > list_people_cpp: list_people.cc protoc_middleman > > pkg-config --cflags protobuf # fails if protobuf is not installed > > -- 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 > > +- c++ 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 > > > > add_person_dart: add_person.dart protoc_middleman_dart > > > > --- > > +-- > > 2.34.1 > > > > diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native- > build-failure-with-gcc-10.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001- > fix-protobuf-native-build-failure-with-gcc-10.patch > > new file mode 100644 > > index 0000000000..d7c9f38eff > > --- /dev/null > > +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native- > build-failure-with-gcc-10.patch > > @@ -0,0 +1,43 @@ > > +From 03dabf4b153071ec1bdcd2c278461984cc6f1714 Mon Sep 17 00:00:00 > 2001 > > +From: Khem Raj <raj.khem@gmail.com> > > +Date: Mon, 17 Mar 2025 13:28:13 +0800 > > +Subject: [PATCH] fix protobuf-native build failure with gcc 10 > > + > > +Build protobuf-native failed on ubuntu 20.04 which has gcc 10 > > + > > +protobuf-native/4.30.0/git/src/google/protobuf/port_def.inc:105:48: > > +error: static assertion failed: Protobuf only supports C+ > > + ↪ +17 and newer. > > + | 105 | #define PROTOBUF_CPLUSPLUS_MIN(x) (__cplusplus >= x) > > + | | ~~~~~~~~~~~~~^~~~~ > > + | /home/kraj01/yoe/build/tmp/work/x86_64-linux/protobuf- > native/4.30.0/git/src/google/protobuf/port_def.inc:119:15: > > +note: in expansion of macro ‘PROTOBUF_CPLUSPLUS_MIN’ > > + | 119 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201703L), > > + | | ^~~~~~~~~~~~~~~~~~~~~~ > > + > > +Upstream-Status: Pending > > + > > +Signed-off-by: Khem Raj <raj.khem@gmail.com> > > +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > > +--- > > + CMakeLists.txt | 4 ++++ > > + 1 file changed, 4 insertions(+) > > + > > +diff --git a/CMakeLists.txt b/CMakeLists.txt > > +index ae3c324..eda19aa 100644 > > +--- a/CMakeLists.txt > > ++++ b/CMakeLists.txt > > +@@ -14,6 +14,10 @@ endif() > > + # Project > > + project(protobuf C CXX) > > + > > ++set(CMAKE_CXX_STANDARD 17) > > ++set(CMAKE_CXX_STANDARD_REQUIRED ON) > > ++set(CMAKE_CXX_EXTENSIONS OFF) > > ++ > > + if(protobuf_DEPRECATED_CMAKE_SUBDIRECTORY_USAGE) > > + if(CMAKE_PROJECT_NAME STREQUAL "protobuf") > > + get_filename_component(CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR} > DIRECTORY) > > +-- > > +2.34.1 > > + > > diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb b/meta- > oe/recipes-devtools/protobuf/protobuf_4.30.0.bb > > similarity index 97% > > rename from meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb > > rename to meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb > > index a470a7c643..0d6123dfa0 100644 > > --- a/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb > > +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb > > @@ -14,11 +14,12 @@ LIC_FILES_CHKSUM = " \ > > DEPENDS = "zlib abseil-cpp jsoncpp" > > DEPENDS:append:class-target = " protobuf-native" > > > > -SRCREV = "9d0ec0f92b5b5fdeeda11f9dcecc1872ff378014" > > +SRCREV = "d295af5c3002c08e1bfd9d7f9e175d0a4d015f1e" > > > > -SRC_URI = > "git://github.com/protocolbuffers/protobuf.git;branch=25.x;protocol=https \ > > +SRC_URI = > "git://github.com/protocolbuffers/protobuf.git;branch=30.x;protocol=https \ > > file://run-ptest \ > > file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch > \ > > + file://0001-fix-protobuf-native-build-failure-with-gcc-10.patch \ > > " > > SRC_URI:append:mips:toolchain-clang = " file://0001-Fix-build-on-mips- > clang.patch " > > SRC_URI:append:mipsel:toolchain-clang = " file://0001-Fix-build-on-mips- > clang.patch " > > > > > > > > > > > > -- > > # Randy MacLeod > > # Wind River Linux
On Thu, Mar 20, 2025 at 6:04 AM Marko, Peter <Peter.Marko@siemens.com> wrote: > > This version update is imho wrong. > > 4.30.x is not a C++ tag, please check https://protobuf.dev/support/version-support/#cpp > We should either take 5.29.4 to have "new LTS" (patch releases for 1 year) > or 6.30.1 to have the latest and greatest (patch releases for 3 months) > I think 5.29.x is the correct choice, but since next Yocto LTS is still 1 year ahead, > 6.30.x is also acceptable with risk that dependent components may get broken a lot. > Thanks for sharing the release schedules, while I would like to see 6.x in master at some point and perhaps get 6.33 into next yocto LTS in Apr 2026, it might be better to stick with 5.29 in this release since there still is good 1 year before the next LTS > Peter > > > > -----Original Message----- > > From: openembedded-devel@lists.openembedded.org <openembedded- > > devel@lists.openembedded.org> On Behalf Of Khem Raj via > > lists.openembedded.org > > Sent: Thursday, March 20, 2025 4:12 > > To: Randy MacLeod <randy.macleod@windriver.com> > > Cc: hongxu.jia@eng.windriver.com; openembedded- > > devel@lists.openembedded.org > > Subject: Re: [oe] [meta-oe][PATCH v4] protobuf: 4.25.5 -> 4.30.0 > > > > btw this breaks qtgrpc from meta-qt6 > > > > | /mnt/b/yoe/master/build/tmp/work/x86_64-linux/qtgrpc- > > native/6.9.0/git/src/tools/qtprotobufgen/qprotobufgenerator.cpp:205:82: > > error: could not convert > > ‘file->google::protobuf::FileDescriptor::dependency(i)- > > >google::protobuf::FileDescriptor::name()’ > > from ‘google::protobuf::internal::DescriptorStringView’ {aka > > ‘std::basic_string_view<char>’} to ‘std::string’ {aka > > ‘std::__cxx11::basic_string<char>’} > > | 205 | > > internalIncludes.insert(utils::removeFileSuffix(file->dependency(i)->name()) > > | | > > ~~~~~~~~~~~~~~~~~~~~~~~~~^~ > > | | > > | > > | | > > google::protobuf::internal::DescriptorStringView > > {aka std::basic_string_view<char>} > > > > On Wed, Mar 19, 2025 at 10:46 AM Randy MacLeod > > <randy.macleod@windriver.com> wrote: > > > > > > On 2025-03-17 2:06 a.m., hongxu via lists.openembedded.org wrote: > > > > > > Refresh local patches > > > - 0001-Fix-build-on-mips-clang.patch > > > - 0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch > > > > > > Fix protobuf-native build failure with gcc 10 > > > > > > Changelog: > > > https://github.com/protocolbuffers/protobuf/releases/tag/v30.0 > > > > > > Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > > > --- > > > .../0001-Fix-build-on-mips-clang.patch | 26 +++++++---- > > > ...e-respect-CXX-LDFLAGS-variables-fix-.patch | 25 +++++------ > > > ...buf-native-build-failure-with-gcc-10.patch | 43 +++++++++++++++++++ > > > ...{protobuf_4.25.5.bb => protobuf_4.30.0.bb} | 5 ++- > > > > > > > > > Ping Khem: > > > Does that fix the ubu-20.04 problem? > > > > > > Also, Hongxu, should the python package also be updated? > > > > > > ❯ fd protobuf_4 > > > meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb > > > meta-python/recipes-devtools/python/python3-protobuf_4.25.3.bb > > > > > > ../Randy > > > > > > > > > 4 files changed, 76 insertions(+), 23 deletions(-) > > > create mode 100644 meta-oe/recipes-devtools/protobuf/protobuf/0001-fix- > > protobuf-native-build-failure-with-gcc-10.patch > > > rename meta-oe/recipes-devtools/protobuf/{protobuf_4.25.5.bb => > > protobuf_4.30.0.bb} (97%) > > > > > > diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips- > > clang.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips- > > clang.patch > > > index 9f6116c4c4..6db22c26d3 100644 > > > --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips- > > clang.patch > > > +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips- > > clang.patch > > > @@ -1,6 +1,6 @@ > > > -From 08e46feb6553af670754e65d94c3bb6fcd4e0cf9 Mon Sep 17 00:00:00 2001 > > > +From fd5a966a6385165506a1b84298465cbb9f44222d Mon Sep 17 00:00:00 > > 2001 > > > From: Khem Raj <raj.khem@gmail.com> > > > -Date: Sun, 31 Oct 2021 23:39:44 -0700 > > > +Date: Mon, 10 Mar 2025 19:59:19 -0700 > > > Subject: [PATCH] Fix build on mips/clang > > > > > > clang13 crashes on mips, until its fixed upstream disable tailcall on > > > @@ -10,17 +10,25 @@ https://bugs.llvm.org/show_bug.cgi?id=52367 > > > > > > Upstream-Status: Inappropriate [Clang workaround] > > > Signed-off-by: Khem Raj <raj.khem@gmail.com> > > > + > > > +Rebase to v4.30.0 > > > +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > > > --- > > > - src/google/protobuf/port_def.inc | 2 +- > > > - 1 file changed, 1 insertion(+), 1 deletion(-) > > > + src/google/protobuf/port_def.inc | 1 + > > > + 1 file changed, 1 insertion(+) > > > > > > +diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc > > > +index 35f49afb4..e9597af0d 100644 > > > --- a/src/google/protobuf/port_def.inc > > > +++ b/src/google/protobuf/port_def.inc > > > -@@ -255,6 +255,7 @@ > > > +@@ -222,6 +222,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3), > > > #error PROTOBUF_TAILCALL was previously defined > > > #endif > > > - #if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \ > > > + #if ABSL_HAVE_CPP_ATTRIBUTE(clang::musttail) && !defined(__arm__) && \ > > > + !defined(__mips__) && \ > > > - !defined(_ARCH_PPC) && !defined(__wasm__) && \ > > > - !(defined(_MSC_VER) && defined(_M_IX86)) && \ > > > - !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24) > > > + !defined(_ARCH_PPC) && !defined(__wasm__) && \ > > > + !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) > > > + // Compilation fails on ARM32: b/195943306 > > > +-- > > > +2.25.1 > > > + > > > 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 7c4bf260eb..1b68c24c96 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 > > > @@ -1,13 +1,12 @@ > > > -From e3fa241637ab5a7fa78c0d474802134cff75f91e Mon Sep 17 00:00:00 2001 > > > +From 9d50661003d78a4debfc7eda532f0b53df51fd7c Mon Sep 17 00:00:00 > > 2001 > > > From: Martin Jansa <Martin.Jansa@gmail.com> > > > -Date: Fri, 28 Jun 2019 13:50:52 +0000 > > > -Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix > > build > > > - with gold > > > +Date: Thu, 13 Mar 2025 10:54:01 +0800 > > > +Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables > > > > > > * move pkg-config call to separate variable, so that the final version > > > of the whole command so it's shown in log.do_compile_ptest_base > > > * add ../src/google/protobuf/.libs/timestamp.pb.o when linking > > > - add_person_cpp otherwise it fails to link with gold: > > > + add_person_cpp otherwise it fails: > > > i686-oe-linux-g++ -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -- > > sysroot=core2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot -Wl,-O1 -Wl,--hash- > > style=gnu -Wl,--as-needed add_person.cc addressbook.pb.cc -o add_person_cpp > > `pkg-config --cflags --libs protobuf` > > > /tmp/cccjSJQs.o:addressbook.pb.cc:scc_info_Person_addressbook_2eproto: > > error: undefined reference to > > 'scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto' > > > > > /tmp/cccjSJQs.o:addressbook.pb.cc:descriptor_table_addressbook_2eproto_dep > > s: error: undefined reference to > > 'descriptor_table_google_2fprotobuf_2ftimestamp_2eproto' > > > @@ -25,12 +24,14 @@ Upstream-Status: Pending > > > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> > > > Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> > > > > > > +Rebase to v4.30.0 > > > +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > > > --- > > > examples/Makefile | 6 ++++-- > > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > > > diff --git a/examples/Makefile b/examples/Makefile > > > -index ef7a4ef58..7206e14e1 100644 > > > +index 5290fdb03f..3b9545bf2a 100644 > > > --- a/examples/Makefile > > > +++ b/examples/Makefile > > > @@ -2,6 +2,8 @@ > > > @@ -42,20 +43,20 @@ index ef7a4ef58..7206e14e1 100644 > > > all: cpp java python > > > > > > cpp: add_person_cpp list_people_cpp > > > -@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto > > > +@@ -46,11 +48,11 @@ protoc_middleman_ruby: addressbook.proto > > > > > > add_person_cpp: add_person.cc protoc_middleman > > > pkg-config --cflags protobuf # fails if protobuf is not installed > > > -- 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 > > > +- c++ 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 > > > > > > list_people_cpp: list_people.cc protoc_middleman > > > pkg-config --cflags protobuf # fails if protobuf is not installed > > > -- 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 > > > +- c++ 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 > > > > > > add_person_dart: add_person.dart protoc_middleman_dart > > > > > > --- > > > +-- > > > 2.34.1 > > > > > > diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native- > > build-failure-with-gcc-10.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001- > > fix-protobuf-native-build-failure-with-gcc-10.patch > > > new file mode 100644 > > > index 0000000000..d7c9f38eff > > > --- /dev/null > > > +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native- > > build-failure-with-gcc-10.patch > > > @@ -0,0 +1,43 @@ > > > +From 03dabf4b153071ec1bdcd2c278461984cc6f1714 Mon Sep 17 00:00:00 > > 2001 > > > +From: Khem Raj <raj.khem@gmail.com> > > > +Date: Mon, 17 Mar 2025 13:28:13 +0800 > > > +Subject: [PATCH] fix protobuf-native build failure with gcc 10 > > > + > > > +Build protobuf-native failed on ubuntu 20.04 which has gcc 10 > > > + > > > +protobuf-native/4.30.0/git/src/google/protobuf/port_def.inc:105:48: > > > +error: static assertion failed: Protobuf only supports C+ > > > + ↪ +17 and newer. > > > + | 105 | #define PROTOBUF_CPLUSPLUS_MIN(x) (__cplusplus >= x) > > > + | | ~~~~~~~~~~~~~^~~~~ > > > + | /home/kraj01/yoe/build/tmp/work/x86_64-linux/protobuf- > > native/4.30.0/git/src/google/protobuf/port_def.inc:119:15: > > > +note: in expansion of macro ‘PROTOBUF_CPLUSPLUS_MIN’ > > > + | 119 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201703L), > > > + | | ^~~~~~~~~~~~~~~~~~~~~~ > > > + > > > +Upstream-Status: Pending > > > + > > > +Signed-off-by: Khem Raj <raj.khem@gmail.com> > > > +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > > > +--- > > > + CMakeLists.txt | 4 ++++ > > > + 1 file changed, 4 insertions(+) > > > + > > > +diff --git a/CMakeLists.txt b/CMakeLists.txt > > > +index ae3c324..eda19aa 100644 > > > +--- a/CMakeLists.txt > > > ++++ b/CMakeLists.txt > > > +@@ -14,6 +14,10 @@ endif() > > > + # Project > > > + project(protobuf C CXX) > > > + > > > ++set(CMAKE_CXX_STANDARD 17) > > > ++set(CMAKE_CXX_STANDARD_REQUIRED ON) > > > ++set(CMAKE_CXX_EXTENSIONS OFF) > > > ++ > > > + if(protobuf_DEPRECATED_CMAKE_SUBDIRECTORY_USAGE) > > > + if(CMAKE_PROJECT_NAME STREQUAL "protobuf") > > > + get_filename_component(CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR} > > DIRECTORY) > > > +-- > > > +2.34.1 > > > + > > > diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb b/meta- > > oe/recipes-devtools/protobuf/protobuf_4.30.0.bb > > > similarity index 97% > > > rename from meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb > > > rename to meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb > > > index a470a7c643..0d6123dfa0 100644 > > > --- a/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb > > > +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb > > > @@ -14,11 +14,12 @@ LIC_FILES_CHKSUM = " \ > > > DEPENDS = "zlib abseil-cpp jsoncpp" > > > DEPENDS:append:class-target = " protobuf-native" > > > > > > -SRCREV = "9d0ec0f92b5b5fdeeda11f9dcecc1872ff378014" > > > +SRCREV = "d295af5c3002c08e1bfd9d7f9e175d0a4d015f1e" > > > > > > -SRC_URI = > > "git://github.com/protocolbuffers/protobuf.git;branch=25.x;protocol=https \ > > > +SRC_URI = > > "git://github.com/protocolbuffers/protobuf.git;branch=30.x;protocol=https \ > > > file://run-ptest \ > > > file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch > > \ > > > + file://0001-fix-protobuf-native-build-failure-with-gcc-10.patch \ > > > " > > > SRC_URI:append:mips:toolchain-clang = " file://0001-Fix-build-on-mips- > > clang.patch " > > > SRC_URI:append:mipsel:toolchain-clang = " file://0001-Fix-build-on-mips- > > clang.patch " > > > > > > > > > > > > > > > > > > -- > > > # Randy MacLeod > > > # Wind River Linux
On 3/21/25 02: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. > > On Thu, Mar 20, 2025 at 6:04 AM Marko, Peter <Peter.Marko@siemens.com> wrote: >> This version update is imho wrong. >> >> 4.30.x is not a C++ tag, please check https://protobuf.dev/support/version-support/#cpp >> We should either take 5.29.4 to have "new LTS" (patch releases for 1 year) >> or 6.30.1 to have the latest and greatest (patch releases for 3 months) >> I think 5.29.x is the correct choice, but since next Yocto LTS is still 1 year ahead, >> 6.30.x is also acceptable with risk that dependent components may get broken a lot. >> > Thanks for sharing the release schedules, while I would like to see > 6.x in master at some point > and perhaps get 6.33 into next yocto LTS in Apr 2026, it might be > better to stick with 5.29 in this > release since there still is good 1 year before the next LTS Copy, I will upgrade it to 5.29.4, v5 incoming //Hongxu >> Peter >> >> >>> -----Original Message----- >>> From: openembedded-devel@lists.openembedded.org <openembedded- >>> devel@lists.openembedded.org> On Behalf Of Khem Raj via >>> lists.openembedded.org >>> Sent: Thursday, March 20, 2025 4:12 >>> To: Randy MacLeod <randy.macleod@windriver.com> >>> Cc: hongxu.jia@eng.windriver.com; openembedded- >>> devel@lists.openembedded.org >>> Subject: Re: [oe] [meta-oe][PATCH v4] protobuf: 4.25.5 -> 4.30.0 >>> >>> btw this breaks qtgrpc from meta-qt6 >>> >>> | /mnt/b/yoe/master/build/tmp/work/x86_64-linux/qtgrpc- >>> native/6.9.0/git/src/tools/qtprotobufgen/qprotobufgenerator.cpp:205:82: >>> error: could not convert >>> ‘file->google::protobuf::FileDescriptor::dependency(i)- >>>> google::protobuf::FileDescriptor::name()’ >>> from ‘google::protobuf::internal::DescriptorStringView’ {aka >>> ‘std::basic_string_view<char>’} to ‘std::string’ {aka >>> ‘std::__cxx11::basic_string<char>’} >>> | 205 | >>> internalIncludes.insert(utils::removeFileSuffix(file->dependency(i)->name()) >>> | | >>> ~~~~~~~~~~~~~~~~~~~~~~~~~^~ >>> | | >>> | >>> | | >>> google::protobuf::internal::DescriptorStringView >>> {aka std::basic_string_view<char>} >>> >>> On Wed, Mar 19, 2025 at 10:46 AM Randy MacLeod >>> <randy.macleod@windriver.com> wrote: >>>> On 2025-03-17 2:06 a.m., hongxu via lists.openembedded.org wrote: >>>> >>>> Refresh local patches >>>> - 0001-Fix-build-on-mips-clang.patch >>>> - 0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch >>>> >>>> Fix protobuf-native build failure with gcc 10 >>>> >>>> Changelog: >>>> https://github.com/protocolbuffers/protobuf/releases/tag/v30.0 >>>> >>>> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> >>>> --- >>>> .../0001-Fix-build-on-mips-clang.patch | 26 +++++++---- >>>> ...e-respect-CXX-LDFLAGS-variables-fix-.patch | 25 +++++------ >>>> ...buf-native-build-failure-with-gcc-10.patch | 43 +++++++++++++++++++ >>>> ...{protobuf_4.25.5.bb => protobuf_4.30.0.bb} | 5 ++- >>>> >>>> >>>> Ping Khem: >>>> Does that fix the ubu-20.04 problem? >>>> >>>> Also, Hongxu, should the python package also be updated? >>>> >>>> ❯ fd protobuf_4 >>>> meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb >>>> meta-python/recipes-devtools/python/python3-protobuf_4.25.3.bb >>>> >>>> ../Randy >>>> >>>> >>>> 4 files changed, 76 insertions(+), 23 deletions(-) >>>> create mode 100644 meta-oe/recipes-devtools/protobuf/protobuf/0001-fix- >>> protobuf-native-build-failure-with-gcc-10.patch >>>> rename meta-oe/recipes-devtools/protobuf/{protobuf_4.25.5.bb => >>> protobuf_4.30.0.bb} (97%) >>>> diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips- >>> clang.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips- >>> clang.patch >>>> index 9f6116c4c4..6db22c26d3 100644 >>>> --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips- >>> clang.patch >>>> +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips- >>> clang.patch >>>> @@ -1,6 +1,6 @@ >>>> -From 08e46feb6553af670754e65d94c3bb6fcd4e0cf9 Mon Sep 17 00:00:00 2001 >>>> +From fd5a966a6385165506a1b84298465cbb9f44222d Mon Sep 17 00:00:00 >>> 2001 >>>> From: Khem Raj <raj.khem@gmail.com> >>>> -Date: Sun, 31 Oct 2021 23:39:44 -0700 >>>> +Date: Mon, 10 Mar 2025 19:59:19 -0700 >>>> Subject: [PATCH] Fix build on mips/clang >>>> >>>> clang13 crashes on mips, until its fixed upstream disable tailcall on >>>> @@ -10,17 +10,25 @@ https://bugs.llvm.org/show_bug.cgi?id=52367 >>>> >>>> Upstream-Status: Inappropriate [Clang workaround] >>>> Signed-off-by: Khem Raj <raj.khem@gmail.com> >>>> + >>>> +Rebase to v4.30.0 >>>> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> >>>> --- >>>> - src/google/protobuf/port_def.inc | 2 +- >>>> - 1 file changed, 1 insertion(+), 1 deletion(-) >>>> + src/google/protobuf/port_def.inc | 1 + >>>> + 1 file changed, 1 insertion(+) >>>> >>>> +diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc >>>> +index 35f49afb4..e9597af0d 100644 >>>> --- a/src/google/protobuf/port_def.inc >>>> +++ b/src/google/protobuf/port_def.inc >>>> -@@ -255,6 +255,7 @@ >>>> +@@ -222,6 +222,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3), >>>> #error PROTOBUF_TAILCALL was previously defined >>>> #endif >>>> - #if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \ >>>> + #if ABSL_HAVE_CPP_ATTRIBUTE(clang::musttail) && !defined(__arm__) && \ >>>> + !defined(__mips__) && \ >>>> - !defined(_ARCH_PPC) && !defined(__wasm__) && \ >>>> - !(defined(_MSC_VER) && defined(_M_IX86)) && \ >>>> - !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24) >>>> + !defined(_ARCH_PPC) && !defined(__wasm__) && \ >>>> + !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) >>>> + // Compilation fails on ARM32: b/195943306 >>>> +-- >>>> +2.25.1 >>>> + >>>> 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 7c4bf260eb..1b68c24c96 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 >>>> @@ -1,13 +1,12 @@ >>>> -From e3fa241637ab5a7fa78c0d474802134cff75f91e Mon Sep 17 00:00:00 2001 >>>> +From 9d50661003d78a4debfc7eda532f0b53df51fd7c Mon Sep 17 00:00:00 >>> 2001 >>>> From: Martin Jansa <Martin.Jansa@gmail.com> >>>> -Date: Fri, 28 Jun 2019 13:50:52 +0000 >>>> -Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix >>> build >>>> - with gold >>>> +Date: Thu, 13 Mar 2025 10:54:01 +0800 >>>> +Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables >>>> >>>> * move pkg-config call to separate variable, so that the final version >>>> of the whole command so it's shown in log.do_compile_ptest_base >>>> * add ../src/google/protobuf/.libs/timestamp.pb.o when linking >>>> - add_person_cpp otherwise it fails to link with gold: >>>> + add_person_cpp otherwise it fails: >>>> i686-oe-linux-g++ -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -- >>> sysroot=core2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot -Wl,-O1 -Wl,--hash- >>> style=gnu -Wl,--as-needed add_person.cc addressbook.pb.cc -o add_person_cpp >>> `pkg-config --cflags --libs protobuf` >>>> /tmp/cccjSJQs.o:addressbook.pb.cc:scc_info_Person_addressbook_2eproto: >>> error: undefined reference to >>> 'scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto' >>> /tmp/cccjSJQs.o:addressbook.pb.cc:descriptor_table_addressbook_2eproto_dep >>> s: error: undefined reference to >>> 'descriptor_table_google_2fprotobuf_2ftimestamp_2eproto' >>>> @@ -25,12 +24,14 @@ Upstream-Status: Pending >>>> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> >>>> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> >>>> >>>> +Rebase to v4.30.0 >>>> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> >>>> --- >>>> examples/Makefile | 6 ++++-- >>>> 1 file changed, 4 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/examples/Makefile b/examples/Makefile >>>> -index ef7a4ef58..7206e14e1 100644 >>>> +index 5290fdb03f..3b9545bf2a 100644 >>>> --- a/examples/Makefile >>>> +++ b/examples/Makefile >>>> @@ -2,6 +2,8 @@ >>>> @@ -42,20 +43,20 @@ index ef7a4ef58..7206e14e1 100644 >>>> all: cpp java python >>>> >>>> cpp: add_person_cpp list_people_cpp >>>> -@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto >>>> +@@ -46,11 +48,11 @@ protoc_middleman_ruby: addressbook.proto >>>> >>>> add_person_cpp: add_person.cc protoc_middleman >>>> pkg-config --cflags protobuf # fails if protobuf is not installed >>>> -- 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 >>>> +- c++ 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 >>>> list_people_cpp: list_people.cc protoc_middleman >>>> pkg-config --cflags protobuf # fails if protobuf is not installed >>>> -- 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 >>>> +- c++ 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 >>>> add_person_dart: add_person.dart protoc_middleman_dart >>>> >>>> --- >>>> +-- >>>> 2.34.1 >>>> >>>> diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native- >>> build-failure-with-gcc-10.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001- >>> fix-protobuf-native-build-failure-with-gcc-10.patch >>>> new file mode 100644 >>>> index 0000000000..d7c9f38eff >>>> --- /dev/null >>>> +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native- >>> build-failure-with-gcc-10.patch >>>> @@ -0,0 +1,43 @@ >>>> +From 03dabf4b153071ec1bdcd2c278461984cc6f1714 Mon Sep 17 00:00:00 >>> 2001 >>>> +From: Khem Raj <raj.khem@gmail.com> >>>> +Date: Mon, 17 Mar 2025 13:28:13 +0800 >>>> +Subject: [PATCH] fix protobuf-native build failure with gcc 10 >>>> + >>>> +Build protobuf-native failed on ubuntu 20.04 which has gcc 10 >>>> + >>>> +protobuf-native/4.30.0/git/src/google/protobuf/port_def.inc:105:48: >>>> +error: static assertion failed: Protobuf only supports C+ >>>> + ↪ +17 and newer. >>>> + | 105 | #define PROTOBUF_CPLUSPLUS_MIN(x) (__cplusplus >= x) >>>> + | | ~~~~~~~~~~~~~^~~~~ >>>> + | /home/kraj01/yoe/build/tmp/work/x86_64-linux/protobuf- >>> native/4.30.0/git/src/google/protobuf/port_def.inc:119:15: >>>> +note: in expansion of macro ‘PROTOBUF_CPLUSPLUS_MIN’ >>>> + | 119 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201703L), >>>> + | | ^~~~~~~~~~~~~~~~~~~~~~ >>>> + >>>> +Upstream-Status: Pending >>>> + >>>> +Signed-off-by: Khem Raj <raj.khem@gmail.com> >>>> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> >>>> +--- >>>> + CMakeLists.txt | 4 ++++ >>>> + 1 file changed, 4 insertions(+) >>>> + >>>> +diff --git a/CMakeLists.txt b/CMakeLists.txt >>>> +index ae3c324..eda19aa 100644 >>>> +--- a/CMakeLists.txt >>>> ++++ b/CMakeLists.txt >>>> +@@ -14,6 +14,10 @@ endif() >>>> + # Project >>>> + project(protobuf C CXX) >>>> + >>>> ++set(CMAKE_CXX_STANDARD 17) >>>> ++set(CMAKE_CXX_STANDARD_REQUIRED ON) >>>> ++set(CMAKE_CXX_EXTENSIONS OFF) >>>> ++ >>>> + if(protobuf_DEPRECATED_CMAKE_SUBDIRECTORY_USAGE) >>>> + if(CMAKE_PROJECT_NAME STREQUAL "protobuf") >>>> + get_filename_component(CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR} >>> DIRECTORY) >>>> +-- >>>> +2.34.1 >>>> + >>>> diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb b/meta- >>> oe/recipes-devtools/protobuf/protobuf_4.30.0.bb >>>> similarity index 97% >>>> rename from meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb >>>> rename to meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb >>>> index a470a7c643..0d6123dfa0 100644 >>>> --- a/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb >>>> +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb >>>> @@ -14,11 +14,12 @@ LIC_FILES_CHKSUM = " \ >>>> DEPENDS = "zlib abseil-cpp jsoncpp" >>>> DEPENDS:append:class-target = " protobuf-native" >>>> >>>> -SRCREV = "9d0ec0f92b5b5fdeeda11f9dcecc1872ff378014" >>>> +SRCREV = "d295af5c3002c08e1bfd9d7f9e175d0a4d015f1e" >>>> >>>> -SRC_URI = >>> "git://github.com/protocolbuffers/protobuf.git;branch=25.x;protocol=https \ >>>> +SRC_URI = >>> "git://github.com/protocolbuffers/protobuf.git;branch=30.x;protocol=https \ >>>> file://run-ptest \ >>>> file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch >>> \ >>>> + file://0001-fix-protobuf-native-build-failure-with-gcc-10.patch \ >>>> " >>>> SRC_URI:append:mips:toolchain-clang = " file://0001-Fix-build-on-mips- >>> clang.patch " >>>> SRC_URI:append:mipsel:toolchain-clang = " file://0001-Fix-build-on-mips- >>> clang.patch " >>>> >>>> >>>> >>>> >>>> -- >>>> # Randy MacLeod >>>> # Wind River Linux
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch index 9f6116c4c4..6db22c26d3 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch @@ -1,6 +1,6 @@ -From 08e46feb6553af670754e65d94c3bb6fcd4e0cf9 Mon Sep 17 00:00:00 2001 +From fd5a966a6385165506a1b84298465cbb9f44222d Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 31 Oct 2021 23:39:44 -0700 +Date: Mon, 10 Mar 2025 19:59:19 -0700 Subject: [PATCH] Fix build on mips/clang clang13 crashes on mips, until its fixed upstream disable tailcall on @@ -10,17 +10,25 @@ https://bugs.llvm.org/show_bug.cgi?id=52367 Upstream-Status: Inappropriate [Clang workaround] Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Rebase to v4.30.0 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- - src/google/protobuf/port_def.inc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/google/protobuf/port_def.inc | 1 + + 1 file changed, 1 insertion(+) +diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc +index 35f49afb4..e9597af0d 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc -@@ -255,6 +255,7 @@ +@@ -222,6 +222,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3), #error PROTOBUF_TAILCALL was previously defined #endif - #if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \ + #if ABSL_HAVE_CPP_ATTRIBUTE(clang::musttail) && !defined(__arm__) && \ + !defined(__mips__) && \ - !defined(_ARCH_PPC) && !defined(__wasm__) && \ - !(defined(_MSC_VER) && defined(_M_IX86)) && \ - !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24) + !defined(_ARCH_PPC) && !defined(__wasm__) && \ + !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) + // Compilation fails on ARM32: b/195943306 +-- +2.25.1 + 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 7c4bf260eb..1b68c24c96 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 @@ -1,13 +1,12 @@ -From e3fa241637ab5a7fa78c0d474802134cff75f91e Mon Sep 17 00:00:00 2001 +From 9d50661003d78a4debfc7eda532f0b53df51fd7c Mon Sep 17 00:00:00 2001 From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Fri, 28 Jun 2019 13:50:52 +0000 -Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build - with gold +Date: Thu, 13 Mar 2025 10:54:01 +0800 +Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables * move pkg-config call to separate variable, so that the final version of the whole command so it's shown in log.do_compile_ptest_base * add ../src/google/protobuf/.libs/timestamp.pb.o when linking - add_person_cpp otherwise it fails to link with gold: + add_person_cpp otherwise it fails: i686-oe-linux-g++ -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=core2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` /tmp/cccjSJQs.o:addressbook.pb.cc:scc_info_Person_addressbook_2eproto: error: undefined reference to 'scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto' /tmp/cccjSJQs.o:addressbook.pb.cc:descriptor_table_addressbook_2eproto_deps: error: undefined reference to 'descriptor_table_google_2fprotobuf_2ftimestamp_2eproto' @@ -25,12 +24,14 @@ Upstream-Status: Pending Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> +Rebase to v4.30.0 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- examples/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/Makefile b/examples/Makefile -index ef7a4ef58..7206e14e1 100644 +index 5290fdb03f..3b9545bf2a 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -2,6 +2,8 @@ @@ -42,20 +43,20 @@ index ef7a4ef58..7206e14e1 100644 all: cpp java python cpp: add_person_cpp list_people_cpp -@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto +@@ -46,11 +48,11 @@ protoc_middleman_ruby: addressbook.proto add_person_cpp: add_person.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed -- 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 +- c++ 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 list_people_cpp: list_people.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed -- 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 +- c++ 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 add_person_dart: add_person.dart protoc_middleman_dart --- +-- 2.34.1 diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch new file mode 100644 index 0000000000..d7c9f38eff --- /dev/null +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch @@ -0,0 +1,43 @@ +From 03dabf4b153071ec1bdcd2c278461984cc6f1714 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 17 Mar 2025 13:28:13 +0800 +Subject: [PATCH] fix protobuf-native build failure with gcc 10 + +Build protobuf-native failed on ubuntu 20.04 which has gcc 10 + +protobuf-native/4.30.0/git/src/google/protobuf/port_def.inc:105:48: +error: static assertion failed: Protobuf only supports C+ + ↪ +17 and newer. + | 105 | #define PROTOBUF_CPLUSPLUS_MIN(x) (__cplusplus >= x) + | | ~~~~~~~~~~~~~^~~~~ + | /home/kraj01/yoe/build/tmp/work/x86_64-linux/protobuf-native/4.30.0/git/src/google/protobuf/port_def.inc:119:15: +note: in expansion of macro ‘PROTOBUF_CPLUSPLUS_MIN’ + | 119 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201703L), + | | ^~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ae3c324..eda19aa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,6 +14,10 @@ endif() + # Project + project(protobuf C CXX) + ++set(CMAKE_CXX_STANDARD 17) ++set(CMAKE_CXX_STANDARD_REQUIRED ON) ++set(CMAKE_CXX_EXTENSIONS OFF) ++ + if(protobuf_DEPRECATED_CMAKE_SUBDIRECTORY_USAGE) + if(CMAKE_PROJECT_NAME STREQUAL "protobuf") + get_filename_component(CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR} DIRECTORY) +-- +2.34.1 + diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb b/meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb similarity index 97% rename from meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb rename to meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb index a470a7c643..0d6123dfa0 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf_4.25.5.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.30.0.bb @@ -14,11 +14,12 @@ LIC_FILES_CHKSUM = " \ DEPENDS = "zlib abseil-cpp jsoncpp" DEPENDS:append:class-target = " protobuf-native" -SRCREV = "9d0ec0f92b5b5fdeeda11f9dcecc1872ff378014" +SRCREV = "d295af5c3002c08e1bfd9d7f9e175d0a4d015f1e" -SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=25.x;protocol=https \ +SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=30.x;protocol=https \ file://run-ptest \ file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ + file://0001-fix-protobuf-native-build-failure-with-gcc-10.patch \ " SRC_URI:append:mips:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " SRC_URI:append:mipsel:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch "
Refresh local patches - 0001-Fix-build-on-mips-clang.patch - 0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch Fix protobuf-native build failure with gcc 10 Changelog: https://github.com/protocolbuffers/protobuf/releases/tag/v30.0 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- .../0001-Fix-build-on-mips-clang.patch | 26 +++++++---- ...e-respect-CXX-LDFLAGS-variables-fix-.patch | 25 +++++------ ...buf-native-build-failure-with-gcc-10.patch | 43 +++++++++++++++++++ ...{protobuf_4.25.5.bb => protobuf_4.30.0.bb} | 5 ++- 4 files changed, 76 insertions(+), 23 deletions(-) create mode 100644 meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch rename meta-oe/recipes-devtools/protobuf/{protobuf_4.25.5.bb => protobuf_4.30.0.bb} (97%)