Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 213215 - sys-devel/distcc builds findutils with "Illegal Instruction" w/ -march=native
Summary: sys-devel/distcc builds findutils with "Illegal Instruction" w/ -march=native
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-12 23:39 UTC by peyser.alex
Modified: 2008-03-13 06:54 UTC (History)
0 users

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 peyser.alex 2008-03-12 23:39:06 UTC
find fails with an "Illegal instruction" if it is compiled with distcc for an x86 architecture (with cross-compiling from amd64). This still occurs if ccache is on while compiling without distcc, and then recompile with ccache and distcc (Shouldn't the compilation be coming out of the cache in that case, as if distcc wasn't being used? No calls seemed to be made across the network!). 

distutils version: 4.3.11
distcc version: 2.18.3-r12

Even more strangely, it also happened on one of my amd64 machines after doing an emerge --depclean, but not on two other machines configured exactly the same, but only in run-cron running under vixie-cron. After re-emerging findutils and restarting vixie-cron, it went away.

Reproducible: Always

Steps to Reproduce:
1. Turn on distcc
2. emerge findutils
3. find .

Actual Results:  
Illegal Instruction

Expected Results:  
Anything but that.

Portage 2.1.4.4 (default-linux/x86/2007.0/desktop, gcc-4.2.3, glibc-2.6.1-r0, 2.6.23-gentoo-r9 i686)
=================================================================
System uname: 2.6.23-gentoo-r9 i686 Intel(R) Celeron(R) CPU 2.40GHz
Timestamp of tree: Sun, 09 Mar 2008 07:00:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r9
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.61-r1
sys-devel/automake:  1.4_p6, 1.8.5-r3, 1.10
sys-devel/binutils:  2.18-r1
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=native -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O3 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distcc distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://mirror.iawnet.sandia.gov/pub/gentoo/ http://open-systems.ufl.edu/mirrors/gentoo http://mirror.usu.edu/mirrors/gentoo/ http://mirror.mcs.anl.gov/pub/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ "
LINGUAS="en_US en"
MAKEOPTS="-j"
PKGDIR="/usr/portage/packages"
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"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="owl.gentoo.org"
USE="acl acpi apm bash-completion berkdb cli cracklib crypt cups dbus emacs evo fam gdbm hal iproute2 ipv6 isdnlog kerberos ldap midi mmx ncurses nptl nptlonly offensive pam pcre pdf perl pppd qt3support readline reflection session spl sse sse2 ssl symlink tcpd threads truetype unicode usb vorbis win32codecs x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" USERLAND="GNU" VIDEO_CARDS="none dummy"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.2.3, glibc-2.6.1-r0, 2.6.23-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.23-gentoo-r8 x86_64 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
Timestamp of tree: Tue, 26 Feb 2008 00:45:04 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.5.1-r5
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-r1
sys-devel/automake:  1.4_p6, 1.5, 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.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
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/X11/xkb /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="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distcc distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.gtlib.gatech.edu/pub/gentoo http://www.gtlib.gatech.edu/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo/ http://open-systems.ufl.edu/mirrors/gentoo http://mirror.mcs.anl.gov/pub/gentoo/ ftp://mirror.mcs.anl.gov/pub/gentoo/ "
LINGUAS="en es"
MAKEOPTS="-j"
PKGDIR="/usr/portage/packages"
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"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise"
SYNC="rsync://deli1/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 ao arts artswrappersuid audiofile avahi bash-completion beagle berkdb bitmap-fonts cairo cddb cdr cli cracklib crypt css cups dbus doc dri dv dvd dvdr dvdread eds emacs emboss emovix encode esd evo extrafilters fam fame ffmpeg firefox flac fortran gd gdbm gif gnome gpm gstreamer gtk hal hddtemp hfs iconv ieee1394 imagemagick ipv6 isdnlog java jpeg kde kerberos ladspa lame latex ldap libnotify libsamplerate lm_sensors lzo mad midi mikmod mjpeg mmx mono mp3 mpeg mudflap musepack musicbrainz ncurses network nforce2 nls nptl nptlonly nvidia offensive ogg opengl openmp oss pam pcre pdf perl plotutils pmu png portaudio pppd preview-latex python qt3 qt3support qt4 quicktime readline reflection sdl sensord session sndfile sound spell spl sse sse2 ssl svg symlink tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode userpriv v4l v4l2 vcd vorbis x264 xcomposite xetex xinerama xml xorg xprint 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en es" USERLAND="GNU" VIDEO_CARDS="nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2008-03-12 23:44:07 UTC
Using -march=native with distcc is generally not a good idea.
Comment 2 peyser.alex 2008-03-13 00:04:19 UTC
(In reply to comment #1)
> Using -march=native with distcc is generally not a good idea.
> 

It's not just not a good idea - it's a terrible idea, and I just missed it in the make.conf. That fixed it. Of course, distcc doesn't grok -march=native - there's no easy way to get gcc to spit out the flags that are equivalent to -march=native (and even if it could, distcc isn't smart about such things in general).

Still weird how the proper version wasn't ccached, though. 

And now I've got a royally shot system - gawk got recompiled, and it depends on... drum roll please... gawk.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2008-03-13 06:54:15 UTC
Marking CANTFIX, do not use -march=native w/ distcc, ever. ;)