Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 04-05-2010, 01:52 PM   #1
LQ Newbie
Registered: Apr 2010
Posts: 13

Rep: Reputation: 0
error: cannot run C compiled programs.

Hi ,
I am compiling gcc 3.4.6 from source in RHEL 5 (this has gcc 4.1.2 )
I downloed all dependencies and started ./configure.
It went fine.
When I do make I get following error that cannot run C compiled programs.


checking for C compiler default output file name... b.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make: *** [configure-gcc] Error 1
[root@localhost gcc-3.4.6]#

[root@localhost gcc-3.4.6]#
[root@localhost gcc-3.4.6]# cat config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:581: checking host system type
configure:602: checking target system type
configure:620: checking build system type
configure:675: checking for a BSD compatible install
configure:2866: checking for i686-pc-linux-gnu-ar
configure:2899: checking for ar
configure:2938: checking for i686-pc-linux-gnu-as
configure:2971: checking for as
configure:3010: checking for i686-pc-linux-gnu-dlltool
configure:3043: checking for dlltool
configure:3082: checking for i686-pc-linux-gnu-ld
configure:3115: checking for ld
configure:3154: checking for i686-pc-linux-gnu-nm
configure:3187: checking for nm
configure:3226: checking for i686-pc-linux-gnu-ranlib
configure:3259: checking for ranlib
configure:3298: checking for i686-pc-linux-gnu-windres
configure:3331: checking for windres
configure:3370: checking for i686-pc-linux-gnu-objcopy
configure:3403: checking for objcopy
configure:3442: checking for i686-pc-linux-gnu-objdump
configure:3475: checking for objdump
configure:3524: checking for i686-pc-linux-gnu-ar
configure:3557: checking for ar
configure:3596: checking for i686-pc-linux-gnu-as
configure:3629: checking for as
configure:3668: checking for i686-pc-linux-gnu-dlltool
configure:3701: checking for dlltool
configure:3740: checking for i686-pc-linux-gnu-ld
configure:3773: checking for ld
configure:3812: checking for i686-pc-linux-gnu-nm
configure:3845: checking for nm
configure:3884: checking for i686-pc-linux-gnu-ranlib
configure:3917: checking for ranlib
configure:3956: checking for i686-pc-linux-gnu-windres
configure:3989: checking for windres
configure:4056: checking whether to enable maintainer-specific portions of Makefiles
[root@localhost gcc-3.4.6]#

Can someone please tell me what I need to do to 'make' sucessfully

Old 04-05-2010, 02:04 PM   #2
LQ Newbie
Registered: Apr 2010
Posts: 13

Original Poster
Rep: Reputation: 0
by the way
my confisgure command is

#./configure --prefix=/tmp/gcccdp346
Old 04-06-2010, 08:32 AM   #3
Valery Reznic
ELF Statifier author
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Originally Posted by nikole View Post
by the way
my confisgure command is

#./configure --prefix=/tmp/gcccdp346
may be your /tmp is mounted with noexec option ?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot run C compiled programs efus Linux From Scratch 11 03-01-2012 02:52 PM
LFS 6.5 -- Binutils-2.19.1 - Pass 2 gives error: cannot run C compiled programs kamleshk1 Linux From Scratch 7 11-16-2010 09:57 AM
error: cannot run C compiled programs. terry.trent Linux - Newbie 6 08-06-2004 12:07 AM
why ./ is used to run C++ compiled programs legend1079 Red Hat 4 03-23-2004 07:32 AM
cannot run C compiled programs Astro Slackware 7 01-27-2004 11:32 PM > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 01:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration