You are not logged in.

#1 2020-08-05 16:23:23

nimnul
Member
Registered: 2018-06-01
Posts: 6

node.js crashed due to mispackaging

I discovered that LTS versions of node are apparently incompatible with the latest versions of some of their dependencies, so these dependencies should either be shipped as nodejs-lts-erbium-libuv instead of libuv or be linked in statically.

Of course static linking is easier, so it's what I do for myself.

Steps to reproduce:

- clean node_modules and ~/.npm and node-gyp caches
- pacman -Suy nodejs-lts-erbium
- npm i got

Expected result: got library gets installed
Actual result: /bin/node coredumps

I have a PKGBUILD which fixes the crashes for an old version of node, but the erbium has the same issue apparently.

If anything is interested in resolving this, let me know and I can provide my PKGBUILD for nodejs-lts-carbon to be ported to later LTS branches.

But basically I commented 4 lines:

#    --shared-libuv \
#    --shared-http-parser \
#    --shared-cares \
#    --shared-nghttp2

It's possible that we can link against the latest versions of some of these without issues, it was a quick solution I didn't put much effort in. You should look at the nodejs git tree to see which dependent libraries are shipped with node sources and get fixed in LTS releases.

Note that icu, openssl, glibc and zlib are still dynamically linked.

Offline

#2 2020-08-05 23:47:26

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 1,197

Re: node.js crashed due to mispackaging

Can't reproduce here; I don't use node.js here regularly, so I followed your instructions and installed nodejs-lts-erbium, which recommended I also installed npm, so I did that and running npm locally on my user account produced help text, which looked pretty normal to me.

Edit: do->so typo

Last edited by levi (2020-08-07 08:04:32)


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

#3 2020-08-07 06:05:59

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 985
Website

Re: node.js crashed due to mispackaging

Does this also happen in 64-bit? Because then this would be a bug belonging there..

Offline

Board footer

Powered by FluxBB