[Debtags-devel] Converting to {debtags,tagcoll} 1.0 TagDB::outputSystem

Benjamin Mesing bensmail@gmx.net
Sun, 12 Jun 2005 14:08:31 +0200


Hello,

I was finally able to get packagesearch compile with the new
libdebtags/libtagcoll versions (thanks for the quick bugfix).
Unfortunately the program crashes on startup with the following
stacktrace:
        #0  0x40bc683b in raise () from /lib/tls/libc.so.6
        #1  0x40bc7fa2 in abort () from /lib/tls/libc.so.6
        #2  0x40145f57 in __cxa_call_unexpected () from /usr/lib/libstdc++.so.5
        #3  0x40145f94 in std::terminate () from /usr/lib/libstdc++.so.5
        #4  0x4014616c in __cxa_rethrow () from /usr/lib/libstdc++.so.5
        #5  0x4136c79f in Debtags::Vocabulary::Vocabulary () from plugins/libdebtagsplugin.so
        #6  0x41372c9a in Debtags::StandardEnvironment::StandardEnvironment ()
           from plugins/libdebtagsplugin.so
        #7  0x41372955 in Debtags::Environment::init () from plugins/libdebtagsplugin.so
        #8  0x413419aa in init () at debtagsplugincontainer.cpp:74
        #9  0x41343c6b in global constructors keyed to new_debtagsplugin () at TagcollConsumer.h:60
        #10 0x413b2f25 in __do_global_ctors_aux () from plugins/libdebtagsplugin.so
        #11 0x41336f85 in _init () from plugins/libdebtagsplugin.so
        #12 0x4000c0de in _dl_catch_error () from /lib/ld-linux.so.2
        #13 0x4000c1ca in _dl_init () from /lib/ld-linux.so.2
        #14 0x40ca62b2 in _dl_open () from /lib/tls/libc.so.6
        #15 0x4000bf26 in _dl_catch_error () from /lib/ld-linux.so.2
        #16 0x40ca5ed6 in _dl_open () from /lib/tls/libc.so.6
        #17 0x40cd4038 in dlopen () from /lib/tls/libdl.so.2
        #18 0x4000bf26 in _dl_catch_error () from /lib/ld-linux.so.2
        #19 0x40cd44a6 in dlerror () from /lib/tls/libdl.so.2
        #20 0x40cd3fe4 in dlopen () from /lib/tls/libdl.so.2
        [...]
        
Where the call causing the exception is Debtags::Environment::init(false, false);

Some words towards the circumstances. As you can see the function is
called in the process of initilalizing a dynamic library (i.e. in
__attribute__ ((constructor)) void init()). This is because the debtags
part for packagesearch is provided by a dynamically loaded plugin.
I don't know if this is significant, but the both the debtags plugin and
the main application are linked against lib{tagcoll,debtags}1. In the
former versions, I had only to link the main application, because I
linked against dynamic libraries. With the static ones this leaded to
unresolved external symbols. Might it be possible that linking against
lib{tagcoll,debtags}1 twice brings me into trouble?

Any help would be appreciated.

Greetings Ben