Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915946 - net-libs/nodejs-20.6.1: missing dependency on >=dev-libs/icu-71
Summary: net-libs/nodejs-20.6.1: missing dependency on >=dev-libs/icu-71
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-18 09:22 UTC by segmentation fault
Modified: 2023-10-20 03:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description segmentation fault 2023-10-18 09:22:05 UTC
Trying to build net-libs/nodejs-20.6.1 on a system that has gone 21 months without update reveals that "icu4c v70.1 is too old, v71.x or later is required".

Reproducible: Always

Steps to Reproduce:
See below.
Actual Results:  
See below.

Expected Results:  
See below.

I am not a fan of frequent updating, so don't tell me to update. In a sense, Gentoo's thoughtful build infrastructure results in almost no pressure to upgrade the system as a whole: if I need a newer version of some package, I grab it into my local overlay and build it there. In 99% of the cases, this works - at least for a system that is up to ~2 years old, afterwards a fully system upgrade becomes more attractive. ;-)

Using this method reveals sometimes interesting dependencies, like this one here:

I grabbed net-libs/nodejs-20.6.1 into my local overlay and fired emerge. emerge failed because of the EAPI version (8), which does not work with the eclasses of a 21 months old system. So I downgraded EAPI to 7 and, by the way, also adapted the PYTHON_COMPAT array to fit my case:

EAPI=7
PYTHON_COMPAT=( python3_{9..10} )

This is a usual change that I need to make in the ebuilds, so it didn't bother me too much and gave it another try. This time emerge complained about a missing "filter-lto" command:

>>> Unpacking source...
>>> Unpacking node-v20.6.1.tar.xz to /zram/portage/net-libs/nodejs-20.6.1/work
>>> Source unpacked in /zram/portage/net-libs/nodejs-20.6.1/work
>>> Preparing source in /zram/portage/net-libs/nodejs-20.6.1/work/node-v20.6.1 ...
 * Applying nodejs-20.3.0-gcc14.patch ...
patching file test/embedding/embedtest.cc
Hunk #1 succeeded at 7 with fuzz 2 (offset 2 lines).                                                                    [ ok ]
>>> Source prepared.
>>> Configuring source in /zram/portage/net-libs/nodejs-20.6.1/work/node-v20.6.1 ...
/zram/portage/net-libs/nodejs-20.6.1/temp/environment: line 3672: filter-lto: command not found

A search for "filter-lto" revealed that it was a new command introduced in the flag-o-matic eclass.

No problem. Sometimes (very seldomly) I do have to replace an eclass here or there with a newer version. Again, I rely on Gentoo's thoughtful eclass programming, in the sense that the eclasses are well encapsulated, with minimal, if at all, coupling. Thus, to eliminate the above error, all I had to do was to replace (after taking a backup, of course) flag-o-matic.eclass with its current version:

wget https://gitweb.gentoo.org/repo/gentoo.git/plain/eclass/flag-o-matic.eclass
mv /usr/portage/eclass/flag-o-matic.eclass /usr/portage/eclass-backup-xxxx/
mv flag-o-matic.eclass /usr/portage/eclass/

Retrying emerge went further, this time complaining:

 * Applying nodejs-20.3.0-gcc14.patch ...
patching file test/embedding/embedtest.cc
Hunk #1 succeeded at 7 with fuzz 2 (offset 2 lines).                                                                    [ ok ]
>>> Source prepared.
>>> Configuring source in /zram/portage/net-libs/nodejs-20.6.1/work/node-v20.6.1 ...
ERROR: icu4c v70.1 is too old, v71.x or later is required.

at which point I gave up with v. 20.x. I know from painful experience that upgrading icu will require a rebuild of dozens (if not hundreds) of installed packages - which is guaranteed to fail somewhere and requires restart of all X, at which point it's better to go with a full system upgrade[1].

net-libs/nodejs-18.17.1 was built and installed without problems, so I'm happy. :-)

What did we learn from this old system? net-libs/nodejs-20.6.1 (and probably newer too) requires

1. A flag-o-matic eclass new enough to have the filter-lto command.
2. >=dev-libs/icu-71 for some operation, either for build-only, or even for running...

I guess it is not possible to impose condition (1) above in an ebuild. But it is worth to impose (2), either as build-, or run-time dependency (or both).

FWIW here is the complete error message from build.log - there is no more information than this (so it's not clear (to me) whether this is a build-only or runtime dependency too):

#########################################################################
...
>>> Source prepared.
>>> Configuring source in /zram/portage/net-libs/nodejs-20.6.1/work/node-v20.6.1 ...
ERROR: icu4c v70.1 is too old, v71.x or later is required.
 * ERROR: net-libs/nodejs-20.6.1::XXX failed (configure phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line 127:  Called src_configure
 *   environment, line 3709:  Called die
 * The specific snippet of code:
 *              linux_use_bundled_gold=0" "${EPYTHON}" configure.py --prefix="${EPREFIX}"/usr --dest-cpu=${myarch} "${myconf[@]}" || die
 * 
 * If you need support, post the output of `emerge --info '=net-libs/nodejs-20.6.1::XXX'`,
 * the complete build log and the output of `emerge -pqv '=net-libs/nodejs-20.6.1::XXX'`.
 * The complete build log is located at '/zram/portage/net-libs/nodejs-20.6.1/temp/build.log'.
 * The ebuild environment file is located at '/zram/portage/net-libs/nodejs-20.6.1/temp/environment'.
#########################################################################

Thank you

---
[1] X has be going for as long as the system has been up here, which is quite long:

uptime
...362 days,...

During this period, quite a few documents/files remain open for reading, work etc., so restarting X would be a major interruption for me.
Comment 1 Larry the Git Cow gentoo-dev 2023-10-18 09:39:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e16a2fe2810c851fac54f30caa2007d8e742d542

commit e16a2fe2810c851fac54f30caa2007d8e742d542
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-10-18 09:30:01 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-18 09:39:14 +0000

    net-libs/nodejs: crank minimum version of icu
    
    Closes: https://bugs.gentoo.org/915946
    Signed-off-by: Sam James <sam@gentoo.org>

 net-libs/nodejs/nodejs-20.6.1.ebuild   | 2 +-
 net-libs/nodejs/nodejs-20.7.0.ebuild   | 2 +-
 net-libs/nodejs/nodejs-20.8.1.ebuild   | 2 +-
 net-libs/nodejs/nodejs-99999999.ebuild | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
Comment 2 John Wudrick 2023-10-20 01:36:40 UTC
The minimum ICU version has been bumped to 73 for 21.0.0 (not in repo yet but also applies to 99999999 ebuild).

https://github.com/nodejs/node/commit/162a0652ab1a2198dc4eadee4134cbf84710a734
Comment 3 Larry the Git Cow gentoo-dev 2023-10-20 03:49:35 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4a4cf8ec0a4a676ee0c8cf9dc92cd3c30c36834

commit b4a4cf8ec0a4a676ee0c8cf9dc92cd3c30c36834
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-10-20 01:39:20 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-20 01:39:20 +0000

    net-libs/nodejs: crank ICU dep for 99999999
    
    Cranked in 162a0652ab1a2198dc4eadee4134cbf84710a734.
    
    Bug: https://bugs.gentoo.org/915946
    Signed-off-by: Sam James <sam@gentoo.org>

 net-libs/nodejs/nodejs-99999999.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)