Narrowing the problem: it isn't any of the Mir code, or the generated code, or explicit calls into libprotobuf-lite.
The following program loads and unloads libprotobuf-lite.so from 2.6.1 successfully. With 3.0.0 it fails to unload.
#include <stdio.h> #include <dlfcn.h>
int main(int argc, char** argv) { char const* libname = argc <= 1 ? "libprotobuf-lite.so" : argv[1];
void* dl = NULL;
dl = dlopen(libname, RTLD_NOW); if (!dl) { printf("dlopen() error: (%s)\n", dlerror()); return 1; }
printf("library loaded\n"); dlclose(dl);
dl = dlopen(libname, RTLD_NOW|RTLD_NOLOAD);
if (dl) { printf("library didn't unload: (%s)\n", libname); dlclose(dl); return 1; }
printf("library unloaded\n");
return 0; }
Narrowing the problem: it isn't any of the Mir code, or the generated code, or explicit calls into libprotobuf-lite.
The following program loads and unloads libprotobuf-lite.so from 2.6.1 successfully. With 3.0.0 it fails to unload.
#include <stdio.h>
#include <dlfcn.h>
int main(int argc, char** argv) lite.so" : argv[1];
{
char const* libname = argc <= 1 ? "libprotobuf-
void* dl = NULL;
dl = dlopen(libname, RTLD_NOW);
printf( "dlopen( ) error: (%s)\n", dlerror());
if (!dl)
{
return 1;
}
printf("library loaded\n");
dlclose(dl);
dl = dlopen(libname, RTLD_NOW| RTLD_NOLOAD) ;
if (dl)
printf( "library didn't unload: (%s)\n", libname);
dlclose( dl);
{
return 1;
}
printf("library unloaded\n");
return 0;
}