Skip to contentSkip to conversation

nodejs: fix target ldflags using

PATCH Superseded Andrej Valek 3 participants 6 messages Mar 18, 2019 – Mar 21, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nodejs: fix target ldflags using

- do not drop target LDFLAGS
- even if the target LDFLAGS have been specified, tools like torque was linked with system libraries

---
 .../nodejs/nodejs/0006-Use-target-ldflags.patch    | 26 ++++++++++++++++++++++
 meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb  |  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch
meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch new file +26 -0
new file mode 100644
index 000000000..2e3eba5e8
@@ -0,0 +1,26 @@
+The target LDFLAGS have been ignored. Tools like torque
+have been loaded from system libraries, even if a native
+one was the target.
+|$ ldd torque 
+|    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1
+|    libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
+|    libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1
+|    libicui18n.so.63 => not found
+|    libicuuc.so.63 => not found
+...
+
+Signed-off-by: Andrej Valek <[email protected]>
+
+diff -Naur node-v10.15.1/common.gypi node-v10.15.1/common.gypi
+--- node-v10.15.1/common.gypi	2019-03-18 15:01:39.000000000 +0100
++++ node-v10.15.1/common.gypi	2019-03-18 15:04:08.628361308 +0100
+@@ -364,6 +364,9 @@
+           'BUILDING_UV_SHARED=1',
+         ],
+       }],
++      [ 'OS in "linux freebsd openbsd solaris aix cloudabi"', {
++        'ldflags': [ '$(LDFLAGS)' ],
++      }],
+       [ 'OS in "linux freebsd openbsd solaris aix"', {
+         'cflags': [ '-pthread' ],
+         'ldflags': [ '-pthread' ],
meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb +1 -0
index 17c9bb0c4..672cd8440 100644
@@ -17,6 +17,7 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
            file://0003-Crypto-reduce-memory-usage-of-SignFinal.patch \
            file://0004-Make-compatibility-with-gcc-4.8.patch \
            file://0005-Link-atomic-library.patch \
+           file://0006-Use-target-ldflags.patch \
            "
 SRC_URI_append_class-target = " \
            file://0002-Using-native-torque.patch \
Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 1/1 nodejs: fix target ldflags using

- do not drop target LDFLAGS
- even if the target LDFLAGS have been specified, tools like torque was linked with system libraries

---
 .../nodejs/nodejs/0006-Use-target-ldflags.patch    | 24 ++++++++++++++++++++++
 meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb  |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch
meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch new file +24 -0
new file mode 100644
index 000000000..c6d0cec4b
@@ -0,0 +1,24 @@
+The target LDFLAGS have been ignored. Tools like torque
+have been loaded from system libraries, even if a native
+one was the target.
+|$ ldd torque 
+|    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1
+|    libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
+|    libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1
+|    libicui18n.so.63 => not found
+|    libicuuc.so.63 => not found
+...
+
+Signed-off-by: Andrej Valek <[email protected]>
+
+diff -Naur node-v10.15.1/deps/v8/gypfiles/common.gypi node-v10.15.1/deps/v8/gypfiles/common.gypi
+--- node-v10.15.1/deps/v8/gypfiles/common.gypi	2019-03-18 15:01:39.000000000 +0100
++++ node-v10.15.1/deps/v8/gypfiles/common.gypi	2019-03-18 15:04:08.628361308 +0100
+@@ -1106,6 +1106,7 @@
+             'cflags': [ '-fno-strict-aliasing' ],
+           }],
+         ],  # conditions
++        'ldflags+': [ '$(LDFLAGS)' ],
+       }],
+       ['OS=="solaris"', {
+         'defines': [ '__C99FEATURES__=1' ],  # isinf() etc.
meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb +1 -0
index 17c9bb0c4..672cd8440 100644
@@ -17,6 +17,7 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
            file://0003-Crypto-reduce-memory-usage-of-SignFinal.patch \
            file://0004-Make-compatibility-with-gcc-4.8.patch \
            file://0005-Link-atomic-library.patch \
+           file://0006-Use-target-ldflags.patch \
            "
 SRC_URI_append_class-target = " \
            file://0002-Using-native-torque.patch \
Signature · 1 line
2.11.0
#2 lore raw

meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch

Quoted 17 lines · Andrej Valek

- do not drop target LDFLAGS
- even if the target LDFLAGS have been specified, tools like torque was linked with system libraries

---
 .../nodejs/nodejs/0006-Use-target-ldflags.patch    | 24 ++++++++++++++++++++++
 meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb  |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch
meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch new file +0 -0
new file mode 100644
index 000000000..c6d0cec4b

cant apply this patch on a ubuntu 14.04 host, can you fix it ? may be use git format-patch to generate the patch itself.

https://errors.yoctoproject.org/Errors/Details/233590/

Quoted 45 lines
meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch new file +24 -0
@@ -0,0 +1,24 @@
+The target LDFLAGS have been ignored. Tools like torque
+have been loaded from system libraries, even if a native
+one was the target.
+|$ ldd torque
+|    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1
+|    libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
+|    libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1
+|    libicui18n.so.63 => not found
+|    libicuuc.so.63 => not found
+...
+
+Signed-off-by: Andrej Valek <[email protected]>
+
+diff -Naur node-v10.15.1/deps/v8/gypfiles/common.gypi node-v10.15.1/deps/v8/gypfiles/common.gypi
+--- node-v10.15.1/deps/v8/gypfiles/common.gypi 2019-03-18 15:01:39.000000000 +0100
++++ node-v10.15.1/deps/v8/gypfiles/common.gypi 2019-03-18 15:04:08.628361308 +0100
+@@ -1106,6 +1106,7 @@
+             'cflags': [ '-fno-strict-aliasing' ],
+           }],
+         ],  # conditions
++        'ldflags+': [ '$(LDFLAGS)' ],
+       }],
+       ['OS=="solaris"', {
+         'defines': [ '__C99FEATURES__=1' ],  # isinf() etc.
meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb +1 -1
index 17c9bb0c4..672cd8440 100644
@@ -17,6 +17,7 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
            file://0003-Crypto-reduce-memory-usage-of-SignFinal.patch \
            file://0004-Make-compatibility-with-gcc-4.8.patch \
            file://0005-Link-atomic-library.patch \
+           file://0006-Use-target-ldflags.patch \
            "
 SRC_URI_append_class-target = " \
            file://0002-Using-native-torque.patch \
--

2.11.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#3 lore raw

PATCH v3 1/1 nodejs: fix target ldflags using

In reply to Andrej Valek

- do not drop target LDFLAGS
- even if the target LDFLAGS have been specified, tools like torque was linked with system libraries

---
 .../nodejs/nodejs/0006-Use-target-ldflags.patch    | 24 ++++++++++++++++++++++
 meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb  |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch
meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch new file +24 -0
new file mode 100644
index 000000000..f6569cd57
@@ -0,0 +1,24 @@
+The target LDFLAGS have been ignored. Tools like torque
+have been loaded from system libraries, even if a native
+one was the target.
+|$ ldd torque 
+|    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1
+|    libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
+|    libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1
+|    libicui18n.so.63 => not found
+|    libicuuc.so.63 => not found
+...
+
+Signed-off-by: Andrej Valek <[email protected]>
+
+diff -Naur node-v10.15.1/deps/v8/gypfiles/toolchain.gypi node-v10.15.1/deps/v8/gypfiles/toolchain.gypi
+--- node-v10.15.1/deps/v8/gypfiles/toolchain.gypi	2019-03-18 15:01:39.000000000 +0100
++++ node-v10.15.1/deps/v8/gypfiles/toolchain.gypi	2019-03-18 15:04:08.628361308 +0100
+@@ -1106,6 +1106,7 @@
+             'cflags': [ '-fno-strict-aliasing' ],
+           }],
+         ],  # conditions
++        'ldflags+': [ '$(LDFLAGS)' ],
+       }],
+       ['OS=="solaris"', {
+         'defines': [ '__C99FEATURES__=1' ],  # isinf() etc.
meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb +1 -0
index 17c9bb0c4..672cd8440 100644
@@ -17,6 +17,7 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
            file://0003-Crypto-reduce-memory-usage-of-SignFinal.patch \
            file://0004-Make-compatibility-with-gcc-4.8.patch \
            file://0005-Link-atomic-library.patch \
+           file://0006-Use-target-ldflags.patch \
            "
 SRC_URI_append_class-target = " \
            file://0002-Using-native-torque.patch \
Signature · 1 line
2.11.0
Acked-by on v3 1/1
#4 lore raw
Quoted 55 lines · Andrej Valek

- do not drop target LDFLAGS
- even if the target LDFLAGS have been specified, tools like torque was linked with system libraries

---
 .../nodejs/nodejs/0006-Use-target-ldflags.patch    | 24 ++++++++++++++++++++++
 meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb  |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch
meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch new file +24 -0
new file mode 100644
index 000000000..f6569cd57
@@ -0,0 +1,24 @@
+The target LDFLAGS have been ignored. Tools like torque
+have been loaded from system libraries, even if a native
+one was the target.
+|$ ldd torque
+|    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1
+|    libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
+|    libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1
+|    libicui18n.so.63 => not found
+|    libicuuc.so.63 => not found
+...
+
+Signed-off-by: Andrej Valek <[email protected]>
+
+diff -Naur node-v10.15.1/deps/v8/gypfiles/toolchain.gypi node-v10.15.1/deps/v8/gypfiles/toolchain.gypi
+--- node-v10.15.1/deps/v8/gypfiles/toolchain.gypi      2019-03-18 15:01:39.000000000 +0100
++++ node-v10.15.1/deps/v8/gypfiles/toolchain.gypi      2019-03-18 15:04:08.628361308 +0100
+@@ -1106,6 +1106,7 @@
+             'cflags': [ '-fno-strict-aliasing' ],
+           }],
+         ],  # conditions
++        'ldflags+': [ '$(LDFLAGS)' ],
+       }],
+       ['OS=="solaris"', {
+         'defines': [ '__C99FEATURES__=1' ],  # isinf() etc.
meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb +1 -1
index 17c9bb0c4..672cd8440 100644
@@ -17,6 +17,7 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
            file://0003-Crypto-reduce-memory-usage-of-SignFinal.patch \
            file://0004-Make-compatibility-with-gcc-4.8.patch \
            file://0005-Link-atomic-library.patch \
+           file://0006-Use-target-ldflags.patch \
            "
 SRC_URI_append_class-target = " \
            file://0002-Using-native-torque.patch \
--
Quoted 2 lines

2.11.0

Fixes native build for me so

#5 lore raw

I know that is a fix for both targets. I didn't specify if it's relevant only for especially meaning target or native ;).

Cheers,
Andrej

Quoted 62 lines · Andreas Müller
Quoted 55 lines · Andrej Valek

- do not drop target LDFLAGS
- even if the target LDFLAGS have been specified, tools like torque was linked with system libraries

---
 .../nodejs/nodejs/0006-Use-target-ldflags.patch    | 24 ++++++++++++++++++++++
 meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb  |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch
meta-oe/recipes-devtools/nodejs/nodejs/0006-Use-target-ldflags.patch new file +24 -0
new file mode 100644
index 000000000..f6569cd57
@@ -0,0 +1,24 @@
+The target LDFLAGS have been ignored. Tools like torque
+have been loaded from system libraries, even if a native
+one was the target.
+|$ ldd torque
+|    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1
+|    libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
+|    libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1
+|    libicui18n.so.63 => not found
+|    libicuuc.so.63 => not found
+...
+
+Signed-off-by: Andrej Valek <[email protected]>
+
+diff -Naur node-v10.15.1/deps/v8/gypfiles/toolchain.gypi node-v10.15.1/deps/v8/gypfiles/toolchain.gypi
+--- node-v10.15.1/deps/v8/gypfiles/toolchain.gypi      2019-03-18 15:01:39.000000000 +0100
++++ node-v10.15.1/deps/v8/gypfiles/toolchain.gypi      2019-03-18 15:04:08.628361308 +0100
+@@ -1106,6 +1106,7 @@
+             'cflags': [ '-fno-strict-aliasing' ],
+           }],
+         ],  # conditions
++        'ldflags+': [ '$(LDFLAGS)' ],
+       }],
+       ['OS=="solaris"', {
+         'defines': [ '__C99FEATURES__=1' ],  # isinf() etc.
meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb +1 -1
index 17c9bb0c4..672cd8440 100644
@@ -17,6 +17,7 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
            file://0003-Crypto-reduce-memory-usage-of-SignFinal.patch \
            file://0004-Make-compatibility-with-gcc-4.8.patch \
            file://0005-Link-atomic-library.patch \
+           file://0006-Use-target-ldflags.patch \
            "
 SRC_URI_append_class-target = " \
            file://0002-Using-native-torque.patch \
--
Quoted 2 lines

2.11.0

Fixes native build for me so