Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 268811 - configure: error: cannot run C compiled programs
Summary: configure: error: cannot run C compiled programs
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-06 13:20 UTC by Cao Jin
Modified: 2009-05-07 00:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cao Jin 2009-05-06 13:20:11 UTC
I have 2 problem.
1.I want to compile software by myself through :configure, make ,make install,but when I configure,it promote:
configure: error: cannot run C compiled programs.
and I checked the config.log, something seems to be useful:
Thread model: posix
gcc version 4.1.2 (Gentoo 4.1.2 p1.1)
configure:1800: $? = 0
configure:1802: cc -V </dev/null >&5
gcc: '-V' option must have argument
configure:1805: $? = 1
configure:1828: checking for C compiler default output file name
configure:1831: cc conftest.c >&5
configure:1834: $? = 0
configure:1880: result: a.out
configure:1885: checking whether the C compiler works
configure:1891: ./a.out
../configure: line 1892: ./a.out: No such file or directory
configure:1894: $? = 127
configure:1903: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.

2.I compiled a simple program helloworld by :gcc hello.c -o hello.When I want to run it, it always promote:
$ ./hello
-bash: ./hello: No such file or directory
somebody says maybe it is gcc environment problem ,But I don`t know how to do with it.
here is my emerge --info:
Portage 2.1.6.11 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r6 i686)
=================================================================
System uname: Linux-2.6.25-gentoo-r6-i686-Intel-R-_Core-TM-2_Duo_CPU_T7250_@_2.00GHz-with-glibc2.0
Timestamp of tree: Tue, 28 Apr 2009 15:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.3-r4, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O3 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://gentoo.anheng.com.cn/gentoo http://mirror.averse.net/pub/gentoo/ http://61.135.158.199 http://ftp.isu.edu.tw/pub/Linux/Gentoo ftp://ftp.isu.edu.tw/pub/Linux/Gentoo http://ftp.twaren.net/Linux/Gentoo/ ftp://ftp.twaren.net/Linux/Gentoo/ http://ftp.ncnu.edu.tw/Linux/Gentoo/ ftp://ftp.ncnu.edu.tw/Linux/Gentoo/ http://ftp.cs.pu.edu.tw/Linux/Gentoo/ ftp://ftp.cs.pu.edu.tw/Linux/Gentoo/ http://gentoo.cs.nctu.edu.tw/gentoo/ ftp://gentoo.cs.nctu.edu.tw/gentoo/ "
LANG="en_US.utf8"
LDFLAGS=""
LINGUAS="zh zh_CN zh_TW"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://mirror.averse.net/gentoo-portage"
USE="X acl alsa berkdb cdr cjk cli cracklib crypt cups dri dvd fortran gdbm gpm gtk iconv ipv6 isdnlog kde midi mmx mudflap ncurses nls nptl nptlonly opengl openmp pam pcre pppd qt3 qt3support qt4 readline reflection session spl sse sse2 ssl tcpd truetype unicode utf8 x86 xorg zlib" ALSA_CARDS="ens1371" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh zh_CN zh_TW" USERLAND="GNU" VIDEO_CARDS="vesa vga vmware"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY



Reproducible: Always
Comment 1 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2009-05-06 14:34:32 UTC
Please read [1] before opening a bug - this is not a devrel bug.
From your summary, this isn't even a bug, but a support request. Please don't use bugzilla as a support medium. For that you can use the #gentoo IRC channel or one of the other #gentoo-* channels [2] in the freenode network, the Gentoo forums [3] or the Gentoo Mailing Lists [4]. I would suggest you start by reading [5].

 [1] - http://www.gentoo.org/doc/en/bugzilla-howto.xml
 [2] - http://www.gentoo.org/main/en/irc.xml
 [3] - http://forus.gentoo.org
 [4] - http://www.gentoo.org/main/en/lists.xml
 [5] . http://forums.gentoo.org/viewtopic-t-294109.html