{"record":{"id":"63d39b803b5a8eb2","repo":"nodejs/node","slug":"ucadata-was-used-with-uconfig-no-collation","errorCode":null,"errorMessage":"--ucadata was used with UCONFIG_NO_COLLATION","messagePattern":"--ucadata was used with UCONFIG_NO_COLLATION","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"deps/icu-small/source/tools/genrb/genrb.cpp","lineNumber":318,"sourceCode":"    }\n    status = U_ZERO_ERROR;\n    if(options[WRITE_JAVA].doesOccur) {\n        write_java = true;\n        outputEnc = options[WRITE_JAVA].value;\n    }\n\n    if(options[WRITE_XLIFF].doesOccur) {\n        write_xliff = true;\n        if(options[WRITE_XLIFF].value != nullptr){\n            xliffOutputFileName = options[WRITE_XLIFF].value;\n        }\n    }\n\n    if (options[UCADATA].doesOccur) {\n#if !UCONFIG_NO_COLLATION\n        CollationRoot::forceLoadFromFile(options[UCADATA].value, status);\n#else\n        fprintf(stderr, \"--ucadata was used with UCONFIG_NO_COLLATION\\n\");\n        return status;\n#endif\n    }\n\n    initParser();\n\n    /*added by Jing*/\n    if(options[LANGUAGE].doesOccur) {\n        language = options[LANGUAGE].value;\n    }\n\n    LocalPointer<SRBRoot> newPoolBundle;\n    if(options[WRITE_POOL_BUNDLE].doesOccur) {\n        newPoolBundle.adoptInsteadAndCheckErrorCode(new SRBRoot(nullptr, true, status), status);\n        if(U_FAILURE(status)) {\n            fprintf(stderr, \"unable to create an empty bundle for the pool keys: %s\\n\", u_errorName(status));\n            return status;\n        } else {","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/icu-small/source/tools/genrb/genrb.cpp#L300-L336","documentation":"The --ucadata flag triggers CollationRoot::forceLoadFromFile(), which needs the collation framework. When ICU was compiled with UCONFIG_NO_COLLATION defined, collation is compiled out entirely, so loading ucadata is impossible. The #else branch at genrb.cpp:317-319 prints this message and returns the current status. This is a compile-time configuration mismatch, not a runtime data problem.","triggerScenarios":"Building ICU with -DUCONFIG_NO_COLLATION=1 (common on minimal/embedded builds) and then running a genrb invocation that passes --ucadata <file>.","commonSituations":"A stripped-down ICU build for a constrained target where collation was disabled to save space, then reusing that toolchain to compile locale data that still references ucadata; mixing a minimal ICU tool build with a full data tree.","solutions":["Rebuild ICU without UCONFIG_NO_COLLATION so collation support is available.","Drop --ucadata from the genrb invocation if you genuinely do not need collation data.","Align the build configuration of the genrb binary with the data set you are compiling."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# If --ucadata is requested, ensure the genrb binary was built with collation\nif [ -n \"$UCADATA_FILE\" ]; then\n  if pkg-config --exists icu-i18n 2>/dev/null && ! pkg-config --cflags icu-i18n | grep -q UCONFIG_NO_COLLATION; then\n    : # ok\n  else\n    echo \"WARNING: ICU built without collation; --ucadata will fail\" >&2\n  fi\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the build configuration of the genrb tool in lock-step with the feature set the data tree expects.","When stripping ICU features for size, also strip the corresponding data-build flags."],"tags":["icu","genrb","collation","build-config","ucadata"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}