Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sandbox emerge fails with "C compiler cannot ...." [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
met0d
n00b
n00b


Joined: 01 Aug 2006
Posts: 27

PostPosted: Tue Aug 01, 2006 1:07 pm    Post subject: Sandbox emerge fails with "C compiler cannot ...." Reply with quote

Sandbox emerge fails with the following error:

Code:

>>> Emerging (1 of 1) sys-apps/sandbox-1.2.17 to /
>>> checking ebuild checksums ;-)
>>> checking auxfile checksums ;-)
>>> checking miscfile checksums ;-)
>>> checking sandbox-1.2.17.tar.bz2 ;-)
>>> 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... configure: error: C compiler cannot create executables
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 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  sandbox-1.2.17.ebuild, line 87:   Called econf '--libdir=/usr/lib32' '--enable-multilib'
  ebuild.sh, line 541:   Called die

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


As you can see, it says "Configuring sandbox for ABI=x86..." and NOT amd64 which it should say. I've been looking in the ebuild file and tried to do some minor changes there but they are not reflected. I don't know why, I have changed ebuilds before and those changes were reflected.

Edit: I can make changes in the ebuild. These are the lines that might be the problem, we are not entering here:
Code:

setup_multilib() {
    if use amd64 && has_m32 && [[ ${CONF_MULTILIBDIR} == "lib32" ]]; then
      # setting up variables for amd64



I suspect the problem is that it's trying to build for x86 (32 bit) instead of amd64.

I will post my emerge --info and the config.log.

Code:

 # emerge --info
Portage 2.1-r1 (default-linux/amd64/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.17-gentoo-r4 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Gentoo Base System version 1.6.15
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     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.17
sys-devel/autoconf:  2.13, 2.59-r7
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-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="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
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="X a52 aac alsa amd64 avi bash-completion berkdb bitmap-fonts bluetooth browserplugin bzip2 cdr cli crypt cups curl directfb dlloader dri dvd dvdr dvdread eds emboss encode exif fbcon foomaticdb fortran ftp gif gnome gphoto2 gpm gstreamer gtk gtk2 icq idn ieee1394 imagemagick imap imlib ipv6 isdnlog java jikes jpeg lzw lzw-tiff mozilla mp3 mpeg msn ncurses nls nptl nsplugin opengl pam pcre pdf pdflib perl png pppd python qt3 qt4 quicktime readline reflection samba sdl session spell spl ssl tcpd tiff truetype-fonts type1-fonts unicode usb v4l wifi xmms xorg xpm xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU video_cards_nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY



config.log:
Code:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by sandbox configure 1.2.17, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ ../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

## --------- ##
## Platform. ##
## --------- ##

hostname = vanessa
uname -m = x86_64
uname -r = 2.6.17-gentoo-r4
uname -s = Linux
uname -v = #1 SMP PREEMPT Sun Jul 30 13:17:05 CEST 2006

/usr/bin/uname -p = AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
/bin/uname -X     = unknown

/bin/arch              = x86_64
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/lib/portage/bin
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /opt/bin
PATH: /usr/x86_64-pc-linux-gnu/gcc-bin/3.4.6
PATH: /opt/blackdown-jdk-1.4.1/bin
PATH: /opt/blackdown-jdk-1.4.1/jre/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1533: checking for a BSD-compatible install
configure:1588: result: /bin/install -c
configure:1599: checking whether build environment is sane
configure:1642: result: yes
configure:1707: checking for gawk
configure:1723: found /bin/gawk
configure:1733: result: gawk
configure:1743: checking whether make sets $(MAKE)
configure:1763: result: yes
configure:1942: checking for i686-pc-linux-gnu-gcc
configure:1971: result: no
configure:1980: checking for gcc
configure:1996: found /usr/bin/gcc
configure:2006: result: gcc
configure:2250: checking for C compiler version
configure:2253: gcc --version </dev/null >&5
gcc (GCC) 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2256: $? = 0
configure:2258: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/specs
Configured with: /var/tmp/portage/gcc-3.4.6-r1/work/gcc-3.4.6/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.6 --includedir=/usr/lib/g
cc/x86_64-pc-linux-gnu/3.4.6/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.6 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.6/man --inf
odir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.6/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/include/g++-v3 --host=x86_64-pc-linux-g
nu --build=x86_64-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-lib
unwind-exceptions --disable-multilib --disable-libgcj --enable-languages=c,c++,f77 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-cloc
ale=gnu
Thread model: posix
gcc version 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)
configure:2261: $? = 0
configure:2263: gcc -V </dev/null >&5
gcc: `-V' must come at the start of the command line
configure:2266: $? = 1
configure:2289: checking for C compiler default output file name
configure:2292: gcc -march=k8 -O2 -pipe   conftest.c  >&5
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/./libgcc.a when s
earching for -lgcc
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/libgcc.a when sea
rching for -lgcc
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/./libgcc.a when s
earching for -lgcc
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/libgcc.a when sea
rching for -lgcc
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status
configure:2295: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "sandbox"
| #define PACKAGE_TARNAME "sandbox"
| #define PACKAGE_VERSION "1.2.17"
| #define PACKAGE_STRING "sandbox 1.2.17"
| #define PACKAGE_BUGREPORT "sandbox@gentoo.org"
| #define PACKAGE "sandbox"
| #define VERSION "1.2.17"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2334: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-march=k8 -O2 -pipe'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=i686-pc-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=i686-pc-linux-gnu
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /var/tmp/portage/sandbox-1.2.17/work/sandbox-1.2.17/missing --run aclocal-1.9'
ALLOCA=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /var/tmp/portage/sandbox-1.2.17/work/sandbox-1.2.17/missing --run tar'
AR=''
AUTOCONF='${SHELL} /var/tmp/portage/sandbox-1.2.17/work/sandbox-1.2.17/missing --run autoconf'
AUTOHEADER='${SHELL} /var/tmp/portage/sandbox-1.2.17/work/sandbox-1.2.17/missing --run autoheader'
AUTOMAKE='${SHELL} /var/tmp/portage/sandbox-1.2.17/work/sandbox-1.2.17/missing --run automake-1.9'
AWK='gawk'
CC='gcc'
CCDEPMODE=''
CFLAGS='-march=k8 -O2 -pipe'
CPP=''
CPPFLAGS=''
CXXCPP=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
HAVE_RTLD_NEXT_FALSE=''
HAVE_RTLD_NEXT_TRUE=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LDFLAGS=''
LIBC_PATH=''
LIBDL=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /var/tmp/portage/sandbox-1.2.17/work/sandbox-1.2.17/missing --run makeinfo'
OBJEXT=''
PACKAGE='sandbox'
PACKAGE_BUGREPORT='sandbox@gentoo.org'
PACKAGE_NAME='sandbox'
PACKAGE_STRING='sandbox 1.2.17'
PACKAGE_TARNAME='sandbox'
PACKAGE_VERSION='1.2.17'
PATH_SEPARATOR=':'
RANLIB=''
READELF=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='1.2.17'
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_RANLIB=''
ac_ct_STRIP=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias='i686-pc-linux-gnu'
build_cpu=''
build_os=''
build_vendor=''
datadir='/usr/share'
exec_prefix='NONE'
host='i686-pc-linux-gnu'
host_alias='i686-pc-linux-gnu'
host_cpu=''
host_os=''
host_vendor=''
includedir='${prefix}/include'
infodir='/usr/share/info'
install_sh='/var/tmp/portage/sandbox-1.2.17/work/sandbox-1.2.17/install-sh'
libdir='/usr/lib32'
libexecdir='${exec_prefix}/libexec'
localstatedir='/var/lib'
mandir='/usr/share/man'
mkdir_p='mkdir -p --'
oldincludedir='/usr/include'
prefix='/usr'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE "sandbox"
#define PACKAGE_BUGREPORT "sandbox@gentoo.org"
#define PACKAGE_NAME "sandbox"
#define PACKAGE_STRING "sandbox 1.2.17"
#define PACKAGE_TARNAME "sandbox"
#define PACKAGE_VERSION "1.2.17"
#define VERSION "1.2.17"

configure: exit 77


Sorry for the large post, if anyone have a clue, please let me know.

Thank you


Last edited by met0d on Wed Aug 02, 2006 1:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
met0d
n00b
n00b


Joined: 01 Aug 2006
Posts: 27

PostPosted: Tue Aug 01, 2006 3:02 pm    Post subject: Reply with quote

Could someone please post the result of:
Code:
#echo $CONF_MULTILIBDIR


Mine is empty and I guess that's were my problem lie. I suspect it should be "lib32".

Cheers.
Back to top
View user's profile Send private message
hkfczrqj
n00b
n00b


Joined: 14 Dec 2004
Posts: 43
Location: Rochester, MN

PostPosted: Tue Aug 01, 2006 3:28 pm    Post subject: Reply with quote

met0d wrote:
Could someone please post the result of:
Code:
#echo $CONF_MULTILIBDIR


Mine is empty and I guess that's were my problem lie. I suspect it should be "lib32".

Cheers.


Well, I have a similar problem with sandbox (I think it's not quite the same), and I cannot run 32 bit programs, much less recompile the toolchain. Coincidentally, now that you mention this, my $CONF_MULTILIBDIR is empty too!

I'll reply to another thread where a similar problem was discussed. I'll get back to you if I find something.

Cheers
Back to top
View user's profile Send private message
s.j.o
n00b
n00b


Joined: 03 May 2006
Posts: 8

PostPosted: Tue Aug 01, 2006 5:08 pm    Post subject: Reply with quote

Code:

~ $ echo $CONF_MULTILIBDIR


Mine is also empty. I would probably have to check during the actual build, as I suspect it's probably not set unless portage is running.

Have you tried doing as per the warning?
Code:

 * If configure fails with a 'cannot run C compiled programs' error, try this:
 * FEATURES=-sandbox emerge sandbox

sandbox emerged for me without a hitch, and I get the same "x86" line:
Code:

 * Configuring sandbox for ABI=x86...
 * econf: updating sandbox-1.2.17/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating sandbox-1.2.17/config.guess with /usr/share/gnuconfig/config.guess


After looking a little closer, this seems to be why you can't compile:
Code:

...
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/libgcc.a when searching for -lgcc
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status


I have these files:
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.1.1/libgcc.a
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.1.1/32/libgcc.a

Do those files exist on your system?
If it's setting up for x86, shouldn't the path be something like /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/32/?

There was also this:
Code:

configure:2263: gcc -V </dev/null >&5
gcc: `-V' must come at the start of the command line
configure:2266: $? = 1

As far as I know, the "-V" option is for invoking a particular version of gcc -- but there's no argument there! Maybe these two errors point to a common problem. Not sure what that would be, though.
Best guess is that a variable to hold the gcc version is empty? And then it flubs like the above.

If the FEATURES=-sandbox thing doesn't work, try posting the output of gcc-config -l and ls -l /etc/make.profile
Back to top
View user's profile Send private message
met0d
n00b
n00b


Joined: 01 Aug 2006
Posts: 27

PostPosted: Tue Aug 01, 2006 8:39 pm    Post subject: Reply with quote

s.j.o wrote:

Code:

~ $ echo $CONF_MULTILIBDIR


Mine is also empty. I would probably have to check during the actual build, as I suspect it's probably not set unless portage is
running.


Could be true, but I've read the ebuild script all day and it doesn't set CONF_MULTILIBDIR in there, so I though it would be set
when using multilib, as the current default-linux amd64 profile is from default now. The if statement from the ebuild I pasted before
is failing because the CONF_MULTILIBDIR does not equal "/usr/lib32".

s.j.o wrote:

Have you tried doing as per the warning?
Code:

 * If configure fails with a 'cannot run C compiled programs' error, try this:
 * FEATURES=-sandbox emerge sandbox



Yes, I've tried it, no success. The err msg is also different from what I'm getting.

s.j.o wrote:

sandbox emerged for me without a hitch, and I get the same "x86" line:
Code:

 * Configuring sandbox for ABI=x86...
 * econf: updating sandbox-1.2.17/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating sandbox-1.2.17/config.guess with /usr/share/gnuconfig/config.guess


After looking a little closer, this seems to be why you can't compile:
Code:

...
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/libgcc.a when searching for -lgcc

/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status


I have these files:
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.1.1/libgcc.a
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.1.1/32/libgcc.a

Do those files exist on your system?
If it's setting up for x86, shouldn't the path be something like /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/32/?


I have the first of them, I do not have the ../32/libgcc.a file. On my system, /usr/lib is a symlink to /usr/lib64. In
/usr/lib32, the gcc directory is "missing", I dont know if it should be there.

When setting up for x86, the path should rather be /usr/lib32/gcc/... but since I'm missing the gcc directory there, I'm not sure.

s.j.o wrote:

There was also this:
Code:

configure:2263: gcc -V </dev/null >&5
gcc: `-V' must come at the start of the command line
configure:2266: $? = 1

As far as I know, the "-V" option is for invoking a particular version of gcc -- but there's no argument there! Maybe these
two errors point to a common problem. Not sure what that would be, though.
Best guess is that a variable to hold the gcc version is empty? And then it flubs like the above.

If the FEATURES=-sandbox thing doesn't work, try posting the output of gcc-config -l and ls -l /etc/make.profile

As for the -V flag, Im not sure, to be honest, I didnt see that before. I have used gcc-config and binutils-config to set the
environment and they seem to work.

Code:

 # gcc-config -c
x86_64-pc-linux-gnu-3.4.6


Code:

# binutils-config -c   
x86_64-pc-linux-gnu-2.16.1


Code:

# ls -l /etc/make.profile
lrwxrwxrwx 1 root root 48 Aug  1 13:39 /etc/make.profile -> /usr/portage/profiles/default-linux/amd64/2006.0


The environment variables:
Code:

# export
declare -x CLASSPATH="."
declare -x CONFIG_PROTECT="/usr/share/X11/xkb"
declare -x CONFIG_PROTECT_MASK="/etc/java-config/vms/ /etc/env.d/java/ /etc/terminfo /etc/revdep-rebuild"
declare -x CVS_RSH="ssh"
declare -x EDITOR="/usr/bin/vim"
declare -x GCC_SPECS=""
declare -x HOME="/root"
declare -x HOSTNAME="vanessa"
declare -x INFOPATH="/usr/share/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.16.1/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/
3.4.6/info"

declare -x JAVAC="/opt/blackdown-jdk-1.4.1/bin/javac"
declare -x JAVA_HOME="/opt/blackdown-jdk-1.4.1"
declare -x JDK_HOME="/opt/blackdown-jdk-1.4.1"
declare -x LESS="-R -M --shift 5"
declare -x LESSOPEN="|lesspipe.sh %s"
declare -x LOGNAME="root"
declare -x MAIL="/var/mail/root"
declare -x MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.16.1/man:/usr/share/gcc-data/
x86_64-pc-linux-gnu/3.4.6/man:/opt/blackdown-jdk-1.4.1/man:/etc/java-config/system-vm/man/"

declare -x OLDPWD
declare -x OPENGL_PROFILE="xorg-x11"
declare -x PAGER="/usr/bin/less"
declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.6:/opt/
blackdown-jdk-1.4.1/bin:/opt/blackdown-jdk-1.4.1/jre/bin"

declare -x PWD="/root"
declare -x PYTHONPATH="/usr/lib/portage/pym"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_CLIENT="192.168.1.5 2875 22"
declare -x SSH_CONNECTION="192.168.1.5 2875 192.168.1.3 22"
declare -x SSH_TTY="/dev/pts/0"
declare -x TERM="screen"
declare -x USER="root"



Please let me know if anyone might have a solution, thank you.
Back to top
View user's profile Send private message
met0d
n00b
n00b


Joined: 01 Aug 2006
Posts: 27

PostPosted: Wed Aug 02, 2006 1:39 pm    Post subject: Reply with quote

SOLVED.

Everything seems to work now, it's only bad that I don't know why. ;)

I tried a billion things, the last resort was actually to write on the forum. Anyway, I suspect it had to do with -e flag for emerge. As I probably wrote in the first post, I had used the x86 32-bit profile to compile large parts of my system instead of the amd64 profile.

I began step-by-step to emerge things like portage and gcc with the -e flag. Now it works.


Thank you everyone that helped me.
Back to top
View user's profile Send private message
s.j.o
n00b
n00b


Joined: 03 May 2006
Posts: 8

PostPosted: Fri Aug 04, 2006 2:48 am    Post subject: Reply with quote

Glad you got things running!
Back to top
View user's profile Send private message
salac
n00b
n00b


Joined: 02 Jun 2004
Posts: 18

PostPosted: Thu Aug 10, 2006 11:43 am    Post subject: Reply with quote

I have the same problem.

When im trying to compile packages which ar doing C compiler checking i constantly get this error:


Code:
checking whether the C compiler works... configure: error: cannot run C compiled programs.


So i cannot compile grub, sandbox ( I tried FEATURES=-sandbox emerge sandbox' ) and many others.

How did u solve ur problem met0d?

I used amd64 minimal boot disk and stage1-amd64, so im pretty sure that im not messed with 32-bit compilation at all.


tnx in advance
Back to top
View user's profile Send private message
met0d
n00b
n00b


Joined: 01 Aug 2006
Posts: 27

PostPosted: Thu Aug 10, 2006 11:49 am    Post subject: Reply with quote

salac wrote:
I have the same problem.

When im trying to compile packages which ar doing C compiler checking i constantly get this error:


Code:
checking whether the C compiler works... configure: error: cannot run C compiled programs.


So i cannot compile grub, sandbox ( I tried FEATURES=-sandbox emerge sandbox' ) and many others.

How did u solve ur problem met0d?

I used amd64 minimal boot disk and stage1-amd64, so im pretty sure that im not messed with 32-bit compilation at all.


tnx in advance


First, check for sure you are using the right profile with emerge --info. Then try to emerge -e portage, emerge -e glibc, emerge -e gcc.

See man emerge and specifically the -e flag for more information, I hope you solve it.
Back to top
View user's profile Send private message
salac
n00b
n00b


Joined: 02 Jun 2004
Posts: 18

PostPosted: Thu Aug 10, 2006 12:17 pm    Post subject: Reply with quote

Looks like mine profile is set just fine :

Quote:
# emerge --info
Portage 2.1-r1 (default-linux/amd64/2006.0, gcc-3.4.6/amd64-vanilla, glibc-2.3.6
-r4, 2.6.16-gentoo-r12 x86_64)
=================================================================
System uname: 2.6.16-gentoo-r12 x86_64 Intel(R) Xeon(TM) CPU 3.00GHz
Gentoo Base System version 1.6.15
ccache version 2.3 [enabled]
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-lang/python: 2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache: 2.3
dev-util/confcache: [Not Present]
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.59-r7
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
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 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-reb
uild /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=nocona -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sfperms strict"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://gento
o.inode.at/source/ http://ftp.linux.ee/pub/gentoo/distfiles/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/d
istfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 alsa apache2 avi berkdb bitmap-fonts cli crypt cups dba dlloader dri
eds emboss encode foomaticdb fortran gif gnome gpm gstreamer gtk gtk2 imlib ipv6
isdnlog jpeg jpg kde lzw lzw-tiff mp3 mpeg ncurses nls nptl nptlonly opengl ope
nssl pam pcre pdflib perl php png pppd python qt qt3 qt4 quicktime readline refl
ection sdl session spell spl ssl tcpd tiff truetype-fonts type1-fonts usb xorg x
pm xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_
evdev kernel_linux userland_GNU"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGU
AS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


I will now try to do emerge -e portage, emerge -e glibc, emerge -e gcc.

Btw I tried to install new 64-bit gentoo on 2 Intel emt64 servers and this happend in both cases :/
Back to top
View user's profile Send private message
forbjok
Apprentice
Apprentice


Joined: 21 May 2004
Posts: 207
Location: Hordaland, Norge

PostPosted: Mon Sep 04, 2006 9:12 pm    Post subject: Reply with quote

Hi.

I'm getting this error on one of my AMD64 boxes. (haven't started upgrading the other one yet, and probably won't until i find out how to fix this)
I've already upgraded 2 32-bit x86 boxes to GCC 4.1.1 and glibc 2.4 after the release of 2006.1, without any problems, but on the first 64-bit Athlon box I try, "emerge -e system" chokes on Sanbox, failing with "C compiler cannot create executables". Based on that, I guess this is an AMD64-specific issue.

This is an actual AMD Athlon64 box, and not an Intel EM64T "x86-64" compatible, and it is running a 64-bit Gentoo system.

I've tried to re-emerge it seperately with "emerge --oneshot sandbox", but that results in the same error. Also, I've checked the compiler, and there does not seem to be anything wrong with it - even running
Code:

$ ./configure
$ make

manually in the work folder of sandbox actually seems to compile it fine without errors - though I'd rather not install it that way.

I've now run "emerge -e gcc", and am about half-way through "emerge -e portage" (currently at re-compiling GCC yet another time), and sandbox still fails with the same error.

Did anyone actually find an exact solution to this?
Back to top
View user's profile Send private message
elvanor
Developer
Developer


Joined: 11 Oct 2004
Posts: 178
Location: France

PostPosted: Tue Sep 05, 2006 5:39 pm    Post subject: Reply with quote

I had the same exact problem as you, forbjok. I have made a separate post at http://forums.gentoo.org/viewtopic-t-495587.html where I discuss the issue, have a look. Essentially you should maybe remove or delete some versions of gcc in /usr/bin.
Back to top
View user's profile Send private message
balarsen
n00b
n00b


Joined: 10 Jul 2005
Posts: 12
Location: Bozeman, MT USA

PostPosted: Wed Sep 06, 2006 6:16 pm    Post subject: Reply with quote

All, interesting enough I had the same symptoms but none of the fixes worked. Turns out it was a mistake in my kernel config. I figure I will post this here to help out any others.

My machine is a Dell PowerEdge 850 with a pentium-D processor. This is a 64-bit processor w/o hyperthreading. I had the error

Quote:

Code:
checking whether the C compiler works... configure: error: cannot run C compiled programs.


And the fix was in the kernel config
Code:

Excutable file formats / Emulations --->
   [*] Kernel support for ELF binaries
   < > Kernel support for MISC binaries
   [*] IA32 Emulation
   <*>   IA32 a.out support


I did not have the
Code:
[*] IA32 Emulation
   <*>   IA32 a.out support


compiled in, which won't allow the 64 bit machine to run 32 bit code natively. Which is why the sandbox (and gcc) would not compile correcly with
Code:
emerge -e system
Back to top
View user's profile Send private message
elvanor
Developer
Developer


Joined: 11 Oct 2004
Posts: 178
Location: France

PostPosted: Wed Sep 06, 2006 7:03 pm    Post subject: Reply with quote

Interesting. I do have the IA32 emulation support enabled in my kernel, but not the a.out support. You can probably remove this one and it should work, too.
Back to top
View user's profile Send private message
digitaldavid
n00b
n00b


Joined: 20 Jul 2005
Posts: 6
Location: Hampshire, Uk

PostPosted: Thu Sep 07, 2006 2:49 pm    Post subject: Reply with quote

elvanor wrote:
I had the same exact problem as you, forbjok. I have made a separate post at http://forums.gentoo.org/viewtopic-t-495587.html where I discuss the issue, have a look. Essentially you should maybe remove or delete some versions of gcc in /usr/bin.


I too have been having problems trying to compile gcc and sandbox since I upgraded to gcc-4.1.1. I still haven't fixed it yet but I'm going to try your suggestions when I get the chance.

However, I would like to ask whether you know the answer to the question posed dusik in that link
Quote:
So are /usr/bin/i686-pc-linux-gnu-gcc* orphaned files from previous GCC versions?
as I too am worried about deleting stuff and am a complete noob when it comes the internals of the emerge system.
_________________
I often talk absolute rubbish with absolute certainty
Back to top
View user's profile Send private message
balarsen
n00b
n00b


Joined: 10 Jul 2005
Posts: 12
Location: Bozeman, MT USA

PostPosted: Thu Sep 07, 2006 2:59 pm    Post subject: Reply with quote

Quote:
So are /usr/bin/i686-pc-linux-gnu-gcc* orphaned files from previous GCC versions?

I am far from an expert here but my system is a clean install. Just got the system two days ago and I do not have any
Code:
 /usr/bin/i686-pc-linux-gnu-gcc*
files at all. All of mine are
Code:
/usr/bin/x86_64-pc-linux-gnu-gcc*
Back to top
View user's profile Send private message
digitaldavid
n00b
n00b


Joined: 20 Jul 2005
Posts: 6
Location: Hampshire, Uk

PostPosted: Thu Sep 07, 2006 4:24 pm    Post subject: Reply with quote

Thanks balarsen.

Couple of questions.

Do you have any i686* files in /usr/bin?

Is your system is multilib?

My system has been upgraded from 2004.0 eventually to 2006.1 so I wonder how much cruft it has accumulated along the way. (The multilib stuff seems super confusing so I worry about breaking it! Trouble is my system is semi-broken now anyway :( )
_________________
I often talk absolute rubbish with absolute certainty
Back to top
View user's profile Send private message
balarsen
n00b
n00b


Joined: 10 Jul 2005
Posts: 12
Location: Bozeman, MT USA

PostPosted: Thu Sep 07, 2006 4:34 pm    Post subject: Reply with quote

Quote:
Do you have any i686* files in /usr/bin?

No
Code:
> ls /usr/bin/*i686*
ls: No match.


Quote:
Is your system is multilib?

At the risk of sounding really dumb I will admit I'm not sure I know what this means in those words. Yes I can run 32-bit i686 binaries if that is what you mean. :oops:

I can post any relevant files you want to see.
Back to top
View user's profile Send private message
digitaldavid
n00b
n00b


Joined: 20 Jul 2005
Posts: 6
Location: Hampshire, Uk

PostPosted: Fri Sep 08, 2006 8:46 am    Post subject: Reply with quote

Thanks, your answers are fine.

BTW. my understanding of multilib is about the same level as yours :oops: but the dual ability to run 32/64 bit apps is what I meant. I belive this is the default for 64 bit systems now. I think you have to make a special effort to get 64 bit only with 2006.1
_________________
I often talk absolute rubbish with absolute certainty
Back to top
View user's profile Send private message
Mark Knecht
n00b
n00b


Joined: 16 Sep 2003
Posts: 63

PostPosted: Sun Sep 10, 2006 1:08 am    Post subject: Reply with quote

digitaldavid wrote:
Thanks, your answers are fine.

BTW. my understanding of multilib is about the same level as yours :oops: but the dual ability to run 32/64 bit apps is what I meant. I belive this is the default for 64 bit systems now. I think you have to make a special effort to get 64 bit only with 2006.1


I ran into this problem today. Thanks to all of you and your posts here I got it fixed by moving the /usr/bin/i686 gcc files to a remote directory. I also have the IA32 support in my kernel. I did not have to turn that off to get sandbox to emerge.

Hope this helps,
Mark
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