Created attachment 704772 [details] nodejs log grepped for libuv I've noticed that libuv inside nodejs is still built and linked statically (and dynamically with -luv) even if in the ebuild is passed --shared-libuv I suggest deleting the folders of the bundled libraries to be sure they are not built Please see the attached log
Created attachment 704775 [details] full log
Good catch, thanks - I can confirm that 'ldd node' shows no trace of libuv for latest ebuilds of both v16 and v14 (haven't tried v12 yet). Will try your suggestion, if it works it will be simpler than having to explicitly set all the libuv-related configure arguments to make sure the system version is used.
From what I can see the problem is that while Node itself can be told to use shared libuv, it does not propagate this setting to its bundled dependency "uvwasi". I am now testing if we can make the bundled uvwasi build against system libuv. As for unbundling the former, it has already been proposed upstream but it seems work on the related PR has stalled.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2aae48cbb242fae42837df1fba82b3aaf70139a commit d2aae48cbb242fae42837df1fba82b3aaf70139a Author: Marek Szuba <marecki@gentoo.org> AuthorDate: 2021-05-04 15:37:14 +0000 Commit: Marek Szuba <marecki@gentoo.org> CommitDate: 2021-05-04 15:41:57 +0000 net-libs/nodejs: really link against system libuv Turns out the bundled library "uvwasi" implicitly pulled in the bundled libuv as a static library regardless of us having been passing --shared-libuv to configure.py pretty much for ever. Fortunately, patching the relevant lines out of the uvwasi gyp file seems to take care of the problem. Closes: https://bugs.gentoo.org/787251 Signed-off-by: Marek Szuba <marecki@gentoo.org> .../nodejs/files/nodejs-12.22.1-uvwasi_shared_libuv.patch | 12 ++++++++++++ net-libs/nodejs/nodejs-12.22.1-r1.ebuild | 1 + net-libs/nodejs/nodejs-14.16.1-r1.ebuild | 1 + net-libs/nodejs/nodejs-16.0.0-r1.ebuild | 1 + 4 files changed, 15 insertions(+)
Thanks