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

Re: gcc can't compile, egcc can!??



On 14 Jun, Zack Weinberg wrote:
> 
> 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
>>m.so.5
>>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.
> 

% cat /etc/ld.so.conf
/usr/lib/tkstep
/usr/X11R6/lib/neXtaw
/usr/X11R6/lib/Xaw95
/usr/X11R6/lib/Xaw3d
/usr/X11R6/lib
/usr/lib/libc5-compat
/lib/libc5-compat
/usr/local/X11/lib
/usr/local/lib


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

No LD_* environment variables.

> 
> ld --verbose | more
> 

% ld --verbose
GNU ld version 2.9.1 (with BFD 2.9.1)
  Supported emulations:
   elf_i386
   i386linux
using internal linker script:
==================================================
OUTPUT_FORMAT("elf32-i386", "elf32-i386",
              "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/
usr/i486-linux/lib);

Hmmm.  I don't even have a /usr/i486-linux/lib directory!!
/usr/local/lib doesn't have anything concerning libc in it.

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

% /lib/libc.so.6
GNU C Library production release version 2.0.7, by Roland McGrath et al.
Compiled by GNU CC version 2.7.2.3.
Copyright (C) 1992, 93, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled on a Linux 2.0.32 system on 1998/04/15.
Available extensions:
        GNU libio by Per Bothner
        BIND-4.9.6-T1A
        UFC-crypt, patchlevel 1e by Michael Glad
        linuxthreads-0.6 by Xavier Leroy
Report bugs using the `glibcbug' script to <bugs@gnu.org>.


Thanks,

Brian 



--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: