diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2021-10-19 17:18:40 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2021-10-19 09:23:08 -0700 |
| commit | f3f98c28b575848c43d569969dc610670bbc96a8 (patch) | |
| tree | 1eba8f8c99a41192204294c0de4083582f226e4b | |
| parent | 2f43f39a2b30df36f8ce1743b24c3d651352673b (diff) | |
| download | meta-openembedded-f3f98c28b575848c43d569969dc610670bbc96a8.tar.gz | |
protobuf: import a patch from meta-webosose to fix building protobuf-c with gold linker
* imported from:
https://github.com/webosose/meta-webosose/commit/9250cad447658cc6cc431572cb3b2c606e3fe257
* fixes:
| make[1]: Entering directory '/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0/build'
| ./x86_64-oe-linux-libtool --tag=CXX --mode=link x86_64-oe-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0/recipe-sysroot -std=c++11 -pthread -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0=/usr/src/debug/protobuf-c/1.4.0-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0=/usr/src/debug/protobuf-c/1.4.0-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0=/usr/src/debug/protobuf-c/1.4.0-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0=/usr/src/debug/protobuf-c/1.4.0-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now -fuse-ld=bfd -o protoc-c/protoc-gen-c protoc-c/protoc_gen_c-c_bytes_field.o protoc-c/protoc_gen_c-c_enum.o protoc-c/protoc_gen_c-c_enum_field.o protoc-c/protoc_gen_c-c_extension.o protoc-c/protoc_gen_c-c_field.o protoc-c/protoc_gen_c-c_file.o protoc-c/protoc_gen_c-c_generator.o protoc-c/protoc_gen_c-c_helpers.o protoc-c/protoc_gen_c-c_message.o protoc-c/protoc_gen_c-c_message_field.o protoc-c/protoc_gen_c-c_primitive_field.o protoc-c/protoc_gen_c-c_service.o protoc-c/protoc_gen_c-c_string_field.o protobuf-c/protoc_c_protoc_gen_c-protobuf-c.pb.o protoc-c/protoc_gen_c-main.o -lprotobuf -lpthread -lprotoc
| x86_64-oe-linux-libtool: link: x86_64-oe-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0/recipe-sysroot -std=c++11 -pthread -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0=/usr/src/debug/protobuf-c/1.4.0-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0=/usr/src/debug/protobuf-c/1.4.0-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0=/usr/src/debug/protobuf-c/1.4.0-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0=/usr/src/debug/protobuf-c/1.4.0-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0/recipe-sysroot-native= -Wl,-z -Wl,relro -Wl,-z -Wl,now -fuse-ld=bfd -o protoc-c/protoc-gen-c protoc-c/protoc_gen_c-c_bytes_field.o protoc-c/protoc_gen_c-c_enum.o protoc-c/protoc_gen_c-c_enum_field.o protoc-c/protoc_gen_c-c_extension.o protoc-c/protoc_gen_c-c_field.o protoc-c/protoc_gen_c-c_file.o protoc-c/protoc_gen_c-c_generator.o protoc-c/protoc_gen_c-c_helpers.o protoc-c/protoc_gen_c-c_message.o protoc-c/protoc_gen_c-c_message_field.o protoc-c/protoc_gen_c-c_primitive_field.o protoc-c/protoc_gen_c-c_service.o protoc-c/protoc_gen_c-c_string_field.o protobuf-c/protoc_c_protoc_gen_c-protobuf-c.pb.o protoc-c/protoc_gen_c-main.o -lprotobuf -lpthread -lprotoc -pthread
| /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/protobuf-c/1.4.0-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/11.2.0/ld.bfd: protobuf-c/protoc_c_protoc_gen_c-protobuf-c.pb.o:(.data.rel.ro+0x30): undefined reference to `descriptor_table_google_2fprotobuf_2fdescriptor_2eproto'
| collect2: error: ld returned 1 exit status
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch | 69 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf_3.18.0.bb | 1 |
2 files changed, 70 insertions, 0 deletions
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 new file mode 100644 index 0000000000..488c1f6ff9 --- /dev/null +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | From ddb9c5147883f8b27b4205450139e4a115d9961f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Kyungjik Min <dp.min@lge.com> | ||
| 3 | Date: Mon, 28 Dec 2020 15:56:09 +0900 | ||
| 4 | Subject: [PATCH] Fix linking error with ld-gold | ||
| 5 | |||
| 6 | :Release Notes: | ||
| 7 | |||
| 8 | :Detailed Notes: | ||
| 9 | https://github.com/protocolbuffers/protobuf/issues/6113 | ||
| 10 | There's a bug in the CMake build leading it to not use the version | ||
| 11 | scripts, which hides the problem (because all symbols are now public) | ||
| 12 | but doesn't solve it properly. | ||
| 13 | |||
| 14 | :Testing Performed: | ||
| 15 | |||
| 16 | :QA Notes: | ||
| 17 | N/A | ||
| 18 | |||
| 19 | :Issues Addressed: | ||
| 20 | [PLAT-130467] Fix build error for libgoogleassistant with latest | ||
| 21 | protobuf-3.11.4 | ||
| 22 | --- | ||
| 23 | src/libprotobuf-lite.map | 2 ++ | ||
| 24 | src/libprotobuf.map | 2 ++ | ||
| 25 | src/libprotoc.map | 2 ++ | ||
| 26 | 3 files changed, 6 insertions(+) | ||
| 27 | |||
| 28 | diff --git a/src/libprotobuf-lite.map b/src/libprotobuf-lite.map | ||
| 29 | index 391554669..a1853ca6c 100644 | ||
| 30 | --- a/src/libprotobuf-lite.map | ||
| 31 | +++ b/src/libprotobuf-lite.map | ||
| 32 | @@ -3,6 +3,8 @@ | ||
| 33 | extern "C++" { | ||
| 34 | *google*; | ||
| 35 | }; | ||
| 36 | + scc_info_*; | ||
| 37 | + descriptor_table_*; | ||
| 38 | |||
| 39 | local: | ||
| 40 | *; | ||
| 41 | diff --git a/src/libprotobuf.map b/src/libprotobuf.map | ||
| 42 | index 391554669..a1853ca6c 100644 | ||
| 43 | --- a/src/libprotobuf.map | ||
| 44 | +++ b/src/libprotobuf.map | ||
| 45 | @@ -3,6 +3,8 @@ | ||
| 46 | extern "C++" { | ||
| 47 | *google*; | ||
| 48 | }; | ||
| 49 | + scc_info_*; | ||
| 50 | + descriptor_table_*; | ||
| 51 | |||
| 52 | local: | ||
| 53 | *; | ||
| 54 | diff --git a/src/libprotoc.map b/src/libprotoc.map | ||
| 55 | index 391554669..a1853ca6c 100644 | ||
| 56 | --- a/src/libprotoc.map | ||
| 57 | +++ b/src/libprotoc.map | ||
| 58 | @@ -3,6 +3,8 @@ | ||
| 59 | extern "C++" { | ||
| 60 | *google*; | ||
| 61 | }; | ||
| 62 | + scc_info_*; | ||
| 63 | + descriptor_table_*; | ||
| 64 | |||
| 65 | local: | ||
| 66 | *; | ||
| 67 | -- | ||
| 68 | 2.17.1 | ||
| 69 | |||
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.18.0.bb b/meta-oe/recipes-devtools/protobuf/protobuf_3.18.0.bb index 9f501124a0..46ebef9785 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.18.0.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf_3.18.0.bb | |||
| @@ -17,6 +17,7 @@ SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=3.18.x \ | |||
| 17 | file://0001-protobuf-fix-configure-error.patch \ | 17 | file://0001-protobuf-fix-configure-error.patch \ |
| 18 | file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \ | 18 | file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \ |
| 19 | file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ | 19 | file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ |
| 20 | file://0001-Fix-linking-error-with-ld-gold.patch \ | ||
| 20 | " | 21 | " |
| 21 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
| 22 | 23 | ||
