openembedded-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker
@ 2021-10-16 16:52 Khem Raj
  2021-10-16 16:52 ` [meta-perl][PATCH 2/3] libcrypt-openssl-rsa-perl: Fix build with openssl3+ Khem Raj
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Khem Raj @ 2021-10-16 16:52 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
index cc037d3934..b5ab0a171c 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
@@ -19,6 +19,8 @@ S = "${WORKDIR}/git"
 
 inherit autotools pkgconfig
 
+LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
+
 # After several fix attempts there is still a race between generating
 # t.test-full.pb.h and compiling cxx_generate_packed_data.c despite
 # BUILT_SOURCES and explicit dependencies.
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [meta-perl][PATCH 2/3] libcrypt-openssl-rsa-perl: Fix build with openssl3+
  2021-10-16 16:52 [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker Khem Raj
@ 2021-10-16 16:52 ` Khem Raj
  2021-10-16 16:52 ` [meta-oe][PATCH 3/3] nodejs: Upgrade to 14.18.1 Khem Raj
  2021-10-17 10:51 ` [oe] [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker Peter Kjellerstedt
  2 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2021-10-16 16:52 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../files/0001-Fix-for-Issue-31.patch         | 37 +++++++++++++++++++
 .../libcrypt-openssl-rsa-perl_0.32.bb         |  4 +-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 meta-perl/recipes-perl/libcrypt/files/0001-Fix-for-Issue-31.patch

diff --git a/meta-perl/recipes-perl/libcrypt/files/0001-Fix-for-Issue-31.patch b/meta-perl/recipes-perl/libcrypt/files/0001-Fix-for-Issue-31.patch
new file mode 100644
index 0000000000..a5ea43f88b
--- /dev/null
+++ b/meta-perl/recipes-perl/libcrypt/files/0001-Fix-for-Issue-31.patch
@@ -0,0 +1,37 @@
+From 5e8202458e41ba1f7801746c503fe7c60ae340d5 Mon Sep 17 00:00:00 2001
+From: kambe-mikb <77083885+kambe-mikb@users.noreply.github.com>
+Date: Tue, 28 Sep 2021 17:40:18 +1000
+Subject: [PATCH] Fix for Issue 31
+
+Fix Issue 31 by removing reference to RSA_SSLV23_PADDING (removed from OpenSSL starting from v3.0.0)
+
+Upstream-Status: Submitted [https://github.com/toddr/Crypt-OpenSSL-RSA/pull/32]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ RSA.xs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/RSA.xs b/RSA.xs
+index 46cb199..4f65dfc 100644
+--- a/RSA.xs
++++ b/RSA.xs
+@@ -640,12 +640,16 @@ use_pkcs1_oaep_padding(p_rsa)
+   CODE:
+     p_rsa->padding = RSA_PKCS1_OAEP_PADDING;
+ 
++#if OPENSSL_VERSION_NUMBER < 0x30000000L
++
+ void
+ use_sslv23_padding(p_rsa)
+     rsaData* p_rsa;
+   CODE:
+     p_rsa->padding = RSA_SSLV23_PADDING;
+ 
++#endif
++
+ # Sign text. Returns the signature.
+ 
+ SV*
+-- 
+2.33.1
+
diff --git a/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.32.bb b/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.32.bb
index 48c04531ec..8dd2574e97 100644
--- a/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.32.bb
+++ b/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.32.bb
@@ -3,7 +3,9 @@ SECTION = "libs"
 LICENSE = "Artistic-1.0 | GPL-1.0+"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=a67ceecc5d9a91a5a0d003ba50c26346"
 
-SRC_URI = "http://www.cpan.org/modules/by-module/Crypt/Crypt-OpenSSL-RSA-${PV}.tar.gz "
+SRC_URI = "http://www.cpan.org/modules/by-module/Crypt/Crypt-OpenSSL-RSA-${PV}.tar.gz \
+           file://0001-Fix-for-Issue-31.patch \
+"
 
 SRC_URI[sha256sum] = "adc74f0ae125c77f65d5dd32abb9c3429300a79543bf263494f333f9c0b62a61"
 
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [meta-oe][PATCH 3/3] nodejs: Upgrade to 14.18.1
  2021-10-16 16:52 [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker Khem Raj
  2021-10-16 16:52 ` [meta-perl][PATCH 2/3] libcrypt-openssl-rsa-perl: Fix build with openssl3+ Khem Raj
@ 2021-10-16 16:52 ` Khem Raj
  2021-10-17 10:51 ` [oe] [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker Peter Kjellerstedt
  2 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2021-10-16 16:52 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

License-Update: Reflect new location of gtest sources
                remove node-inspect from license
		update Acorn to v8.4.1

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../nodejs/{nodejs_14.17.1.bb => nodejs_14.18.1.bb}           | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta-oe/recipes-devtools/nodejs/{nodejs_14.17.1.bb => nodejs_14.18.1.bb} (98%)

diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_14.17.1.bb b/meta-oe/recipes-devtools/nodejs/nodejs_14.18.1.bb
similarity index 98%
rename from meta-oe/recipes-devtools/nodejs/nodejs_14.17.1.bb
rename to meta-oe/recipes-devtools/nodejs/nodejs_14.18.1.bb
index d468f2518e..a80811193e 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_14.17.1.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_14.18.1.bb
@@ -1,7 +1,7 @@
 DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
 HOMEPAGE = "http://nodejs.org"
 LICENSE = "MIT & BSD & Artistic-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=a1016f9b7979cfe6fc3466a9bba60b1e"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6768abdfc4dae4fde59d6b4df96930f3"
 
 DEPENDS = "openssl"
 DEPENDS:append:class-target = " qemu-native"
@@ -33,7 +33,7 @@ SRC_URI:append:toolchain-clang:x86 = " \
 SRC_URI:append:toolchain-clang:powerpc64le = " \
            file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \
            "
-SRC_URI[sha256sum] = "ddf1d2d56ddf35ecd98c5ea5ddcd690b245899f289559b4330c921255f5a247f"
+SRC_URI[sha256sum] = "3fa1d71adddfab2f5e3e41874b4eddbdf92b65cade4a43922fb1e437afcf89ed"
 
 S = "${WORKDIR}/node-v${PV}"
 
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* RE: [oe] [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker
  2021-10-16 16:52 [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker Khem Raj
  2021-10-16 16:52 ` [meta-perl][PATCH 2/3] libcrypt-openssl-rsa-perl: Fix build with openssl3+ Khem Raj
  2021-10-16 16:52 ` [meta-oe][PATCH 3/3] nodejs: Upgrade to 14.18.1 Khem Raj
@ 2021-10-17 10:51 ` Peter Kjellerstedt
  2021-10-17 21:23   ` Khem Raj
  2 siblings, 1 reply; 7+ messages in thread
From: Peter Kjellerstedt @ 2021-10-17 10:51 UTC (permalink / raw)
  To: Khem Raj, openembedded-devel

> -----Original Message-----
> From: openembedded-devel@lists.openembedded.org <openembedded-
> devel@lists.openembedded.org> On Behalf Of Khem Raj
> Sent: den 16 oktober 2021 18:52
> To: openembedded-devel@lists.openembedded.org
> Cc: Khem Raj <raj.khem@gmail.com>
> Subject: [oe] [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker

Add a motivation as to why this is needed.

//Peter

> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb b/meta-
> oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
> index cc037d3934..b5ab0a171c 100644
> --- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
> +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
> @@ -19,6 +19,8 @@ S = "${WORKDIR}/git"
> 
>  inherit autotools pkgconfig
> 
> +LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -
> fuse-ld=bfd ', '', d)}"
> +
>  # After several fix attempts there is still a race between generating
>  # t.test-full.pb.h and compiling cxx_generate_packed_data.c despite
>  # BUILT_SOURCES and explicit dependencies.
> --
> 2.33.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [oe] [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker
  2021-10-17 10:51 ` [oe] [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker Peter Kjellerstedt
@ 2021-10-17 21:23   ` Khem Raj
  2021-10-19 15:09     ` Martin Jansa
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2021-10-17 21:23 UTC (permalink / raw)
  To: Peter Kjellerstedt, openembedded-devel



On 10/17/21 3:51 AM, Peter Kjellerstedt wrote:
>> -----Original Message-----
>> From: openembedded-devel@lists.openembedded.org <openembedded-
>> devel@lists.openembedded.org> On Behalf Of Khem Raj
>> Sent: den 16 oktober 2021 18:52
>> To: openembedded-devel@lists.openembedded.org
>> Cc: Khem Raj <raj.khem@gmail.com>
>> Subject: [oe] [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker
> 
> Add a motivation as to why this is needed.
> 

yeah, I should have added that gold linker ends up with symbols being 
exported with weak attribute while libprotobuf.map lists these symbols 
as global and exported. Gold linker ignores any mapping directive inside 
extern 'C' blocks, it could be a bug in linker [1]

also see gentoo bug [2]

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=24527
[2] https://bugs.gentoo.org/683892

> //Peter
> 
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>   meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb b/meta-
>> oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
>> index cc037d3934..b5ab0a171c 100644
>> --- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
>> +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
>> @@ -19,6 +19,8 @@ S = "${WORKDIR}/git"
>>
>>   inherit autotools pkgconfig
>>
>> +LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -
>> fuse-ld=bfd ', '', d)}"
>> +
>>   # After several fix attempts there is still a race between generating
>>   # t.test-full.pb.h and compiling cxx_generate_packed_data.c despite
>>   # BUILT_SOURCES and explicit dependencies.
>> --
>> 2.33.1
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [oe] [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker
  2021-10-17 21:23   ` Khem Raj
@ 2021-10-19 15:09     ` Martin Jansa
  2021-10-19 16:06       ` Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Jansa @ 2021-10-19 15:09 UTC (permalink / raw)
  To: Khem Raj; +Cc: Peter Kjellerstedt, openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 7171 bytes --]

I'm seeing the same failure now, but it fails with bfd (with this fix) as
well:

| 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

There is possible fix in meta-webosose:
https://github.com/webosose/meta-webosose/commit/9250cad447658cc6cc431572cb3b2c606e3fe257

I've verified that it fixes protobuf-c build for me, should I send it to
meta-oe?



On Sun, Oct 17, 2021 at 11:23 PM Khem Raj <raj.khem@gmail.com> wrote:

>
>
> On 10/17/21 3:51 AM, Peter Kjellerstedt wrote:
> >> -----Original Message-----
> >> From: openembedded-devel@lists.openembedded.org <openembedded-
> >> devel@lists.openembedded.org> On Behalf Of Khem Raj
> >> Sent: den 16 oktober 2021 18:52
> >> To: openembedded-devel@lists.openembedded.org
> >> Cc: Khem Raj <raj.khem@gmail.com>
> >> Subject: [oe] [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker
> >
> > Add a motivation as to why this is needed.
> >
>
> yeah, I should have added that gold linker ends up with symbols being
> exported with weak attribute while libprotobuf.map lists these symbols
> as global and exported. Gold linker ignores any mapping directive inside
> extern 'C' blocks, it could be a bug in linker [1]
>
> also see gentoo bug [2]
>
> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=24527
> [2] https://bugs.gentoo.org/683892
>
> > //Peter
> >
> >>
> >> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >> ---
> >>   meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb | 2 ++
> >>   1 file changed, 2 insertions(+)
> >>
> >> diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
> b/meta-
> >> oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
> >> index cc037d3934..b5ab0a171c 100644
> >> --- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
> >> +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
> >> @@ -19,6 +19,8 @@ S = "${WORKDIR}/git"
> >>
> >>   inherit autotools pkgconfig
> >>
> >> +LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -
> >> fuse-ld=bfd ', '', d)}"
> >> +
> >>   # After several fix attempts there is still a race between generating
> >>   # t.test-full.pb.h and compiling cxx_generate_packed_data.c despite
> >>   # BUILT_SOURCES and explicit dependencies.
> >> --
> >> 2.33.1
> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#93410):
> https://lists.openembedded.org/g/openembedded-devel/message/93410
> Mute This Topic: https://lists.openembedded.org/mt/86375042/3617156
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> Martin.Jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 9757 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [oe] [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker
  2021-10-19 15:09     ` Martin Jansa
@ 2021-10-19 16:06       ` Khem Raj
  0 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2021-10-19 16:06 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Peter Kjellerstedt, openembedded-devel

On Tue, Oct 19, 2021 at 8:09 AM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> I'm seeing the same failure now, but it fails with bfd (with this fix) as well:
>
> | 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
>
> There is possible fix in meta-webosose:
> https://github.com/webosose/meta-webosose/commit/9250cad447658cc6cc431572cb3b2c606e3fe257
>
> I've verified that it fixes protobuf-c build for me, should I send it to meta-oe?
>

yes please

>
>
> On Sun, Oct 17, 2021 at 11:23 PM Khem Raj <raj.khem@gmail.com> wrote:
>>
>>
>>
>> On 10/17/21 3:51 AM, Peter Kjellerstedt wrote:
>> >> -----Original Message-----
>> >> From: openembedded-devel@lists.openembedded.org <openembedded-
>> >> devel@lists.openembedded.org> On Behalf Of Khem Raj
>> >> Sent: den 16 oktober 2021 18:52
>> >> To: openembedded-devel@lists.openembedded.org
>> >> Cc: Khem Raj <raj.khem@gmail.com>
>> >> Subject: [oe] [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker
>> >
>> > Add a motivation as to why this is needed.
>> >
>>
>> yeah, I should have added that gold linker ends up with symbols being
>> exported with weak attribute while libprotobuf.map lists these symbols
>> as global and exported. Gold linker ignores any mapping directive inside
>> extern 'C' blocks, it could be a bug in linker [1]
>>
>> also see gentoo bug [2]
>>
>> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=24527
>> [2] https://bugs.gentoo.org/683892
>>
>> > //Peter
>> >
>> >>
>> >> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> >> ---
>> >>   meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb | 2 ++
>> >>   1 file changed, 2 insertions(+)
>> >>
>> >> diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb b/meta-
>> >> oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
>> >> index cc037d3934..b5ab0a171c 100644
>> >> --- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
>> >> +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb
>> >> @@ -19,6 +19,8 @@ S = "${WORKDIR}/git"
>> >>
>> >>   inherit autotools pkgconfig
>> >>
>> >> +LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -
>> >> fuse-ld=bfd ', '', d)}"
>> >> +
>> >>   # After several fix attempts there is still a race between generating
>> >>   # t.test-full.pb.h and compiling cxx_generate_packed_data.c despite
>> >>   # BUILT_SOURCES and explicit dependencies.
>> >> --
>> >> 2.33.1
>> >
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#93410): https://lists.openembedded.org/g/openembedded-devel/message/93410
>> Mute This Topic: https://lists.openembedded.org/mt/86375042/3617156
>> Group Owner: openembedded-devel+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [Martin.Jansa@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-19 16:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-16 16:52 [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker Khem Raj
2021-10-16 16:52 ` [meta-perl][PATCH 2/3] libcrypt-openssl-rsa-perl: Fix build with openssl3+ Khem Raj
2021-10-16 16:52 ` [meta-oe][PATCH 3/3] nodejs: Upgrade to 14.18.1 Khem Raj
2021-10-17 10:51 ` [oe] [meta-oe][PATCH 1/3] protobuf-c: Do not use gold linker Peter Kjellerstedt
2021-10-17 21:23   ` Khem Raj
2021-10-19 15:09     ` Martin Jansa
2021-10-19 16:06       ` Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).