LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   My C compiler cannot create executables, help (https://www.linuxquestions.org/questions/linux-software-2/my-c-compiler-cannot-create-executables-help-192038/)

rbmako69 06-10-2004 03:17 PM

My C compiler cannot create executables, help
 
every time i try and run a ./configure file after uncompressing a tarball, i get this error: "checking for C compiler default output... configure: error: C compiler cannot create executables"

Then it just returns to the prompt

I need help badly

bulliver 06-10-2004 03:30 PM

What is the output of "echo $CC"
Is it gcc? Maybe this is a permissions problem. Are you trying to compile software as a regular user in a directory you don't have write permission in?

rbmako69 06-10-2004 03:32 PM

the output is a blank line or no output

I am running as root in my home directory

rbmako69 06-11-2004 08:05 AM

I guess no one can help me.:mad:

maxware 06-11-2004 09:25 AM

Have you checked to make sure gcc is installed?

rbmako69 06-14-2004 07:52 AM

Im not totally sure if it is. how do i check?

cleff 06-14-2004 08:07 AM

try this:
$ gcc

if that doesn't work, then try
# updatedb
# locate gcc

rbmako69 06-14-2004 08:32 AM

I did those commands, and it had no effect, im still getting the same error that the gcc compiler cannot create executables. Heres the ./configure output....

[root@localhost httpd-2.0.49]# ./configure
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1

Configuring Apache Portable Runtime library ...

checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
Configuring APR library
Platform: i686-pc-linux-gnulibc1
checking for working mkdir -p... yes
APR Version: 0.9.5
checking for chosen layout... apr
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
configure failed for srclib/apr
[root@localhost httpd-2.0.49]#

cleff 06-14-2004 08:35 AM

those commands were to check if you have gcc installed. So...do you?

rbmako69 06-14-2004 09:21 AM

yes, but it still cannot create executables

bulliver 06-14-2004 04:53 PM

This is just a guess but in the kernel configuration there are two options, one for creating a.out executables, and one for creating ELF binaries. Perhaps this is the problem.

If you are using a custom kernel go into the top-level source and run:
Code:

cat .config | grep ELF
You should see:
Code:

CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y

If you do not see these you may need to recompile your kernel. Again though...this is just a guess. It would seem odd that you have gcc installed but it cannot create executables.

Another thought: you may need the kernel headers installed.

rbmako69 06-16-2004 08:15 AM

Im not running a custom kernel. Im running the new version of redhat ws. Is what you told me to do still apply

bulliver 06-16-2004 02:07 PM

Well the kernel should be fine then. My only suggestion is to install the kernel headers. There should be an rpm package on the redhat install discs.

Tinkster 06-16-2004 02:14 PM

You never posted the output of
locate gcc
or
gcc --version

Personally I think that it's just not installed ;)


Cheers,
Tink

bulliver 06-16-2004 02:18 PM

Tinkster: but what about this from his .configure output:
Code:

checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables

It would seem it is installed but broken somehow.


All times are GMT -5. The time now is 04:32 AM.