Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[gcc] Cannot run C compiled programs (solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
_kal_
l33t
l33t


Joined: 04 Mar 2005
Posts: 602
Location: Paris

PostPosted: Sun Apr 16, 2006 9:45 am    Post subject: [gcc] Cannot run C compiled programs (solved) Reply with quote

Hi all,

I've just installed Gentoo on my AMD64 machine and i got an error when upgrading GCC:

Code:
Adding multilib support to Makefile in /var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/libstdc++-v3
multidirs=32
with_multisubdir=
Running configure in multilib subdirs 32
pwd: /var/tmp/portage/gcc-3.4.5/work/build/x86_64-pc-linux-gnu/libstdc++-v3
Running configure in multilib subdir 32
pwd: /var/tmp/portage/gcc-3.4.5/work/build/x86_64-pc-linux-gnu
mkdir 32
configure: creating cache ./config.cache
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for x86_64-pc-linux-gnu-gcc... /var/tmp/portage/gcc-3.4.5/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.5/work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include  -m32
checking for C compiler default output file name... a.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[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.5/work/build'
make: *** [profiledbootstrap] Error 2


By the way, i've checked this post :
https://forums.gentoo.org/viewtopic-t-297935.html?sid=52fad92a2fd25d36ae29ace2a5cb2cf9

But it didn't solved my problem.
1/ Multilib use flag is even filtered out
2/ With or without FEATURES="-sandbox", it doesn't help

Here is my emerge --info :
Code:
tony ~ # emerge --info
Portage 2.0.54 (default-linux/amd64/2006.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.15-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -pipe -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ "
LC_ALL="en_US.UTF-8"
LINGUAS="fr fr_FR"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://trumpetti.atm.tut.fi/gentoo-portage/"
USE="amd64 64bit 7zip X a52 aac acpi alsa apm atk audiofile avi bash-completion berkdb bidi bitmap-fonts bluetooth browserplugin bzip2 ccache cdda cddb cdio cdr cjk clearcase cpudetection crypt cups curl dbus dhcp directfb disablexmb divx4linux dts dvb dvd dvdr dvdread emul-linux-x86 encode ethereal fb fbcon ffmpeg firefox font-server fortran freetype gif glitz gnokii gnome gpm gstreamer gtk gtk2 hal howl httpd imagemagick imlib imlib2 ipv6 irc jabber java javascript jpeg kqemu libsamplerate libwww live lm_sensors mad mail matroska mikmod motif mozilla mozsvg mozxmlterm mp3 mpeg mplayer msn msnextras mythtv nas ncurses netbeans nfs nls nsplugin nvidia ogg oggvorbis opengl openssh openssl oss pam pdflib perforce perl png python qemu-fast qmail qt quicktime rdesktop samba screen sdl sensord shorten slp sms sndfile softmmu spell ssl stream stroke subversion svg tcpd tiff truetype truetype-fonts type1-fonts unicode userlocales utf8 v4l v4l2 vcd vim vim-pager vim-with-x visualization vorbis wifi wxwindows xine xml xml2 xmlrpc xmms xosd xprint xscreensaver xv xvid zeroconf zlib linguas_fr linguas_fr_FR userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LDFLAGS, PORTDIR_OVERLAY


Thank you in advance ;)


Last edited by _kal_ on Sun Apr 16, 2006 2:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Sun Apr 16, 2006 10:13 am    Post subject: Reply with quote

You may find this thread useful in diagnosing this class of errors.
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
_kal_
l33t
l33t


Joined: 04 Mar 2005
Posts: 602
Location: Paris

PostPosted: Sun Apr 16, 2006 10:18 am    Post subject: Reply with quote

"Cannot run C compiled programs" and "C compiler cannot create executables" is not the same error dude ;)

By the way, gonna try with
Code:

export CFLAGS="-march=athlon64 -pipe -O2"
Back to top
View user's profile Send private message
_kal_
l33t
l33t


Joined: 04 Mar 2005
Posts: 602
Location: Paris

PostPosted: Sun Apr 16, 2006 10:40 am    Post subject: Reply with quote

Still not work :twisted:

I'm seriously thinking about make a 32bit install on my AMD64 :/
Back to top
View user's profile Send private message
gtaluvit
Tux's lil' helper
Tux's lil' helper


Joined: 09 Aug 2003
Posts: 135
Location: Columbia, MD

PostPosted: Sun Apr 16, 2006 1:49 pm    Post subject: Reply with quote

Do you have IA32 emulation turned on in your kernel?
_________________
I'm out of bed and dressed, what more do you want?
Back to top
View user's profile Send private message
_kal_
l33t
l33t


Joined: 04 Mar 2005
Posts: 602
Location: Paris

PostPosted: Sun Apr 16, 2006 2:19 pm    Post subject: Reply with quote

gtaluvit wrote:
Do you have IA32 emulation turned on in your kernel?


Indeed, it was that!

Thank you all ;)
Back to top
View user's profile Send private message
smiff
n00b
n00b


Joined: 13 Jan 2005
Posts: 9

PostPosted: Mon Feb 12, 2007 8:36 pm    Post subject: Reply with quote

I have a similar problem however I have IA32 emulation turned on.
I need to emerge sandbox to do a simple update portage, but a can't get sandbox installed.

Code:
>>> Emerging (1 of 1) sys-apps/sandbox-1.2.17 to /
 * sandbox-1.2.17.tar.bz2 MD5 ;-) ...                                                                                                                          [ ok ]
 * sandbox-1.2.17.tar.bz2 RMD160 ;-) ...                                                                                                                       [ ok ]
 * sandbox-1.2.17.tar.bz2 SHA1 ;-) ...                                                                                                                         [ ok ]
 * sandbox-1.2.17.tar.bz2 SHA256 ;-) ...                                                                                                                       [ ok ]
 * sandbox-1.2.17.tar.bz2 size ;-) ...                                                                                                                         [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                           [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                          [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                         [ ok ]
 * checking sandbox-1.2.17.tar.bz2 ;-) ...                                                                                                                     [ ok ]
>>> Unpacking source...
>>> Unpacking sandbox-1.2.17.tar.bz2 to /var/tmp/portage/sandbox-1.2.17/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/sandbox-1.2.17/work/sandbox-1.2.17 ...
 * If configure fails with a 'cannot run C compiled programs' error, try this:
 * FEATURES=-sandbox emerge sandbox
 * Configuring sandbox for ABI=x86...
 * econf: updating sandbox-1.2.17/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating sandbox-1.2.17/config.sub with /usr/share/gnuconfig/config.sub
../sandbox-1.2.17//configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib32 --enable-multilib --build=i686-pc-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i686-pc-linux-gnu-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.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.

!!! Please attach the following file when filing a report to bugs.gentoo.org:
!!! /var/tmp/portage/sandbox-1.2.17/work/build-x86-x86_64-pc-linux-gnu/config.log

!!! ERROR: sys-apps/sandbox-1.2.17 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  sandbox-1.2.17.ebuild, line 84:   Called econf '--libdir=/usr/lib32' '--enable-multilib'
  ebuild.sh, line 540:   Called die

!!! econf failed
!!! If you need support, post the topmost build error, and the call stack if relevant.


I've tried to do the same configure command in a shell and configure didn't get any error.
I could install sandbox by hand but emerging portage will always try to merge sandbox anyway.. in other point of view, I want to get a stable and clean system.

Code:
gate sandbox-1.2.17 # ./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib32 --enable-multilib --build=i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i686-pc-linux-gnu-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) gawk
checking for readelf... readelf
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/x86_64-pc-linux-gnu/bin/ld
checking if the linker (/usr/x86_64-pc-linux-gnu/bin/ld) is GNU ld... yes
checking for /usr/x86_64-pc-linux-gnu/bin/ld option to reload object files... -r
checking for BSD-compatible nm... nm
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
(and so on successfully)
...
...


emerge --info

Code:
Portage 2.1.1 (default-linux/amd64/2006.1, gcc-3.4.6, glibc-2.3.6-r4, 2.6.12.5 x86_64)
=================================================================
System uname: 2.6.12.5 x86_64 AMD Opteron(tm) Processor 240
Gentoo Base System version 1.6.13
Last Sync: Mon, 12 Feb 2007 16:30:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS=""
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X X509 alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol cli cracklib crypt cups dlloader dri dv dvd elibc_glibc fb fbcon ftp gdbm gpm gtk gtk2 iconv input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 ipv6arpa isdnlog kernel_linux lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text libg++ lm_sensors midi mppe-mppc multipleip ncurses nls nptl nptlonly pam pcre perl ppds pppd python readline reflection session spl ssl tcpd udev unicode userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i810 video_cards_mga video_cards_neomagic video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo xorg zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


What am I doing wrong?

Thanks in advance
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum