nodejs/node · error
U_FILE_ACCESS_ERROR
U_FILE_ACCESS_ERROR
Error message
gencmn: unable to open input file %s\n
What it means
gencmn could not open the input list file you passed (the -d/-f input listing the data files to pack). T_FileStream_open("r") on that path returned NULL, so the tool aborts with U_FILE_ACCESS_ERROR. This is a fatal CLI tool error printed to stderr followed by exit(U_FILE_ACCESS_ERROR).
Source
Thrown at deps/icu-small/source/tools/toolutil/pkg_gencmn.cpp:158
if (destDir == nullptr) {
destDir = u_getDataDirectory();
}
if (name == nullptr) {
name = COMMON_DATA_NAME;
}
if (type == nullptr) {
type = DATA_TYPE;
}
if (source == nullptr) {
source = ".";
}
if (dataFile == nullptr) {
in = T_FileStream_stdin();
} else {
in = T_FileStream_open(dataFile, "r");
if(in == nullptr) {
fprintf(stderr, "gencmn: unable to open input file %s\n", dataFile);
exit(U_FILE_ACCESS_ERROR);
}
}
if (verbose) {
if(sourceTOC) {
printf("generating %s_%s.c (table of contents source file)\n", name, type);
} else {
printf("generating %s.%s (common data file with table of contents)\n", name, type);
}
}
/* read the list of files and get their lengths */
while((s != nullptr && *s != 0) || (s=T_FileStream_readLine(in, (line=linePtr),
LINE_BUFFER_SIZE))!=nullptr) {
/* remove trailing newline characters and parse space separated items */
if (s != nullptr && *s != 0) {
line=s;View on GitHub (pinned to 1b2de5e052)
Solutions
- Confirm the input list file exists and is a regular readable file: `test -r "$LIST" || echo missing` before invoking gencmn.
- Re-run the upstream make target that generates the list file (e.g. the icudata build step) so the path is materialized before gencmn runs.
- Run gencmn from the directory the list path is relative to, or pass an absolute path to the list file.
- Fix ownership/permissions: `chmod -R u+r deps/icu-small/source/data/out` and ensure the build user owns the tree.
Example fix
# before
gencmn ./tmp/missinglist.txt
# after
test -r ./out/icudt_files.txt && gencmn ./out/icudt_files.txt || { echo "list missing; rebuild data"; exit 1; } Defensive patterns
Strategy: validation
Validate before calling
# before invoking gencmn, ensure the input list exists and is readable
test -n "$LIST" && test -r "$LIST" || { echo "gencmn: input list '$LIST' missing/unreadable" >&2; exit 1; } Prevention
- Treat gencmn as a build step with a file prerequisite: declare the list file as a make target dependency so it exists before gencmn runs.
- Always check gencmn's exit code in build scripts: `gencmn ... || exit $?`.
- Run from the directory the list path is relative to, or pass an absolute path.
- After a sudo/root build, chown the tree back to the build user to avoid permission denials.
When it happens
Trigger: Running `gencmn <listfile>` (or pkgdata invoking gencmn) where <listfile> does not exist, is not readable by the build user, or is a directory. Also when stdin is not a TTY and dataFile is unexpectedly NULL it falls back to stdin instead.
Common situations: Building ICU/icudata from a fresh or partial checkout where the generated list file was not produced; running gencmn from the wrong working directory so a relative list path misses; permission/ownership mismatch on build artifacts under deps/icu-small after a sudo build or a `make clean` that removed the list.
Related errors
- gencmn: udata_create(-d %s -n %s -t %s) failed - %s\n
- gencmn: no files listed in %s\n
- gencmn: udata_finish() failed - %s\n
- U_ILLEGAL_ARGUMENT_ERROR
- U_FILE_ACCESS_ERROR
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/ba8620093d97677c.
Report an issue: GitHub.