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
> 
> 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

> 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 [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to