Computing.Net > Forums > Linux > Compilation problem: gcc not workin

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Compilation problem: gcc not workin

Reply to Message Icon

Name: Martin691
Date: February 22, 2005 at 14:24:37 Pacific
OS: Fedora Core 3
CPU/Ram: 512Mb
Comment:

I am trying to compile PHP5, and get this message:
Checking whether the C compiler (gcc ) works... no


# ./configure --with-mysqli=/usr/src/php-5.0.3/ext/ --with-gd
loading cache ./config.cache
checking host system type... i686-pc-linux-gnulibc1
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
# rpm -qa | grep gcc gcc-java-3.4.2-6.fc3
gcc-g77-3.4.2-6.fc3
libgcc-3.4.2-6.fc3
gcc-c++-3.4.2-6.fc3
gcc-3.4.2-6.fc3
# which gcc
/usr/bin/gcc

Does anyone know what this means, or how to correct it?
Thank



Sponsored Link
Ads by Google

Response Number 1
Name: Martin691
Date: February 23, 2005 at 13:21:54 Pacific
Reply:

Still not worked it out, but it looks as though the compiler doesn't work. When I ran the above configure command it produced the following log file:
Contents of config.log:
#> cat config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:1631: checking host system type
configure:1719: checking for gcc
configure:1832: checking whether the C compiler (cc ) works
configure:1848: cc -o conftest conftest.c 1>&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure: failed program was:

#line 1843 "configure"
#include "confdefs.h"

main(){return(0);}

I did some further tests on the C Compiler and got the following results:
First I created a c file as shown:
#> cat x.c
main()
{
printf("Hello World!\n");
}

Then I tried to compile it:
#> cc x.c
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
#> gcc x.c
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status

This shows the c compiler doesn't work, but I am still stuck.


0

Response Number 2
Name: runner_crashed
Date: February 24, 2005 at 07:45:26 Pacific
Reply:


> This shows the c compiler doesn't work, but I am still stuck.

No. This shows the "crt1.o" file doesn't exists. If you're usind Debian you might do: bash# dpkg -S crt1.o
bash# ldconfig -might be useful too
or simply (re)installing the package that provides crt1.o


0

Response Number 3
Name: Martin691
Date: February 25, 2005 at 02:06:34 Pacific
Reply:

I managed to download some RPMs for this as follows which got the C compiler to work. I don't know which one did this exactly:
glibc-*
libc-*

This meant I could compile my test C program, but still have more errors, but it has progressed a lot.

I will post again for the new problems.


0

Response Number 4
Name: runner_crashed
Date: February 25, 2005 at 13:32:15 Pacific
Reply:


Post again, then, and use -v (be verbose).


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Compilation problem: gcc not workin

file compilation problem www.computing.net/answers/linux/file-compilation-problem/24966.html

gcc problem www.computing.net/answers/linux/gcc-problem/7396.html

GCC compiler problems www.computing.net/answers/linux/gcc-compiler-problems/17599.html