This isn't a ghc specific question as I've just found a similar problem
with gcc, but I was hoping someone here could lend me a hand...I recently
installed RedHat 7.2 on my x86 laptop and then immediately installed
ghc 5.02.3 from rpm.  Compilation works fine as does interpretation but
linking doesn't and it seems to be a problem with ld.  It complains
"/usr/bin/ld: cannot find -lc".  A similar thing happens in C, except in
that ld cannot find -lc.  I'm wondering if anyone has any idea what this
means and how to fix it (I'm not a *nix hacker by any means).

I've attached outputs from ghc and gcc when run with -v; the important
error is at the very bottom.  The test programs where, for haskell, "main
= print 5" and for c "int main() { printf("Hello world"); }".

Thanks for any help!

 - Hal

--
Hal Daume III

 "Computer science is no more about computers    | [EMAIL PROTECTED]
  than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume

Attachment: test.out
Description: Binary data

Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/cpp0 -lang-c -v -D__GNUC__=2 
-D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ 
-D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__NO_INLINE__ -Acpu(i386) 
-Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_i386__ test.c /tmp/cct1CflO.i
GNU CPP version 2.96 20000731 (Red Hat Linux 7.1 2.96-98) (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/usr/i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/cc1 /tmp/cct1CflO.i -quiet -dumpbase test.c 
-version -o /tmp/ccYm0Xgs.s
GNU C version 2.96 20000731 (Red Hat Linux 7.1 2.96-98) (i386-redhat-linux) compiled 
by GNU C version 2.96 20000731 (Red Hat Linux 7.1 2.96-98).
 as -V -Qy -o /tmp/ccXVGqZ7.o /tmp/ccYm0Xgs.s
GNU assembler version 2.11.90.0.8 (i386-redhat-linux) using BFD version 2.11.90.0.8
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/collect2 -m elf_i386 -dynamic-linker 
/lib/ld-linux.so.2 /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o 
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crti.o 
/usr/lib/gcc-lib/i386-redhat-linux/2.96/crtbegin.o 
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96 
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../.. /tmp/ccXVGqZ7.o -lgcc -lc -lgcc 
/usr/lib/gcc-lib/i386-redhat-linux/2.96/crtend.o 
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crtn.o
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status

Reply via email to