Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143205 - old gcc-config wrapper segfaults with basic flags ($CHOST-cc)
Summary: old gcc-config wrapper segfaults with basic flags ($CHOST-cc)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Paul de Vrieze (RETIRED)
URL:
Whiteboard:
Keywords:
: 144614 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-08-08 06:29 UTC by jieryn
Modified: 2022-09-22 22:20 UTC (History)
6 users (show)

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


Attachments
emerge --info (einfo,7.02 KB, text/plain)
2006-08-08 06:32 UTC, jieryn
Details
config.log (config.log,13.97 KB, text/plain)
2006-08-08 06:32 UTC, jieryn
Details
emerge --info (binutils-2.16.1-r3) (einfo,6.97 KB, text/plain)
2006-08-08 08:00 UTC, jieryn
Details
config.log (binutils-2.16.1-r3) (config.log,13.97 KB, text/plain)
2006-08-08 08:00 UTC, jieryn
Details
config.log (config.log,13.79 KB, text/plain)
2006-08-08 08:26 UTC, Alex Tarkovsky
Details
config.log (config.log,13.81 KB, text/plain)
2006-08-08 23:07 UTC, Alex Tarkovsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jieryn 2006-08-08 06:29:20 UTC
checking for sh... sh
checking for sh... /bin/sh
checking for x86_64-pc-linux-gnu-strip... x86_64-pc-linux-gnu-strip
checking for x86_64-pc-linux-gnu-strip... /usr/bin/x86_64-pc-linux-gnu-strip
checking for a BSD-compatible install... /bin/install -c
checking for x86_64-pc-linux-gnu-cc... x86_64-pc-linux-gnu-cc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

!!! ERROR: sys-libs/db-4.3.29-r2 failed.
Call stack:
  ebuild.sh, line 1543:   Called dyn_compile
  ebuild.sh, line 938:   Called src_compile
  db-4.3.29-r2.ebuild, line 109:   Called die

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

!!! When you file a bug report, please include the following information:
GENTOO_VM=blackdown-jdk-1.4.2  CLASSPATH="" JAVA_HOME="/opt/blackdown-jdk-1.4.2.03"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER=""
Comment 1 jieryn 2006-08-08 06:32:03 UTC
Created attachment 93748 [details]
emerge --info
Comment 2 jieryn 2006-08-08 06:32:17 UTC
Created attachment 93749 [details]
config.log
Comment 3 jieryn 2006-08-08 06:40:05 UTC
Also of interest is that this exact same configuration has compiled all the rest of 'system' target without any issues. GCC can in fact create executables, it is doing a fantastic job for other packages..  :-/
Comment 4 Paul de Vrieze (RETIRED) gentoo-dev 2006-08-08 07:33:48 UTC
The only thing I see is that some way it doesn't like --default-symver. Could you try to rebuild your binutils?
Comment 5 jieryn 2006-08-08 08:00:15 UTC
Created attachment 93757 [details]
emerge --info (binutils-2.16.1-r3)
Comment 6 jieryn 2006-08-08 08:00:36 UTC
Created attachment 93758 [details]
config.log (binutils-2.16.1-r3)
Comment 7 jieryn 2006-08-08 08:01:24 UTC
Recompiling binutils-2.17 had the same result. I tried moving down to the last stable AMD64 release, binutils-2.16.1-r3, but this had no noticeable change in sys-libs/db result.
Comment 8 Alex Tarkovsky 2006-08-08 08:26:02 UTC
Created attachment 93759 [details]
config.log

I've been having the problem too, not just with db but with some apps that depend on db. I've tried db versions 4.3.27, 4.3.29, and 4.3.29-r2; binutils versions 2.16.1-r3 and 2.17, and gcc versions 3.4.5 and 3.4.6, all with identical results.

Running the command "i686-pc-linux-gnu-cc -dumpversion" manually produces a segfault, same as during configure (see attached config.log).

-----------------------------------------------------------------------

Gentoo Base System version 1.12.4
Portage 2.1.1_pre4-r4 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-gentoo-r9 i686)
=================================================================
System uname: 2.6.16-gentoo-r9 i686 AMD Athlon(tm) XP 3200+
Last Sync: Mon, 07 Aug 2006 05:30:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r2
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
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.17
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -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/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distcc distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo                 http://mirror.datapipe.net/gentoo                 http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LINGUAS="en"
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"
PORTDIR_OVERLAY="/usr/local/overlays/portage /usr/portage/local/layman/sunrise"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X X509 a52 aac acl aio alsa amr aotuv apache2 apm artworkextra asf audiofile avahi avalon avi bash-completion berkdb bitmap-fonts bonobo bookmarks branding browserplugin bzip2 cairo caps ccache cdb cdda cddb cdparanoia cdr cdrom chardet chm chroot cli corba cpudetection crypt cscope css curl custom-cflags daap dbus djvu dlloader dri dts dv dvd dvdr dvdread dvi dxr3 dynagraph effects elibc_glibc emf enca encode esd exif expat faad fam fame ffmpeg fftw firefox flac flash fontconfig fortran fpx ft gd gdbm gecko-sdk gif glibc-omitfp glitz glut gmp gnome gnutls gphoto2 gpm graphviz gs gstreamer gtk gtk2 gtkhtml hal howl-compat hpn icu ieee1394 imagemagick imlib inkjar input_devices_keyboard input_devices_mouse ipod ipv6 isdnlog java javascript jbig jce jit jpeg jpeg2k junit kdgraphics kernel_linux lcms libg++ libgda libwww linguas_en live logitech-mouse logrotate lzo mad mailwrapper mbox md5sum mikmod mjpeg mmx mmxext mng mod modplug mono mozdevelop moznocompose moznoirc moznomail moznoroaming mozsvg mp3 mp4 mpeg mplayer multislot multitarget musepack mysql nautilus ncurses network nls nntp no-old-linux nodrm nptl nptlonly nsplugin nvidia odbc offensive ogg openal opengl oss pam pam_chroot pam_console pam_timestamp pcre pdf perl plotutils plugin png pppd python qt3 quicktime rar readline real reflection rtsp sasl scanner screen sdl session sftplogging shout sid skins smime sndfile socks5 spell spl sqlite srvdir sse ssl stream subtitles svg symlink t1lib tcpd theora threads tiff transcode truetype truetype-fonts type1-fonts udev unicode usb userland_GNU userlocales utf8 v4l v4l2 vcd video_cards_nvidia vim-pager vim-with-x vlm vorbis win32codecs wma wmf wxwindows x264 xine xml xmms xorg xosd xpm xv xvid xvmc yv12 zip zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 9 Paul de Vrieze (RETIRED) gentoo-dev 2006-08-08 11:54:51 UTC
If "i686-pc-linux-gnu-cc -dumpversion" dies with a segfault something is seriously broken. This is a simple command that just returns a machine readable verion string for the compiler. Your compiler is probably broken. You might first want to try a new gcc-config though.

ps jieryn, would you mind next time to put the emerge info just inline in the comment. That makes it easier to find.
Comment 10 SpanKY gentoo-dev 2006-08-08 17:58:45 UTC
something is seriously screwed then, has nothing to do with sys-libs/db

try running like:
gcc -dumpversion
i686-pc-linux-gnu-gcc -dumpversion
x86_64-pc-linux-gnu-gcc -dumpversion
env -i gcc -dumpversion
env -i i686-pc-linux-gnu-gcc -dumpversion
env -i x86_64-pc-linux-gnu-gcc -dumpversion
Comment 11 Alex Tarkovsky 2006-08-08 21:37:40 UTC
If it has nothing to do with db, why do I only get this error when compiling db or apps that bundle db? I've compiled several dozen packages per week since this problem started ~2 months ago and I haven't had a single segfault with anything non-db related.

Here's the output you requested (my Athlon is 32 bit):

devbox ~ # gcc -dumpversion
3.4.6
devbox ~ # i686-pc-linux-gnu-gcc -dumpversion
3.4.6
devbox ~ # x86_64-pc-linux-gnu-gcc -dumpversion
-su: x86_64-pc-linux-gnu-gcc: command not found
devbox ~ # env -i gcc -dumpversion
3.4.6
devbox ~ # env -i i686-pc-linux-gnu-gcc -dumpversion
3.4.6
devbox ~ # env -i x86_64-pc-linux-gnu-gcc -dumpversion
env: x86_64-pc-linux-gnu-gcc: No such file or directory
Comment 12 Alex Tarkovsky 2006-08-08 21:48:43 UTC
Hm, shouldn't /usr/bin/i686-pc-linux-gnu-cc be a symlink to /usr/bin/i686-pc-linux-gnu-gcc, or at the very least be two identical binaries of the same size and mtime like /usr/bin/cc and /usr/bin/gcc? I'm showing two different binaries:

devbox ~ # ls -al /usr/bin/i686-pc-linux-gnu-*cc
-rwxr-xr-x 1 root root 15396 2006-05-18 06:03 /usr/bin/i686-pc-linux-gnu-cc
-rwxr-xr-x 1 root root  8848 2006-08-08 08:56 /usr/bin/i686-pc-linux-gnu-gcc
Comment 13 Alex Tarkovsky 2006-08-08 21:52:41 UTC
Argh, and every single symlink in /usr/bin installed by binutils and gcc is mode 777. Wtf...
Comment 14 SpanKY gentoo-dev 2006-08-08 22:32:06 UTC
jieryn's description made it sound like he was having problems with other packages

post the output of `emerge db -pv`
Comment 15 SpanKY gentoo-dev 2006-08-08 22:46:13 UTC
you guys shouldnt have a -cc binary, delete it

rm -f /usr/bin/x86_64-pc-linux-gnu-cc
rm -f /usr/bin/i686-pc-linux-gnu-cc
Comment 16 SpanKY gentoo-dev 2006-08-08 22:50:32 UTC
so like i said, not specific to sys-libs/db, you just happen to be seeing it with this package

my guess is an older gcc-config created that binary and when gcc-configs stopped creating it, you were left with it orphaned
Comment 17 Alex Tarkovsky 2006-08-08 23:07:01 UTC
Created attachment 93821 [details]
config.log

On a hunch, I replaced /usr/bin/i686-pc-linux-gnu-cc with a copy of /usr/bin/i686-pc-linux-gnu-gcc and db complains that i686-pc-linux-gnu-cc is missing despite the fact that the file is clearly there and has the proper owner and permissions. So I removed /usr/bin/i686-pc-linux-gnu-cc altogether and db still won't build, still complaining about a missing i686-pc-linux-gnu-cc (see attached config.log).

The info you requested:

-------------------------------------------------------------------------

devbox ~ # emerge db -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] sys-libs/db-4.3.29-r2 [4.3.29] USE="java -bootstrap -doc -nocxx -tcl% -test%" 0 kB

Total size of downloads: 0 kB
Comment 18 jieryn 2006-08-09 07:05:50 UTC
Sorry about the emerge --info, I thought I've had problems posting it with other text in the same comment.

Actually, I am not having problems with other packages. I regularly emerge system without a hiccup until sys-libs/db is reached. Then I manually emerge the remaining system packages with --oneshot.

[ebuild     U ] sys-libs/db-4.3.29-r2 [4.3.29] USE="java* -bootstrap -doc -nocxx -tcl% -test%" 0 kB
Comment 19 Paul de Vrieze (RETIRED) gentoo-dev 2006-08-09 08:27:39 UTC
It seems that db triggers this as it looks for more compilers than the other packages do. It is however still a problem with compilers posing as compilers while not being compilers. Looking at your log file I see that "/usr/lib/ccache/bin/i686-pc-linux-gnu-cc" still exists. Also remove that file
Comment 20 SpanKY gentoo-dev 2006-08-09 08:56:58 UTC
ive fixed gcc-config to delete the stale $CTARGET-cc wrapper
Comment 21 jieryn 2006-08-09 14:14:14 UTC
Team, I verify the removal of the -cc works for me. Thanks very much!!! :-)
Comment 22 Alex Tarkovsky 2006-08-09 21:47:39 UTC
(In reply to comment #19)
> It seems that db triggers this as it looks for more compilers than the other
> packages do. It is however still a problem with compilers posing as compilers
> while not being compilers. Looking at your log file I see that
> "/usr/lib/ccache/bin/i686-pc-linux-gnu-cc" still exists. Also remove that file

Thanks, that did the trick. db and friends compile without incident now. Please make future ccache ebuilds check for and clean that symlink.
Comment 23 Alex Tarkovsky 2006-08-09 22:16:02 UTC
Btw, `emerge -C ccache` leaves dead symlinks behind:

...
--- !empty dir /usr/lib/ccache/bin
...

devbox ~ # ls -al /usr/lib/ccache/bin
total 0
drwxr-xr-x 2 root root 264 2006-08-10 00:06 .
drwxr-xr-x 3 root root  72 2006-02-13 19:27 ..
lrwxrwxrwx 1 root root  15 2006-06-10 03:30 c++ -> /usr/bin/ccache
lrwxrwxrwx 1 root root  15 2006-06-10 03:30 cc -> /usr/bin/ccache
lrwxrwxrwx 1 root root  15 2006-06-10 03:30 g++ -> /usr/bin/ccache
lrwxrwxrwx 1 root root  15 2006-06-10 03:30 gcc -> /usr/bin/ccache
lrwxrwxrwx 1 root root  15 2006-06-10 03:30 i686-pc-linux-gnu-c++ -> /usr/bin/ccache
lrwxrwxrwx 1 root root  15 2006-06-10 03:30 i686-pc-linux-gnu-g++ -> /usr/bin/ccache
lrwxrwxrwx 1 root root  15 2006-06-10 03:30 i686-pc-linux-gnu-gcc -> /usr/bin/ccache
Comment 24 SpanKY gentoo-dev 2006-08-10 12:24:31 UTC
toolchain doesnt handle ccache
Comment 25 SpanKY gentoo-dev 2006-08-21 03:06:35 UTC
*** Bug 144614 has been marked as a duplicate of this bug. ***
Comment 26 SpanKY gentoo-dev 2006-09-02 00:00:47 UTC
*** Bug 145946 has been marked as a duplicate of this bug. ***