{"record":{"id":"3bc6dddd72dc9808","repo":"nodejs/node","slug":"error-creating-data-archive-library-file","errorCode":null,"errorMessage":"Error creating data archive library file.\n","messagePattern":"Error creating data archive library file\\.\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"deps/icu-small/source/tools/pkgdata/pkgdata.cpp","lineNumber":814,"sourceCode":"                    fprintf(stderr, \"Error- neither CAN_WRITE_OBJ_CODE nor BUILD_DATA_WITHOUT_ASSEMBLY are defined. Internal error.\\n\");\n                    return 1;\n#endif\n                }\n\n                if (result != 0) {\n                    fprintf(stderr, \"Error generating package data.\\n\");\n                    return result;\n                }\n            }\n#if !U_PLATFORM_USES_ONLY_WIN32_API\n            if(!IN_STATIC_MODE(mode)) {\n                /* Certain platforms uses archive library. (e.g. AIX) */\n                if(o->verbose) {\n                  fprintf(stdout, \"# Creating data archive library file ..\\n\");\n                }\n                result = pkg_archiveLibrary(targetDir, o->version, reverseExt);\n                if (result != 0) {\n                    fprintf(stderr, \"Error creating data archive library file.\\n\");\n                   return result;\n                }\n#if U_PLATFORM != U_PF_OS400\n                if (!noVersion) {\n                    /* Create symbolic links for the final library file. */\n#if U_PLATFORM == U_PF_OS390\n                    result = pkg_createSymLinks(targetDir, o->pdsbuild);\n#else\n                    result = pkg_createSymLinks(targetDir, noVersion);\n#endif\n                    if (result != 0) {\n                        fprintf(stderr, \"Error creating symbolic links of the data library file.\\n\");\n                        return result;\n                    }\n                }\n#endif\n            } /* !IN_STATIC_MODE */\n#endif","sourceCodeStart":796,"sourceCodeEnd":832,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/icu-small/source/tools/pkgdata/pkgdata.cpp#L796-L832","documentation":"pkg_archiveLibrary() returned non-zero. On platforms where the shared object suffix (.so) differs from the final library suffix and the archive suffix (.a) matches the final suffix (e.g. AIX), pkgdata runs 'ar' and 'ranlib' to create an archive library. This error means one of those commands failed.","triggerScenarios":"Only fires on non-static, non-Win32 platforms where pkgDataFlags[SOBJ_EXT] != pkgDataFlags[SO_EXT] and pkgDataFlags[A_EXT] == pkgDataFlags[SO_EXT]. The 'ar' command (pkgDataFlags[AR] with pkgDataFlags[ARFLAGS]) or the 'ranlib' command failed via system().","commonSituations":"On AIX: 'ar' not found in PATH; archive flags incorrect; the temporary library file to be archived doesn't exist; 'ranlib' not available or failing on the created archive.","solutions":["Verify 'ar' and 'ranlib' are installed and in PATH (pkgDataFlags[AR] and pkgDataFlags[RANLIB]).","Check pkgDataFlags[ARFLAGS] contains valid flags for the platform's archiver.","Ensure the source .so file exists in the target directory before archiving.","Re-run configure to regenerate correct AR/ARFLAGS/RANLIB values for the platform."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before building on AIX-like platforms, verify ar and ranlib exist\n#include <unistd.h>\n\nbool checkArchiverTools(const char* ar, const char* ranlib) {\n    return access(ar, X_OK) == 0 && access(ranlib, X_OK) == 0;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["On AIX, verify 'ar' and 'ranlib' are in PATH before building.","Check pkgDataFlags[AR], pkgDataFlags[ARFLAGS], and pkgDataFlags[RANLIB] are set.","Run configure with the correct --host triple for the target platform."],"tags":["icu","pkgdata","archive","ar","ranlib","aix","build-tool"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}