-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Description
- Version: 12.13.0
- Platform: Raspberry Pi 3, Raspbian -
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.19.75-v7+ Unable to decrypt aes-256-cbc created by PHP #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux - Subsystem: V8 linking, (Node linking?)
In order to build NodeJS from scratch on raspbian, libatomic is needed in v8.gyp so that makesnapshot links.
I believe Raspian has an arm6l kernel, even thought the CPU reports as arm7l.
I also understand that arm6l is no longer built as an official binary, and that I should not expect to build without some pain :).
I am testing a change in v8.gyp:
line 796:
# Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
# to implement atomic memory access
['v8_current_cpu in ["mips", "mipsel", "mips64", "mips64el", "ppc"]', {
'link_settings': {
'libraries': ['-latomic', ],
},
}],
to
# Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
# to implement atomic memory access
['v8_current_cpu in ["mips", "mipsel", "mips64", "mips64el", "ppc", "arm"]', {
'link_settings': {
'libraries': ['-latomic', ],
},
}],
I am no expert on this, so I'm not sure that including "arm" covers too many platforms....
Compilation now continues - I will report final results in some hours (build is slow on RPi...).
Failure was when linking v8's mksnapshot.
I also note that the NodeJS makefiles also lack -latomic, and so have temporarily modified node.gyp to enable it:
line 295:
['(OS=="linux" or OS=="mac")', {
'libraries': ['-latomic'],
}],
to
['(OS=="linux" or OS=="mac") and llvm_version!=0', {
'libraries': ['-latomic'],
}],
I know this is an unsuitable mod - Advice on a better cross platform mod appreciated.
p.s. the armv7 binary runs happily on Raspbian on RPi3 - but is unlikely to work on RPiZero or Rpi1 (please correct me if I am wrong...)? There are millions of these devices out in the wild, and continued NodeJS support for them would be nice - e.g. for Node-Red use.