diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-devtools/protobuf')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c/protobuf3-compatibility.patch | 55 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.2.bb (renamed from meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.1.bb) | 4 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-Added-stubs-map_util.h-to-list-of-installed-headers.patch | 52 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch | 28 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch | 56 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.9.1.bb (renamed from meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.8.0.bb) | 10 |
6 files changed, 89 insertions, 116 deletions
diff --git a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c/protobuf3-compatibility.patch b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c/protobuf3-compatibility.patch deleted file mode 100644 index 35914952d..000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c/protobuf3-compatibility.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 7456d1621223d425b8a3fd74e435a79c046169fb Mon Sep 17 00:00:00 2001 -From: Robert Edmonds <edmonds@users.noreply.github.com> -Date: Wed, 10 Apr 2019 20:47:48 -0400 -Subject: [PATCH] t/generated-code2/cxx-generate-packed-data.cc: Fix build - failure on newer protobuf - - Upstream-Status: Backport [https://github.com/protobuf-c/protobuf-c/pull/369] - -google::protobuf::Message::Reflection has been removed in newer versions -of protobuf. The replacement is google::protobuf::Reflection. - -protobuf in commit 779f61c6a3ce02a119e28e802f229e61b69b9046 ("Integrate -recent changes from google3.", from August 2008) changed the following -in message.h: - - @@ -336,7 +337,8 @@ class LIBPROTOBUF_EXPORT Message { - - // Introspection --------------------------------------------------- - - - class Reflection; // Defined below. - + // Typedef for backwards-compatibility. - + typedef google::protobuf::Reflection Reflection; - -The "typedef for backwards-compatibility" apparently lasted ten years -until protobuf commit 6bbe197e9c1b6fc38cbdc45e3bf83fa7ced792a3 -("Down-integrate from google3.", from August 2018) which finally removed -the typedef: - - @@ -327,8 +344,6 @@ class LIBPROTOBUF_EXPORT Message : public MessageLite { - - // Introspection --------------------------------------------------- - - - // Typedef for backwards-compatibility. - - typedef google::protobuf::Reflection Reflection; - -This commit updates the only use of this typedef (in the test suite) to -directly refer to the replacement, google::protobuf::Reflection. This -fixes the build failure in the test suite. ---- - t/generated-code2/cxx-generate-packed-data.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/t/generated-code2/cxx-generate-packed-data.cc b/t/generated-code2/cxx-generate-packed-data.cc -index 4fd3e25..0865d2e 100644 ---- a/t/generated-code2/cxx-generate-packed-data.cc -+++ b/t/generated-code2/cxx-generate-packed-data.cc -@@ -998,7 +998,7 @@ static void dump_test_packed_repeated_enum (void) - static void dump_test_unknown_fields (void) - { - EmptyMess mess; -- const google::protobuf::Message::Reflection *reflection = mess.GetReflection(); -+ const google::protobuf::Reflection *reflection = mess.GetReflection(); - google::protobuf::UnknownFieldSet *fs = reflection->MutableUnknownFields(&mess); - - #if GOOGLE_PROTOBUF_VERSION >= 2001000 diff --git a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.1.bb b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.2.bb index 1d1782306..6d1ffc3f4 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.1.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.2.bb @@ -12,11 +12,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=cb901168715f4782a2b06c3ddaefa558" DEPENDS = "protobuf-native protobuf" -PV .= "+git${SRCPV}" -SRCREV = "269771b4b45d3aba04e59569f53600003db8d9ff" +SRCREV = "1390409f4ee4e26d0635310995b516eb702c3f9e" SRC_URI = "git://github.com/protobuf-c/protobuf-c.git \ - file://protobuf3-compatibility.patch \ " S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-Added-stubs-map_util.h-to-list-of-installed-headers.patch b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-Added-stubs-map_util.h-to-list-of-installed-headers.patch deleted file mode 100644 index a160e5e97..000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-Added-stubs-map_util.h-to-list-of-installed-headers.patch +++ /dev/null @@ -1,52 +0,0 @@ -From ea6e776e50971c89ad2293046b6ae2a6a9753c56 Mon Sep 17 00:00:00 2001 -From: Adam Cozzette <acozzette@google.com> -Date: Thu, 6 Jun 2019 10:29:58 -0700 -Subject: [PATCH] Added stubs/map_util.h to list of installed headers - -This should fix issue #6186. I also had to remove a couple unnecessary -const keywords in map_util.h because the no_warning_test was showing -errors about those. - -Upstream-Status: Submitted [https://github.com/protocolbuffers/protobuf/pull/6223] ---- - src/Makefile.am | 1 + - src/google/protobuf/stubs/map_util.h | 4 ++-- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index be18ba76..1689e221 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -72,6 +72,7 @@ nobase_include_HEADERS = \ - google/protobuf/stubs/hash.h \ - google/protobuf/stubs/logging.h \ - google/protobuf/stubs/macros.h \ -+ google/protobuf/stubs/map_util.h \ - google/protobuf/stubs/mutex.h \ - google/protobuf/stubs/once.h \ - google/protobuf/stubs/platform_macros.h \ -diff --git a/src/google/protobuf/stubs/map_util.h b/src/google/protobuf/stubs/map_util.h -index 2313e1f5..b04d9d46 100644 ---- a/src/google/protobuf/stubs/map_util.h -+++ b/src/google/protobuf/stubs/map_util.h -@@ -620,7 +620,7 @@ bool UpdateReturnCopy(Collection* const collection, - // twice. Unlike UpdateReturnCopy this also does not come with the issue of an - // undefined previous* in case new data was inserted. - template <class Collection> --typename Collection::value_type::second_type* const -+typename Collection::value_type::second_type* - InsertOrReturnExisting(Collection* const collection, - const typename Collection::value_type& vt) { - std::pair<typename Collection::iterator, bool> ret = collection->insert(vt); -@@ -633,7 +633,7 @@ InsertOrReturnExisting(Collection* const collection, - - // Same as above, except for explicit key and data. - template <class Collection> --typename Collection::value_type::second_type* const -+typename Collection::value_type::second_type* - InsertOrReturnExisting( - Collection* const collection, - const typename Collection::value_type::first_type& key, --- -2.11.0 - diff --git a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch new file mode 100644 index 000000000..fc7286122 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch @@ -0,0 +1,28 @@ +From 321709837f412e2f590e36e3fe33571bb40036a7 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Thu, 27 Jun 2019 13:27:18 +0000 +Subject: [PATCH] Makefile.am: include descriptor.pb.cc when building libprotoc.so + +* otherwise plugin.pb.o has undefined symbol scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto + and build with gold fails with: + core2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot-native/usr/bin/i686-oe-linux/../../libexec/i686-oe-linux/gcc/i686-oe-linux/9.1.0/ld.bfd: ./.libs/libprotoc.so: undefined reference to `descriptor_table_google_2fprotobuf_2fdescriptor_2eproto' + core2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot-native/usr/bin/i686-oe-linux/../../libexec/i686-oe-linux/gcc/i686-oe-linux/9.1.0/ld.bfd: ./.libs/libprotoc.so: undefined reference to `scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto' + +Upstream-Status: Pending +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +--- + src/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/Makefile.am b/src/Makefile.am +index be18ba761..57e3daec1 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -313,6 +313,7 @@ libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map + EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map + endif + libprotoc_la_SOURCES = \ ++ google/protobuf/descriptor.pb.cc \ + google/protobuf/compiler/code_generator.cc \ + google/protobuf/compiler/command_line_interface.cc \ + google/protobuf/compiler/plugin.cc \ diff --git a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch new file mode 100644 index 000000000..0a2e5e2df --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch @@ -0,0 +1,56 @@ +From a28e15092a298e0c73c6fc1ded0913275cf27cb0 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 + +* 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: + 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' + collect2: error: ld returned 1 exit status + Makefile:43: recipe for target 'add_person_cpp' failed + +* and the same with list_people_cpp this time with pkg-config already through the variable: + 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 -pthread -Icore2-32-oe-linux/protobuf/3.8.0-r0/git/src -Lcore2-32-oe-linux/protobuf/3.8.0-r0/git/src/.libs -Lcore2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot/usr/lib -lprotobuf list_people.cc addressbook.pb.cc -o list_people_cpp + /tmp/ccpaI5Su.o:addressbook.pb.cc:scc_info_Person_addressbook_2eproto: error: undefined reference to 'scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto' + /tmp/ccpaI5Su.o:addressbook.pb.cc:descriptor_table_addressbook_2eproto_deps: error: undefined reference to 'descriptor_table_google_2fprotobuf_2ftimestamp_2eproto' + collect2: error: ld returned 1 exit status + Makefile:49: recipe for target 'list_people_cpp' failed + +Upstream-Status: Pending +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +--- + examples/Makefile | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/examples/Makefile b/examples/Makefile +index 4ad605641..31d887639 100644 +--- a/examples/Makefile ++++ b/examples/Makefile +@@ -2,6 +2,8 @@ + + .PHONY: all cpp java python clean + ++PROTOBUF := $(shell pkg-config --cflags --libs protobuf) ++ + all: cpp java python + + cpp: add_person_cpp list_people_cpp +@@ -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++ 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++ 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 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.8.0.bb b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.9.1.bb index 476d1e309..94d8def77 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.8.0.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.9.1.bb @@ -10,12 +10,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" DEPENDS = "zlib" DEPENDS_append_class-target = " protobuf-native" -SRCREV = "09745575a923640154bcf307fba8aedff47f240a" +SRCREV = "655310ca192a6e3a050e0ca0b7084a2968072260" -SRC_URI = "git://github.com/google/protobuf.git;branch=3.8.x \ +SRC_URI = "git://github.com/google/protobuf.git;branch=3.9.x \ file://run-ptest \ file://0001-protobuf-fix-configure-error.patch \ - file://0001-Added-stubs-map_util.h-to-list-of-installed-headers.patch \ + file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \ + file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ " S = "${WORKDIR}/git" @@ -30,9 +31,6 @@ TEST_SRC_DIR = "examples" LANG_SUPPORT = "cpp ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" do_compile_ptest() { - # Modify makefile to use the cross-compiler - sed -e "s|c++|${CXX} \$(LDFLAGS)|g" -i "${S}/${TEST_SRC_DIR}/Makefile" - mkdir -p "${B}/${TEST_SRC_DIR}" # Add the location of the cross-compiled header and library files |