GOTO Masanori wrote: > > 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! > > Strange. Under both my kernel 2.4.21 and 2.6.0-test11 with 2.3.2.ds1-10: > > [EMAIL PROTECTED]:~/debian/custom/glibc/bugs/227906> ./app > ./app: error while loading shared libraries: lib.so: cannot open shared > object file: No such file or directory
Ah.. I now realize what Daniel meant. If I under LD_LIBRARY_PATH, I get this error. If I change "lib.so" to "./lib.so", I get the same error as previously. > > 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). gcc version 3.3.3 20040110 (prerelease) (Debian) Though I get exactly the same results with gcc version 3.2.3 (Debian) The kernel is 2.4.24-smp, if that matters. - Volodya -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]