Bug 180810 Cannot install Mozilla nightly build on Linux. "Fatal Error [-618]: Couldn't open xpistub library"

patch by opi@gmx.at r=dveditz sr=darin
This commit is contained in:
timeless%mozdev.org 2004-06-19 00:14:36 +00:00
parent 116284e324
commit c2773637ed

View File

@ -634,7 +634,7 @@ nsXIEngine::LoadXPIStub(xpistub_t *aStub, char *aDestination)
sprintf(libloc, "%s/bin", mTmp); sprintf(libloc, "%s/bin", mTmp);
chdir(libloc); chdir(libloc);
/* open the library */ /* open the library */
getcwd(libpath, MAXPATHLEN); getcwd(libpath, MAXPATHLEN);
sprintf(libpath, "%s/%s", libpath, XPISTUB); sprintf(libpath, "%s/%s", libpath, XPISTUB);
@ -642,27 +642,28 @@ nsXIEngine::LoadXPIStub(xpistub_t *aStub, char *aDestination)
printf("DEBUG: libpath = >>%s<<\n", libpath); printf("DEBUG: libpath = >>%s<<\n", libpath);
#endif #endif
aStub->handle = NULL; aStub->handle = NULL;
aStub->handle = dlopen(libpath, RTLD_LAZY); aStub->handle = dlopen(libpath, RTLD_LAZY);
if (!aStub->handle) if (!aStub->handle)
{ {
dlerr = dlerror(); dlerr = dlerror();
DUMP(dlerr); DUMP(dlerr);
return E_LIB_OPEN; fprintf(stderr,"DLError: %s",dlerr);
} return E_LIB_OPEN;
DUMP("xpistub opened"); }
DUMP("xpistub opened");
/* read and store symbol addresses */
aStub->fn_init = (pfnXPI_Init) dlsym(aStub->handle, FN_INIT); /* read and store symbol addresses */
aStub->fn_install = (pfnXPI_Install) dlsym(aStub->handle, FN_INSTALL); aStub->fn_init = (pfnXPI_Init) dlsym(aStub->handle, FN_INIT);
aStub->fn_exit = (pfnXPI_Exit) dlsym(aStub->handle, FN_EXIT); aStub->fn_install = (pfnXPI_Install) dlsym(aStub->handle, FN_INSTALL);
if (!aStub->fn_init || !aStub->fn_install || !aStub->fn_exit) aStub->fn_exit = (pfnXPI_Exit) dlsym(aStub->handle, FN_EXIT);
{ if (!aStub->fn_init || !aStub->fn_install || !aStub->fn_exit)
dlerr = dlerror(); {
DUMP(dlerr); dlerr = dlerror();
err = E_LIB_SYM; DUMP(dlerr);
err = E_LIB_SYM;
goto BAIL; goto BAIL;
} }
DUMP("xpistub symbols loaded"); DUMP("xpistub symbols loaded");
rv = aStub->fn_init(aDestination, NULL, ProgressCallback); rv = aStub->fn_init(aDestination, NULL, ProgressCallback);