Bug 15302 - icu / icu-native: icudata file being disabled breaks nodejs / npm
Summary: icu / icu-native: icudata file being disabled breaks nodejs / npm
Status: NEW
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 4.0.14
Hardware: x86 Multiple
: Low normal
Target Milestone: 6.99
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2023-11-29 21:00 UTC by Jan-Simon Moeller
Modified: 2026-03-26 15:18 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Simon Moeller 2023-11-29 21:00:41 UTC
The issue manifests under these conditions:

Build host/distro:  Ubuntu 18.04   (can reproduce in chroot env).

Ubuntu 18.04 does ship with icu60 . 
YP kirkstone does ship icu-70.1 , thus newer than build host.

To reproduce on a Ubuntu 18.04 host or chroot:

Install minimal YP dependencies as per doc site.

Clone YP kirkstone and add meta-oe to the layers for nodejs.

Run devshell for a package that has nodejs / npm in depends .

Call npm or nodejs --help .

user@legolas:~/build-html5/tmp/work/corei7-64-agl-linux/html5-mixer/1.0+gitAUTOINC+38587cf96c-r0/git# node --help
Usage: node [options] [ script.js ] [arguments]
       node inspect [options] [ script.js | host:port ] [arguments]Options:
node:internal/main/print_help:130
      return StringPrototypeLocaleCompare(name1, name2);
             ^RangeError: Internal error. Icu error.
    at String.localeCompare (<anonymous>)
    at node:internal/main/print_help:130:14
    at Array.sort (<anonymous>)
    at format (node:internal/main/print_help:121:25)
    at print (node:internal/main/print_help:214:23)
    at node:internal/main/print_help:231:1
root@legolas:~/AGL/master/build-html5/tmp/work/corei7-64-agl-linux/html5-mixer/1.0+gitAUTOINC+38587cf96c-r0/git# 


There is an ICU error. Digging deeper reveals, that node will look for the icu's .dat file (which we did disable). 

Enabling the .dat generation led to the issue #15301 .
Comment 1 Jan-Simon Moeller 2023-11-30 14:20:49 UTC
Enabling the dat file does fix nodejs / npm .
Comment 2 Ross Burton 2023-12-01 14:37:30 UTC
Isn't this a case of "don't do that"?  node needs the data but you turned it off.
Comment 3 Jan-Simon Moeller 2023-12-01 14:47:37 UTC
Well, it was deactivated in upstream here:
https://git.yoctoproject.org/poky/commit/meta/recipes-support/icu?id=754866f32bfc1e3986199b353f037536f326ae77
Comment 4 Ross Burton 2023-12-01 15:12:38 UTC
Ah, thanks for the context.

I wonder if we can make the recipe notice that.
Comment 5 Randy MacLeod 2024-10-31 15:06:07 UTC
move to unassigned. feel free to take back if you have time.
Comment 6 Randy MacLeod 2026-03-26 15:18:16 UTC
Ideally we should generate that data file to fix the build race  but it's not a priority and we don't have a volunteer.