[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#227906: libc6: Failed assertion in ld.so



Package: libc6
Version: 2.3.2.ds1-10
Severity: normal

Hello,
I have a small example where use of -static-libgcc and -Wl,-Bstatic
flags cause ld.so do assert.

I have file app.cpp containing
   
   int main() { return 0; }

and lib.cpp, which is empty. I compile them with

   g++ -o lib.so -shared -static-libgcc lib.cpp -Wl,-Bstatic
   g++ -o app app.cpp lib.so -static-libgcc -Wl,-Bstatic

and when I run "./app", I get:

    Inconsistency detected by ld.so: dl-fini.c: 66: _dl_fini: Assertion `i == _rtld_local._dl_nloaded' failed!

Also, when I remove -Wl,-Bstatic from the first command line, I get the
following error at runtime:

    ld.so: Incorrectly built binary which accesses errno or h_errno directly.
    ld.so: See /usr/share/doc/libc6/FAQ.gz.

Which is strange -- since the files do not use errno in any way.


-- System Information:
Debian Release: 3.0
Architecture: i386
Kernel: Linux zigzag 2.4.24-smp #1 SMP Втр Янв 6 12:27:29 MSK 2004 i686
Locale: LANG=C, LC_CTYPE=ru_RU.KOI8-R

Versions of packages libc6 depends on:
ii  libdb1-compat                 2.1.3-7    The Berkeley database routines [gl

-- no debconf information





Reply to: