From: Christian P. <cp...@se...> - 2004-12-21 13:54:17
|
Am Dienstag 21 Dezember 2004 00:51 schrieb stephan beal: > You're not gonna believe what it was: > > Last weekend i reported that i had to link directly against psq_mysql.so > to avoid an undef'd BigInt symbol. THAT is what caused the IOManager to > not find the factories. i can't explain it, but i can reproduce it: > removing that .so from my linking fixes the problem, adding it back on > breaks it again. It's clear to me. Libraries linked against your app binary export their symbols "global". Plugins are loaded without overwriting "global" (~RTLD_GLOBAL) bindings. When shared libraries are loaded, colliding symbols are not rebound. So the actual problem is that your binary has a global symbol "P_plugins", and every plugin you dynamically load also has this symbol exported, which not gets overwritten. > WEIRD... > > My client fails with these link args: > -ls11n -lpcore -lpcrypto -lpio -lpnet -lpsql > -lps11n /home/stephan/cvs/inst/lib/pclasses/psql_mysql.so > > piomanager.cpp:40 : IOManager loading plugins from . > [/home/stephan/cvs/inst/lib/pclasses]. > piomanager.cpp:50 : file??? 0 > piomanager.cpp:51 : ftp??? 0 > piomanager.cpp:52 : http??? 0 > piomanager.cpp:127:P::IOHandler* P::IOManager::findCreateHandler(const > std::string&): No handler for protocol 'http' found. > > But works with these: > -ls11n -lpcore -lpcrypto -lpio -lpnet -lpsql -lps11n > > piomanager.cpp:40 : IOManager loading plugins from . > [/home/stephan/cvs/inst/lib/pclasses]. > piomanager.cpp:50 : file??? 0x808b860 > piomanager.cpp:51 : ftp??? 0x808fab8 > piomanager.cpp:52 : http??? 0x808fb08 > test.cpp:75 : Buffered 1042 bytes from [http://localhost/P.s11n]. |