nodejs/node · error
-1
-1
Error message
Assembly type "%s" is unknown.
What it means
The assembly type string specified via the -a option (stored in pkgDataFlags[GENCCODE_ASSEMBLY_TYPE]) did not pass checkAssemblyHeaderName(). pkgdata recognizes only specific assembly dialect names that genccode supports (e.g. 'gcc', 'gcc-darwin', 'masm', 'nasm'). An unrecognized value causes immediate exit with code -1 before any assembly code is generated.
Source
Thrown at deps/icu-small/source/tools/pkgdata/pkgdata.cpp:758
nullptr,
gencFilePath,
sizeof(gencFilePath));
result = pkg_createWithAssemblyCode(targetDir, mode, gencFilePath);
if (result != 0) {
fprintf(stderr, "Error generating assembly code for data.\n");
return result;
} else if (IN_STATIC_MODE(mode)) {
if(o->install != nullptr) {
if(o->verbose) {
fprintf(stdout, "# Installing static library into %s\n", o->install);
}
result = pkg_installLibrary(o->install, targetDir, noVersion);
}
return result;
}
} else {
fprintf(stderr,"Assembly type \"%s\" is unknown.\n", genccodeAssembly);
return -1;
}
} else {
if(o->verbose) {
fprintf(stdout, "# Writing object code to %s ..\n", gencFilePath);
}
if (o->withoutAssembly) {
#ifdef BUILD_DATA_WITHOUT_ASSEMBLY
result = pkg_createWithoutAssemblyCode(o, targetDir, mode);
#else
/* This error should not occur. */
fprintf(stderr, "Error- BUILD_DATA_WITHOUT_ASSEMBLY is not defined. Internal error.\n");
#endif
} else {
#ifdef CAN_WRITE_OBJ_CODE
/* Try to detect the arch type, use nullptr if unsuccessful */
char optMatchArch[10] = { 0 };
pkg_createOptMatchArch(optMatchArch);View on GitHub (pinned to 1b2de5e052)
Solutions
- Check the valid assembly types by running 'genccode -h' or inspecting checkAssemblyHeaderName() in genccode.c for your ICU version.
- Use the correct platform-specific type: 'gcc' for GNU as, 'gcc-darwin' for macOS, 'masm' for MSVC x86, 'nasm' for NASM.
- If unsure which type to use, omit -a entirely and let pkgdata auto-detect, or use BUILD_DATA_WITHOUT_ASSEMBLY mode.
Example fix
// before // pkgdata -a linux-x86_64 ... // after // pkgdata -a gcc ...
Defensive patterns
Strategy: validation
Validate before calling
// Before passing -a to pkgdata, validate the assembly type
#include <string.h>
bool isValidAssemblyType(const char* type) {
// Known genccode assembly types (varies by ICU version)
const char* known[] = {"gcc","gcc-darwin","gcc-win32","masm","nasm",nullptr};
for (int i = 0; known[i]; i++) {
if (strcmp(type, known[i]) == 0) return true;
}
return false;
} Prevention
- Check valid assembly types with 'genccode -h' for your ICU version.
- Let pkgdata auto-detect by omitting -a when possible.
- Validate the -a value in your build script before invoking pkgdata.
When it happens
Trigger: Passing pkgdata an -a flag with a value not in genccode's known assembly header list. The string is checked after stripping the leading '-a ' prefix (offset by 3 characters at line 735). Valid names depend on the ICU version's genccode implementation.
Common situations: Typo in the assembly type name; using a type valid in a newer ICU version against an older pkgdata build; passing a platform name instead of an assembly dialect name.
Related errors
- Error generating assembly code for data.
- Unable to open or read \"%s\" option file. status = %s\n
- %s: Error calling '%s'\n
- %s: icu-config not found. Fix PATH or specify -O option\n
- %s: Unable to locate pkgdata.inc. Unable to parse the result
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/044ab7313931d025.
Report an issue: GitHub.