On Tue, Apr 10, 2001 at 10:10:57AM +0300, Harri Haataja wrote:
> On 9 Apr 2001 [EMAIL PROTECTED] wrote:
> 
> > While installing on a linux system I got the following error:
> > 
> > ...
> > checking for gcc... gcc
> > checking whether the C compiler (gcc  ) works... no
> > configure: error: installation or configuration problem: C compiler cannot create 
>executables.
> > 
> > 
> > The permissions look OK.
> > # which gcc
> > /usr/bin/gcc
> > # ls -l /usr/bin/gcc
> > -rwxr-xr-x   2 root     root        76172 May  3  2000 /usr/bin/gcc
> > 
> > 
> > What could be the cause?
> 

Try also this.  Put the following in a file called "hello.c":

-------- cut ---------
#include <stdio.h>

main ()
{
printf("Yow!\n");
exit(0)
}
-------- cut ---------

then try:

gcc -v -o hello hello.c

You should see something like the following.  If you don't,
your C compiler has an installation problem.  Look for 
"can't open file" and thinks like that.

When you install a Linux system on which you plan to compile programs,
you need to include at least some of the optional packages intended
to support program development.  From what you say, it is likely that
you missed these.

------------------------- gcc -v output ----------------------------
gcc -v -o hello hello.c
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/cpp -lang-c -v -D__GNUC__=2
-D__GNUC_
MINOR__=95 -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__
-D__i386__ -
D__linux__ -D__unix -D__linux -Asystem(posix) -Acpu(i386)
-Amachine(i386) -Di386
 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586 -D__i586__ -D__pentium
-D__pentiu
m__ hello.c /tmp/cc36zk1e.i
GNU CPP version 2.95.2 19991024 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../i586-pc-linux-gnu/include
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include
 /usr/include
End of search list.
The following default directories have been omitted from the search
path:
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3
End of omitted list.
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/cc1 /tmp/cc36zk1e.i -quiet
-dumpbase
hello.c -version -o /tmp/cccAoVcF.s
GNU C version 2.95.2 19991024 (release) (i586-pc-linux-gnu) compiled by
GNU C ve
rsion 2.95.2 19991024 (release).
 /usr/i586-pc-linux-gnu/bin/as -V -Qy -o /tmp/ccXGbYzw.o /tmp/cccAoVcF.s
GNU assembler version 2.9.5 (i586-pc-linux-gnu) using BFD version
2.9.5.0.41
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/collect2 -m elf_i386
-dynamic-linker
/lib/ld-linux.so.2 -o hello /usr/lib/crt1.o /usr/lib/crti.o
/usr/lib/gcc-lib/i58
6-pc-linux-gnu/2.95.2/crtbegin.o
-L/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2 -L/
usr/i586-pc-linux-gnu/lib /tmp/ccXGbYzw.o -lgcc -lc -lgcc
/usr/lib/gcc-lib/i586-
pc-linux-gnu/2.95.2/crtend.o /usr/lib/crtn.o


-- 
Dan Wilder <[EMAIL PROTECTED]> 

Reply via email to