Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 202811 - sys-apps/sandbox emerge fails when an incomplete i686 cross-compiiler is installed
Summary: sys-apps/sandbox emerge fails when an incomplete i686 cross-compiiler is inst...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
: 225167 255341 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-19 20:56 UTC by Vincent Legoll
Modified: 2009-03-10 06:00 UTC (History)
3 users (show)

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


Attachments
config.log file with error and infos (config.log,7.93 KB, text/plain)
2007-12-19 20:57 UTC, Vincent Legoll
Details
config.log (config.log,6.76 KB, text/plain)
2007-12-23 02:14 UTC, Tomasz Golinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Legoll 2007-12-19 20:56:14 UTC
When emerging sandbox (required for new portage version)
I think the wrong compiler is chosen:
/usr/x86_64-pc-linux-gnu/i686-pc-linux-gnu/gcc-bin/4.1.2/i686-pc-linux-gnu-gcc
which is a cross-compiler, instead of the system one:
/usr/x86_64-pc-linux-gnu/gcc-bin/4.2.2/x86_64-pc-linux-gnu-gcc

I'll attach the detailed error log:
/var/tmp/portage/sys-apps/sandbox-1.2.18.1-r2/work/build-x86-x86_64-pc-linux-gnu/config.log 


Reproducible: Always

Steps to Reproduce:
1. http://gentoo-wiki.com/HOWTO_Cross_Compile
   * install sys-devel/crossdev
   * crossdev -t i686-pc-linux-gnu
2. FEATURES=-sandbox emerge sandbox

I don't know for sure these steps reproduce the problem,
but that looks like a possible explanation for what happened
Actual Results:  
Calculating dependencies... done!
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) sys-apps/sandbox-1.2.18.1-r2 to /
 * sandbox-1.2.18.1.tar.bz2 RMD160 ;-) ...                                                                                                                                                                                             [ ok ]
 * sandbox-1.2.18.1.tar.bz2 SHA1 ;-) ...                                                                                                                                                                                               [ ok ]
 * sandbox-1.2.18.1.tar.bz2 SHA256 ;-) ...                                                                                                                                                                                             [ ok ]
 * sandbox-1.2.18.1.tar.bz2 size ;-) ...                                                                                                                                                                                               [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                                                                   [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                                                                                  [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                                                                                 [ ok ]
 * checking sandbox-1.2.18.1.tar.bz2 ;-) ...                                                                                                                                                                                           [ ok ]
>>> Unpacking source...
>>> Unpacking sandbox-1.2.18.1.tar.bz2 to /var/tmp/portage/sys-apps/sandbox-1.2.18.1-r2/work
 * Applying sandbox-1.2.18.1-open-normal-fail.patch ...                                                                                                                                                                                [ ok ]
 * Applying sandbox-1.2.18.1-open-cloexec.patch ...                                                                                                                                                                                    [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/sys-apps/sandbox-1.2.18.1-r2/work/sandbox-1.2.18.1 ...
 * 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.18.1/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating sandbox-1.2.18.1/config.sub with /usr/share/gnuconfig/config.sub
../sandbox-1.2.18.1//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... i686-pc-linux-gnu-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/sys-apps/sandbox-1.2.18.1-r2/work/build-x86-x86_64-pc-linux-gnu/config.log

!!! ERROR: sys-apps/sandbox-1.2.18.1-r2 failed.
Call stack:
  ebuild.sh, line 1638:   Called dyn_compile
  ebuild.sh, line 985:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  sandbox-1.2.18.1-r2.ebuild, line 87:   Called econf '--libdir=/usr/lib32' '--enable-multilib'
  ebuild.sh, line 586:   Called die

!!! econf failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/sys-apps/sandbox-1.2.18.1-r2/temp/build.log'.


Expected Results:  
sandbox emerging properly

Portage 2.1.2.12 (default-linux/amd64/2007.0, gcc-4.2.2, glibc-2.6.1-r0, 2.6.24-rc5-gda8cadb3-dirty x86_64)
=================================================================
System uname: 2.6.24-rc5-gda8cadb3-dirty x86_64 Intel(R) Core(TM)2 Quad CPU @ 2.40GHz
Gentoo Base System release 1.12.10
Timestamp of tree: Wed, 19 Dec 2007 19:16:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.3
dev-lang/python:     2.4.4-r7, 2.5.1-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-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/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer sfperms strict"
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/ http://ftp.club-internet.fr/pub/mirrors/gentoo http://gentoo.tiscali.nl/ http://gentoo.modulix.net/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/"
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 --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /home/vince/work/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 audiofile berkdb bitmap-fonts bzip2 cairo canon cddb cdr cli cracklib crypt daap dbus djvu dri dts dvb dvd dvdr dvdread dvi encode exif extrafilters ffmpeg flac fpx gdbm gif glitz gnome gphoto2 gpm graphviz gs gstreamer gtk guile hal iconv ieee1394 imagemagick imlib isdnlog java jbig jpeg jpeg2k kde lm_sensors logitech-mouse lzo mad midi mjpeg mmap mmx mng modplug mp3 mp4 mpeg mudflap musepack musicbrainz ncurses nfs nls noamazon nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png pppd pulseaudio python qt3 qt4 quicktime readline reflection rle samba session sndfile spl sse sse2 sse3 ssl svg tcpd theora tiff truetype truetype-fonts type1-fonts unicode v4l vcd vorbis wavpack wmf xcb xcomposite xine xml xorg xscreensaver xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter 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="evdev keyboard mouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="i810 fbdev v4l vesa vga dummy radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Vincent Legoll 2007-12-19 20:57:52 UTC
Created attachment 138911 [details]
config.log file with error and infos
Comment 2 Vincent Legoll 2007-12-19 21:10:36 UTC
As a workaround:

cd /usr/x86_64-pc-linux-gnu
mv i686-pc-linux-gnu i686-pc-linux-gnu-old
emerge sandbox
mv i686-pc-linux-gnu-old i686-pc-linux-gnu

has worked for me...
Comment 3 Arnold Krille 2007-12-20 16:13:02 UTC
I get the same error here without a special crosscompiler. Moving out all the /usr/bin/i686-* to a tmp-dir did get me going, but that can't be the solution...
Comment 4 Tomasz Golinski 2007-12-21 21:01:23 UTC
Same thing for me without any crosscompilators. Moving /usr/bin/i686-* to a tmp-dir also helped.

Got the same error while trying to emerge sandbox-1.2.20_alpha2-r1
Comment 5 SpanKY gentoo-dev 2007-12-22 07:31:53 UTC
it failed because you have an incomplete i686 toolchain.  you only have the C compiler, not glibc and the second stage compiler.  if you had a full proper toolchain installed, it'd actually work just fine.

try exporting CC=gcc before emerging sandbox.
Comment 6 Arnold Krille 2007-12-22 09:48:34 UTC
I am on amd64 with a fully 64bit system. It should not even think about any 32bit compilers!

And I am not using any (special) crosscompiling stuff. Only standard amd64 things are going on here.
Comment 7 SpanKY gentoo-dev 2007-12-22 10:50:14 UTC
that's an incorrect statement.  you're on an amd64 multilib system.  thus your system has both 32bit and 64bit pieces installed.

if you dont have an i686 cross-compiler installed, then why do you have any i686 binaries at all ?  what installed those things in /usr/bin/i686-* ?  do you have a /usr/i686-pc-linux-gnu directory ?
Comment 8 Arnold Krille 2007-12-22 12:28:18 UTC
Okay. But I didn't install any crosscompiling suite explicitely by hand like the original poster did. So I did not "want" to have the crosscompiler. And I don't want to mess with what compiler is the right one to use. Thats the task of the ebuild or configure-script or the systems profile. And something there is not working right if emerging sandbox (regardless which version) fails because it picks up the wrong compiler. And from my point of view I only have one compiler, everything else is imposed by the system and should thus be handled correctly by the system. I even un-installed all the old gcc versions because I didn't want to mess with that anymore.
Comment 9 SpanKY gentoo-dev 2007-12-23 01:07:09 UTC
stop giving long winded explanations about things that dont matter and answer the questions i posted please
Comment 10 Tomasz Golinski 2007-12-23 01:15:52 UTC
I was certain I did comment here with the answers. Weird. I'm reposting:

I do have: /usr/i686-pc-linux-gnu/lib with files:
libbfd-2.18.so  libbfd.so  libopcodes-2.18.so  libopcodes.so

installed by app-emulation/emul-linux-x86-baselibs-20071215

I also have in /usr/bin the files:
i686-pc-linux-gnu-c++       i686-pc-linux-gnu-g++       i686-pc-linux-gnu-gccbug    
i686-pc-linux-gnu-cc        i686-pc-linux-gnu-g77       i686-pc-linux-gnu-gcov      
i686-pc-linux-gnu-cpp       i686-pc-linux-gnu-gcc       i686-pc-linux-gnu-gfortran  

however equery b does not show any package as responsible for them.
Comment 11 SpanKY gentoo-dev 2007-12-23 01:40:15 UTC
did (do?) you have eselect-compiler / gcc-config-2 installed ?
Comment 12 Tomasz Golinski 2007-12-23 02:02:14 UTC
No, I have sys-devel/gcc-config-1.3.16 pointing to the only installed compiler 
[1] x86_64-pc-linux-gnu-4.1.2 *

Comment 13 Tomasz Golinski 2007-12-23 02:14:34 UTC
Created attachment 139154 [details]
config.log

My config.log - different since I had no cross-compiler.
Comment 14 SpanKY gentoo-dev 2007-12-23 04:17:53 UTC
your issue is different ... you have old i686 wrappers installed (probably by having eselect-compiler installed on your system)

simply delete the i686 binaries in /usr/bin/
Comment 15 Arnold Krille 2007-12-23 09:23:34 UTC
(In reply to comment #7)
>  what installed those things in /usr/bin/i686-* ?  do
> you have a /usr/i686-pc-linux-gnu directory ?

Sorry, I didn't see these questions...

The files /usr/bin/i686-* seem to belong to nobody (who left them there?),
"equery b /usr/i686-*" returns:

[ Searching for file(s) /usr/i686-pc-linux-gnu in *... ]
app-emulation/emul-linux-x86-baselibs-20071215 (/usr/i686-pc-linux-gnu)
Comment 16 SpanKY gentoo-dev 2007-12-24 10:45:15 UTC
you two have eselect-compiler problems.  delete the wrappers at /usr/bin/i686-*.
Comment 17 Vincent Legoll 2008-06-28 20:28:57 UTC
Hello again, this bug reoccurred with sandbox-1.2.18.1-r3

The proposed workaround of "export CC=gcc" did the trick

Regarding comment #5, no I don't have a "broken" or incomplete cross-compiler it has everything *I* need it to have and is working fine as-is.

The problem arise because sandbox wants to use that as my system compiler, if sandbox depends on a fully functional cross-compiler being setup, I think this requirement should be expressed as a dependency in the ebuild.
Comment 18 renean 2008-07-09 20:45:46 UTC
I stumbled over that problem too. I have a cross compiler configuration with i686-, powerpc- and my host is x86_64. After searching the config.log I found that the used i686 compiler did not know about the -march=core2 option so I upgraded it and that did the job.
But why does sandbox build 32 bit binaries at all. And how is it supposed to do that on systems which are multilib, but with no i686 gcc installed (there is no compiler in emul-linux-x86)?
Comment 19 SpanKY gentoo-dev 2008-11-08 14:38:37 UTC
*** Bug 225167 has been marked as a duplicate of this bug. ***
Comment 20 regomodo 2008-11-13 10:37:43 UTC
I too can confirm this bug. The following failed:
crossdev -t i686-pc-linux-gnu -s4 --without-headers --g 4.3.1

However, i686-pc-linux-gnu/gcc and i686-pc-linux-gnu/linux-headers were reorted as installed by portage. Emerging sandbox (for an emerge -e world) failed until i removed the the 2 packages mentioned previously.
Comment 21 SpanKY gentoo-dev 2008-11-16 13:05:57 UTC
please retest with sandbox-1.3.0
Comment 22 SpanKY gentoo-dev 2009-01-20 23:34:49 UTC
*** Bug 255341 has been marked as a duplicate of this bug. ***
Comment 23 Owen Mann 2009-01-21 03:18:19 UTC
Continuing from Bug 255341, I emerged using "CC=x86_64-pc-linux-gnu-gcc emerge sandbox", then updated portage to allow the new lzma patch format, then tried updating to unstable sandbox (1.3.2), and it worked! It found and used the correct compiler:

 * Configuring sandbox for ABI=x86...
 * econf: updating sandbox-1.3.2/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating sandbox-1.3.2/config.guess with /usr/share/gnuconfig/config.guess
../sandbox-1.3.2//configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib32 --build=x86_64-pc-linux-gnu
<snip>
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc

Thanks guys!
Comment 24 Wormo (RETIRED) gentoo-dev 2009-01-21 07:05:37 UTC
Owen, thanks for reporting back with your success. It sounds like sandbox 1.3 ebuilds have indeed resolved this problem of picking the wrong toolchain. 
Comment 25 SpanKY gentoo-dev 2009-02-20 23:21:43 UTC
should be fixed now

http://sources.gentoo.org/eclass/multilib.eclass?r1=1.71&r2=1.72
Comment 26 solar (RETIRED) gentoo-dev 2009-03-09 23:44:07 UTC
This bug breaks #261670 I think you need to restore the environment
Comment 27 SpanKY gentoo-dev 2009-03-10 06:00:25 UTC
new issue, new bug