diff options
Diffstat (limited to 'meta-oe/recipes-devtools/protobuf')
-rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf-c/0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch | 106 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.0.bb (renamed from meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb) | 6 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch | 67 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch | 15 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf_4.25.3.bb (renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.5.bb) | 23 |
5 files changed, 137 insertions, 80 deletions
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch new file mode 100644 index 0000000000..896a568e19 --- /dev/null +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch @@ -0,0 +1,106 @@ +From 62b2fd0a150133b6439f6537cb1762d35f5790ee Mon Sep 17 00:00:00 2001 +From: Xiangyu Chen <xiangyu.chen@windriver.com> +Date: Fri, 31 Mar 2023 16:02:50 +0800 +Subject: [PATCH] Makefile.am: do not compile the code which was generated from + test-full.proto in protobuf-c-native + +Those code was auto generated by protoc command with test-full.proto, those code are not compatible +with protobuf 4.22.x, so temporarily disable compile those code until protobuf-c upstream adapt +the test-full.proto with latest version protobuf. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> +--- + Makefile.am | 75 ----------------------------------------------------- + 1 file changed, 75 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index ff12664..7412aef 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -136,81 +136,6 @@ else + + LOG_COMPILER = $(VALGRIND) + +-check_PROGRAMS += \ +- t/generated-code/test-generated-code \ +- t/generated-code2/test-generated-code2 \ +- t/generated-code3/test-generated-code3 \ +- t/version/version +- +-TESTS += \ +- t/generated-code/test-generated-code \ +- t/generated-code2/test-generated-code2 \ +- t/generated-code3/test-generated-code3 \ +- t/version/version +- +-t_generated_code_test_generated_code_SOURCES = \ +- t/generated-code/test-generated-code.c \ +- t/test.pb-c.c +-t_generated_code_test_generated_code_LDADD = \ +- protobuf-c/libprotobuf-c.la +- +-t_generated_code2_test_generated_code2_SOURCES = \ +- t/generated-code2/test-generated-code2.c \ +- t/test-full.pb-c.c \ +- t/test-optimized.pb-c.c +-t_generated_code2_test_generated_code2_LDADD = \ +- protobuf-c/libprotobuf-c.la +- +-t_generated_code3_test_generated_code3_CPPFLAGS = \ +- -DPROTO3 +- +-t_generated_code3_test_generated_code3_SOURCES = \ +- t/generated-code/test-generated-code.c \ +- t/test-proto3.pb-c.c +- +-t_generated_code3_test_generated_code3_LDADD = \ +- protobuf-c/libprotobuf-c.la +- +-noinst_PROGRAMS += \ +- t/generated-code2/cxx-generate-packed-data +- +-t_generated_code2_cxx_generate_packed_data_SOURCES = \ +- t/generated-code2/cxx-generate-packed-data.cc \ +- t/test-full.pb.cc \ +- protobuf-c/protobuf-c.pb.cc +-$(t_generated_code2_cxx_generate_packed_data_OBJECTS): t/test-full.pb.h +-t_generated_code2_cxx_generate_packed_data_CXXFLAGS = \ +- $(AM_CXXFLAGS) \ +- $(protobuf_CFLAGS) +-t_generated_code2_cxx_generate_packed_data_LDADD = \ +- $(protobuf_LIBS) +- +-t/test.pb-c.c t/test.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test.proto +- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test.proto +- +-t/test-optimized.pb-c.c t/test-optimized.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-optimized.proto +- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-optimized.proto +- +-t/test-full.pb-c.c t/test-full.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-full.proto +- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-full.proto +- +-t/test-full.pb.cc t/test-full.pb.h: @PROTOC@ $(top_srcdir)/t/test-full.proto +- $(AM_V_GEN)@PROTOC@ -I$(top_srcdir) --cpp_out=$(top_builddir) $(top_srcdir)/t/test-full.proto +- +-t/test-proto3.pb-c.c t/test-proto3.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-proto3.proto +- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-proto3.proto +- +-t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT) +- $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc +- +-BUILT_SOURCES += \ +- t/test.pb-c.c t/test.pb-c.h \ +- t/test-full.pb-c.c t/test-full.pb-c.h \ +- t/test-optimized.pb-c.c t/test-optimized.pb-c.h \ +- t/test-full.pb.cc t/test-full.pb.h \ +- t/test-proto3.pb-c.c t/test-proto3.pb-c.h \ +- t/generated-code2/test-full-cxx-output.inc +- + t_version_version_SOURCES = \ + t/version/version.c + t_version_version_LDADD = \ +-- +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.5.0.bb index d724287d66..24de6b8119 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.0.bb @@ -8,12 +8,14 @@ has been split out into the protobuf-c-rpc project." HOMEPAGE = "https://github.com/protobuf-c/protobuf-c" SECTION = "console/tools" LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=9f725889e0d77383e26cb42b0b62cea2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d11077c6a2b5d2e64b9f32b61a9b78ba" DEPENDS = "protobuf-native protobuf" SRC_URI = "git://github.com/protobuf-c/protobuf-c.git;branch=master;protocol=https" -SRCREV = "abc67a11c6db271bedbb9f58be85d6f4e2ea8389" +SRC_URI:append:class-native = " file://0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch" + +SRCREV = "8c201f6e47a53feaab773922a743091eb6c8972a" S = "${WORKDIR}/git" diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch deleted file mode 100644 index 2bcb138731..0000000000 --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch +++ /dev/null @@ -1,67 +0,0 @@ -From a91130bb95528743a3f7253f8fe945b7505047d5 Mon Sep 17 00:00:00 2001 -From: Kyungjik Min <dp.min@lge.com> -Date: Mon, 28 Dec 2020 15:56:09 +0900 -Subject: [PATCH] Fix linking error with ld-gold - -:Release Notes: - -:Detailed Notes: -https://github.com/protocolbuffers/protobuf/issues/6113 -There's a bug in the CMake build leading it to not use the version -scripts, which hides the problem (because all symbols are now public) -but doesn't solve it properly. - -:Testing Performed: - -:QA Notes: -N/A - -:Issues Addressed: -[PLAT-130467] Fix build error for libgoogleassistant with latest - protobuf-3.11.4 - ---- - src/libprotobuf-lite.map | 2 ++ - src/libprotobuf.map | 2 ++ - src/libprotoc.map | 2 ++ - 3 files changed, 6 insertions(+) - -diff --git a/src/libprotobuf-lite.map b/src/libprotobuf-lite.map -index 391554669..a1853ca6c 100644 ---- a/src/libprotobuf-lite.map -+++ b/src/libprotobuf-lite.map -@@ -3,6 +3,8 @@ - extern "C++" { - *google*; - }; -+ scc_info_*; -+ descriptor_table_*; - - local: - *; -diff --git a/src/libprotobuf.map b/src/libprotobuf.map -index 391554669..a1853ca6c 100644 ---- a/src/libprotobuf.map -+++ b/src/libprotobuf.map -@@ -3,6 +3,8 @@ - extern "C++" { - *google*; - }; -+ scc_info_*; -+ descriptor_table_*; - - local: - *; -diff --git a/src/libprotoc.map b/src/libprotoc.map -index 391554669..a1853ca6c 100644 ---- a/src/libprotoc.map -+++ b/src/libprotoc.map -@@ -3,6 +3,8 @@ - extern "C++" { - *google*; - }; -+ scc_info_*; -+ descriptor_table_*; - - local: - *; 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 36c3c597ac..7c4bf260eb 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.5.bb b/meta-oe/recipes-devtools/protobuf/protobuf_4.25.3.bb index 0bc9cbedc0..3241345963 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.5.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.25.3.bb @@ -7,15 +7,14 @@ 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 = "ab840345966d0fa8e7100d771c92a73bfbadd25c" +SRCREV = "4a2aef570deb2bfb8927426558701e8bfc26f2a4" -SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=21.x;protocol=https \ +SRC_URI = "gitsm://github.com/protocolbuffers/protobuf.git;branch=25.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 \ " 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 " @@ -26,6 +25,7 @@ inherit cmake pkgconfig ptest PACKAGECONFIG ??= "" PACKAGECONFIG:class-native ?= "compiler" +PACKAGECONFIG:class-nativesdk ?= "compiler" PACKAGECONFIG[python] = ",," PACKAGECONFIG[compiler] = "-Dprotobuf_BUILD_PROTOC_BINARIES=ON,-Dprotobuf_BUILD_PROTOC_BINARIES=OFF" @@ -34,6 +34,7 @@ EXTRA_OECMAKE += "\ -Dprotobuf_BUILD_LIBPROTOC=ON \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_BUILD_EXAMPLES=OFF \ + -Dprotobuf_ABSL_PROVIDER="package" \ " TEST_SRC_DIR = "examples" @@ -49,9 +50,18 @@ do_compile_ptest() { cp ${S}/${TEST_SRC_DIR}/*.proto "${B}/${TEST_SRC_DIR}/" cp ${S}/${TEST_SRC_DIR}/*.py "${B}/${TEST_SRC_DIR}/" cp ${S}/${TEST_SRC_DIR}/Makefile "${B}/${TEST_SRC_DIR}/" + # Adapt protobuf.pc 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${S}/src |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Cflags:|Cflags: -I${WORKDIR}/recipe-sysroot${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/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" + # Adapt uf8_range.pc + cp "${B}/third_party/utf8_range/utf8_range.pc" "${B}/${TEST_SRC_DIR}/utf8_range.pc" + sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc" + sed -e 's|Libs:|Libs= -L${B}/third_party/utf8_range |' -i "${B}/${TEST_SRC_DIR}/utf8_range.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}" @@ -91,6 +101,9 @@ PACKAGE_BEFORE_PN = "${PN}-compiler ${PN}-lite" FILES:${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}" FILES:${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}" +# CMake requires protoc binary to exist in sysroot, even if it has wrong architecture. +SYSROOT_DIRS += "${bindir}" + RDEPENDS:${PN}-compiler = "${PN}" RDEPENDS:${PN}-dev += "${PN}-compiler" RDEPENDS:${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-protobuf', '', d)}" |