{"record":{"id":"2b4a186c169a2b14","repo":"nodejs/node","slug":"assembly-type-s-is-unknown-n","errorCode":null,"errorMessage":"Assembly type \"%s\" is unknown.\\n","messagePattern":"Assembly type \"(.+?)\" is unknown\\.\\\\n","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"deps/icu-small/source/tools/genccode/genccode.c","lineNumber":155,"sourceCode":"            \"\\t                    Valid values for this opton are x64, x86 and arm64.\\n\"\n            \"\\t--skip-dll-export   Don't export the ICU data entry point symbol (for use when statically linking)\\n\");\n#endif\n        fprintf(stderr,\n            \"\\t-f or --filename    Specify an alternate base filename. (default: symbolname_typ)\\n\"\n            \"\\t-a or --assembly    Create assembly file. (possible values are: \");\n\n        printAssemblyHeadersToStdErr();\n    } else {\n        const char *message, *filename;\n        /* TODO: remove void (*writeCode)(const char *, const char *); */\n\n        if(options[kOptAssembly].doesOccur) {\n            message=\"generating assembly code for %s\\n\";\n            writeCode = CALL_WRITEASSEMBLY;\n            /* TODO: remove writeCode=&writeAssemblyCode; */\n\n            if (!checkAssemblyHeaderName(options[kOptAssembly].value)) {\n                fprintf(stderr,\n                    \"Assembly type \\\"%s\\\" is unknown.\\n\", options[kOptAssembly].value);\n                return -1;\n            }\n        }\n#ifdef CAN_GENERATE_OBJECTS\n        else if(options[kOptObject].doesOccur) {\n            message=\"generating object code for %s\\n\";\n            writeCode = CALL_WRITEOBJECT;\n            /* TODO: remove writeCode=&writeObjectCode; */\n        }\n#endif\n        else\n        {\n            message=\"generating C code for %s\\n\";\n            writeCode = CALL_WRITECCODE;\n            /* TODO: remove writeCode=&writeCCode; */\n        }\n        if (options[kOptQuiet].doesOccur) {","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/icu-small/source/tools/genccode/genccode.c#L137-L173","documentation":"When -a/--assembly is given, genccode validates the value against its built-in table of assembly header templates (gcc, sun, aCC-ia64, aCC-parisc, nasm, masm, masm64, etc.) via checkAssemblyHeaderName(). If the value matches none of them, the tool prints the unknown assembly type, calls printAssemblyHeadersToStdErr() to list the valid names, and returns -1.","triggerScenarios":"options[kOptAssembly].value is a string not equal to any entry in the assemblyHeader[] array — e.g. \"gcc5\", \"elf\", \"att\", a platform name instead of an assembly dialect, or a case mismatch (the comparison is case-sensitive strcmp).","commonSituations":"Setting GENCCODE_ASSEMBLY in a config/mh-* file to a value not supported by this ICU build; porting an ICU build to a new toolchain and guessing the assembly name; case error (e.g. \"NASM\" vs \"nasm\").","solutions":["Use one of the names printed by printAssemblyHeadersToStdErr() (run genccode -a badname to list them).","Match case exactly — checkAssemblyHeaderName uses strcmp, so \"nasm\" not \"NASM\".","If your platform truly needs a new dialect, add a template to assemblyHeader[] in pkg_genc.cpp and rebuild the tool."],"exampleFix":"# before\ngenccode -a NASM data.dat\n\n# after\ngenccode -a nasm data.dat","handlingStrategy":"validation","validationCode":"// canonical, supported assembly names (keep in sync with pkg_genc.cpp assemblyHeader[])\nVALID_ASM = {\"gcc\",\"gcc-cygwin\",\"gcc-win32\",\"sun\",\"sun-x86\",\"aCC-ia64\",\"aCC-parisc\",\"nasm\",\"masm\",\"masm64\"}\nif assembly not in VALID_ASM:\n    raise ValueError(f'unsupported -a {assembly!r}; choose from {sorted(VALID_ASM)}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the exact lowercase name returned by genccode's own error listing.","Drive GENCCODE_ASSEMBLY from a single build variable to avoid per-rule typos."],"tags":["icu","genccode","assembly","toolchain"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}