Bug#227906: libc6: Failed assertion in ld.so
On Fri, Jan 16, 2004 at 12:59:29AM +0900, GOTO Masanori wrote:
> At Thu, 15 Jan 2004 18:00:15 +0300,
> Vladimir Prus wrote:
> > 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
What is this trying to accomplish? You're going to get shared
versions of some libraries and dynamic versions of others.
> >
> > 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!
>
> Strange. Under both my kernel 2.4.21 and 2.6.0-test11 with 2.3.2.ds1-10:
>
> gotom@moog:~/debian/custom/glibc/bugs/227906> ./app
> ./app: error while loading shared libraries: lib.so: cannot open shared object file: No such file or directory
I can't explain the inconsistency (maybe an LD_LIBRARY_PATH) but try
replacing lib.so with ./lib.so on the second g++ line to fix this
error.
> > 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.
>
> Please check your environment (ex: g++ version).
>
> Regards,
> -- gotom
>
>
> --
> To UNSUBSCRIBE, email to debian-glibc-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
Reply to: