Re: gcc can't compile, egcc can!??
It looks to me as if the gcc drivers aren't doing anything wrong. But
this is a big fat clue:
>ld: warning: libm.so.6, needed by /usr/lib/libstdc++.so, may conflict with lib
>ld: warning: libc.so.6, needed by /lib/libm.so.6, may conflict with libc.so.5
The linker called by gcc/g++ 2.7 is attempting to link your program
with the crt1.o from libc6 but the dynamic library from libc5. That
implies you have strange environment variable settings or mangled
linker config files. egcc has a wrapper for ld which is smart enough
to straighten this out.
If you have environment variables named LD_somethingorother
(LD_RUN_PATH, LD_LIBRARY_PATH, etc.) unset them and try again to
compile with gcc 2.7. Also, do this:
ld --verbose | more
This will produce much incomprehensible output; you care only about
the first few lines, which should read like this:
GNU ld version 2.8.2 (with BFD 18.104.22.168.25)
using internal linker script:
If it doesn't say "using internal linker script", or if any of the
SEARCH_DIR entries have the word `libc5' in them, you have a problem
with your linker installation.
>% cat /usr/lib/libc.so
>/* GNU ld script
> Use the shared library, but some functions are only in
> the static library, so try that secondarily. */
>GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )
*blink* I thought that was only in development libc. What do you get
if you execute /lib/libc.so.6 as a program?
To UNSUBSCRIBE, email to email@example.com
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org