Closed lloeki closed 3 years ago
Probable cause is a ld too recent for older ld to link against the resulting lib.
Indeed ld
versions:
for i in `seq 0 7`; do docker run --rm -it ruby:2.$i ld --version | grep ld; done
GNU ld (GNU Binutils for Debian) 2.25
GNU ld (GNU Binutils for Debian) 2.25
GNU ld (GNU Binutils for Debian) 2.25
GNU ld (GNU Binutils for Debian) 2.28
GNU ld (GNU Binutils for Debian) 2.31.1
GNU ld (GNU Binutils for Debian) 2.31.1
GNU ld (GNU Binutils for Debian) 2.31.1
GNU ld (GNU Binutils for Debian) 2.31.1
Debian versions:
for i in `seq 0 7`; do docker run --rm -it ruby:2.$i cat /etc/debian_version; done
8.3
8.8
8.10
9.8
10.3
10.6
10.6
10.6
Attempting a downgrade of the image to ruby:2.2
, but there are other options listed here:
-fplt
: no effect on REX_GOTPCRELX
(0x2a
)-fno-plt
: makes PLT32
(0x04
) relocation to REX_GOTPCRELX
(0x29
) relocation, but REX_GOTPCRELX
(0x2a
) has not been changed-fno-pie
: no REX_GOTPCRELX
, but huge security risk and disables ASLRREX_GOTPCRELX
Currently we have this:
$ find . -path './obj.target/icu*/**/*.o' | while read -r f; do readelf -r "$f" | grep R_X86_64_REX_GOTP; done | head
000000000003 00170000002a R_X86_64_REX_GOTP 0000000000000000 _ZTVN6icu_6712SharedOb - 4
000000000043 001d0000002a R_X86_64_REX_GOTP 0000000000000000 _ZTVN6icu_6716UnifiedC - 4
0000000000e3 00230000002a R_X86_64_REX_GOTP 0000000000000000 _ZTVN6icu_6724WholeStr - 4
000000000275 00230000002a R_X86_64_REX_GOTP 0000000000000000 _ZTVN6icu_6724WholeStr - 4
000000001a3f 00370000002a R_X86_64_REX_GOTP 0000000000000000 _ZTVN6icu_6713UnicodeS - 4
000000001c2a 00390000002a R_X86_64_REX_GOTP 0000000000000000 uhash_compareUnicodeSt - 4
000000001c37 003a0000002a R_X86_64_REX_GOTP 0000000000000000 uprv_deleteUObject_67 - 4
000000001cec 00390000002a R_X86_64_REX_GOTP 0000000000000000 uhash_compareUnicodeSt - 4
000000001cf9 003a0000002a R_X86_64_REX_GOTP 0000000000000000 uprv_deleteUObject_67 - 4
000000000359 002f0000002a R_X86_64_REX_GOTP 0000000000000000 _UTF16v2Data_67 - 4
Use older ld
by moving to ruby:2.2
:
./build-libv8: 15: ./build-libv8: python3: not found
Install python3
as a system dependency:
Please use python3.9 or python3.8 or python3.7 or python3.6 or python3.5 or python2.7.
6
Node.js configure: Found Python 3.4.2...
Go back to python2
, taking care of patching broken icutrim.py
:
--- a/tools/icu/icutrim.py 2020-11-03 16:54:23.000000000 +0100
+++ b/tools/icu/icutrim.py 2020-11-03 16:54:27.000000000 +0100
@@ -316,7 +316,10 @@
erritems = fi.readlines()
fi.close()
#Item zone/zh_Hant_TW.res depends on missing item zone/zh_Hant.res
- pat = re.compile(bytes(r"^Item ([^ ]+) depends on missing item ([^ ]+).*", 'utf-8'))
+ if str == bytes:
+ pat = re.compile(bytes(r"^Item ([^ ]+) depends on missing item ([^ ]+).*"))
+ else:
+ pat = re.compile(bytes(r"^Item ([^ ]+) depends on missing item ([^ ]+).*", 'utf-8'))
for i in range(len(erritems)):
line = erritems[i].strip()
m = pat.match(line)
But no dice:
WARNING: C++ compiler (CXX=g++, 4.9.2) too old, need g++ 6.3.0 or clang++ 8.0.0
This Debian 8 platform is dead. I'll try the clang route on a more recent image.
This is very painful, libv8-node
will support these only via node 10.x (later ones requiring GCC 6 or Clang 8 at build time, and the matching C++ libs at runtime).