Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 340643 - sys-devel/gcc-4.4.4-r2 and sys-libs/glibc-2.12.1-r1 fail with Illegal Instruction
Summary: sys-devel/gcc-4.4.4-r2 and sys-libs/glibc-2.12.1-r1 fail with Illegal Instruc...
Status: RESOLVED DUPLICATE of bug 336020
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-12 08:17 UTC by Stefan de Konink
Modified: 2010-10-13 14:38 UTC (History)
0 users

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


Attachments
File the compiler chokes on (SYSCALLS.c,79.39 KB, text/plain)
2010-10-12 08:19 UTC, Stefan de Konink
Details
Build.log of glibc (build.log.gz,241.47 KB, application/octet-stream)
2010-10-13 00:26 UTC, Stefan de Konink
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan de Konink 2010-10-12 08:17:45 UTC
My first attempt was to do an emerge system on a Via Epia C3-2 using distcc, after that local only. This both resulted in Illegal Instructions. Given that the gcc compilation stops exactly at the same file.

Build output:

CPP='i686-pc-linux-gnu-gcc -E -x c-header'  /var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/elf/ld-linux.so.2 --library-path /var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/math:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/elf:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/dlfcn:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/nss:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/nis:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/rt:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/resolv:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/crypt:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/nptl /var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/sunrpc/rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o /var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/sunrpc/xbootparam_prot.T
make[2]: *** [/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/sunrpc/xbootparam_prot.stmp] Illegal instruction
make[2]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/glibc-2.12.1/sunrpc'
make[1]: *** [sunrpc/others] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/glibc-2.12.1'
make: *** [all] Error 2
emake failed

and


cp /var/tmp/portage/sys-devel/gcc-4.4.4-r2/work/gcc-4.4.4/gcc/../fixincludes/REA
DME-fixinc include-fixed/README
chmod a+r include-fixed/README
echo timestamp > stmp-int-hdrs
rm -f SYSCALLS.c tmp-SYSCALLS.s
sed -e s/TARGET_GETGROUPS_T/gid_t/ \
          /var/tmp/portage/sys-devel/gcc-4.4.4-r2/work/gcc-4.4.4/gcc/sys-types.h
 /var/tmp/portage/sys-devel/gcc-4.4.4-r2/work/gcc-4.4.4/gcc/sys-protos.h > SYSCA
LLS.c
/var/tmp/portage/sys-devel/gcc-4.4.4-r2/work/build/./gcc/xgcc -B/var/tmp/portage
/sys-devel/gcc-4.4.4-r2/work/build/./gcc/ -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i
686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686
-pc-linux-gnu/sys-include -g -O2 -march=c3-2 -pipe -DIN_GCC   -W -Wall -Wwrite-s
trings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definiti
on -Wno-strict-prototypes -Wno-error -isystem ./include  -I. -I. -I/var/tmp/port
age/sys-devel/gcc-4.4.4-r2/work/gcc-4.4.4/gcc -I/var/tmp/portage/sys-devel/gcc-4
.4.4-r2/work/gcc-4.4.4/gcc/. -I/var/tmp/portage/sys-devel/gcc-4.4.4-r2/work/gcc-
4.4.4/gcc/../include -I/var/tmp/portage/sys-devel/gcc-4.4.4-r2/work/gcc-4.4.4/gc
c/../libcpp/include  -I/var/tmp/portage/sys-devel/gcc-4.4.4-r2/work/gcc-4.4.4/gc
c/../libdecnumber -I/var/tmp/portage/sys-devel/gcc-4.4.4-r2/work/gcc-4.4.4/gcc/.
./libdecnumber/bid -I../libdecnumber    \
          -aux-info SYSCALLS.c.X -S -o tmp-SYSCALLS.s SYSCALLS.c
cc1: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.


Reproducible: Always




Portage 2.1.9.14 (default/linux/x86/10.0, gcc-4.4.3, glibc-2.11.2-r0, 2.6.35-gentoo-r10 i686)
=================================================================
System uname: Linux-2.6.35-gentoo-r10-i686-VIA_Nehemiah-with-gentoo-1.12.13
Timestamp of tree: Sun, 10 Oct 2010 11:15:02 +0000
distcc 3.1 i686-pc-linux-gnu [enabled]
app-shells/bash:     4.1_p7
dev-lang/python:     2.6.5-r3, 3.1.2-r4
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.35 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=c3-2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=c3-2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distcc distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="nl en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
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"
SYNC="rsync://192.168.1.2/gentoo-portage/"
USE="berkdb bzip2 cli cracklib crypt cups cxx dri gdbm iconv ipv6 modules ncurses nls nptl nptlonly pam pcre perl pppd python readline reflection session ssl sysfs tcpd unicode userlocales 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 mmap_emul 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 cgi cgid 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="nl en" PHP_TARGETS="php-5.2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="openchrome" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTDIR_OVERLAY
Comment 1 Stefan de Konink 2010-10-12 08:19:09 UTC
Created attachment 250337 [details]
File the compiler chokes on
Comment 2 Chí-Thanh Christopher Nguyễn gentoo-dev 2010-10-12 08:53:34 UTC
Are you really sure that your CPU supports the instruction set implied by -march=c3-2 ? Compare what "man gcc" says with /proc/cpuinfo
Comment 3 Stefan de Konink 2010-10-12 09:43:05 UTC
(In reply to comment #2)
> Are you really sure that your CPU supports the instruction set implied by
> -march=c3-2 ? Compare what "man gcc" says with /proc/cpuinfo

I am totally trusting the Safe CFLAGS page.

vendor_id       : CentaurHauls
cpu family      : 6
model           : 9
model name      : VIA Nehemiah
stepping        : 8
...
flags           : fpu vme de pse tsc msr cx8 sep mtrr pge cmov pat mmx fxsr sse rng rng_en ace ace_en

man gcc:
           c3-2
               Via C3-2 CPU with MMX and SSE instruction set support.  (No
               scheduling is implemented for this chip.)
Comment 4 Stefan de Konink 2010-10-12 10:30:49 UTC
Seems to go wrong somewhere after pex_run in gcc.c around line 3014.
Comment 5 Stefan de Konink 2010-10-12 14:23:15 UTC
It seems that after defining CC='gcc -m32 -march=c3-2' GCC goes beyond the Illegal Instruction point. I'll close the bug if glibc is compiled as well.
Comment 6 Stefan de Konink 2010-10-13 00:26:25 UTC
Sadly a distcc build and a local build end up in the same misery.

CPP='i686-pc-linux-gnu-gcc -E -x c-header'  /var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/elf/ld-linux.so.2 --library- ath /var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc linux-gnu-nptl/math:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/elf:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/b ild-default-i686-pc-linux-gnu-nptl/dlfcn:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/nss:/var/tmp/portage/sys-libs/g ibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/nis:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/rt:/var/tmp/ ortage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/resolv:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux- nu-nptl/crypt:/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/nptl /var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build- efault-i686-pc-linux-gnu-nptl/sunrpc/rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o /var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc linux-gnu-nptl/sunrpc/xbootparam_prot.T
make[2]: *** [/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/build-default-i686-pc-linux-gnu-nptl/sunrpc/xbootparam_prot.stmp] Illegal instruction
make[2]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/glibc-2.12.1/sunrpc'
make[1]: *** [sunrpc/others] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.12.1-r1/work/glibc-2.12.1'
make: *** [all] Error 2
emake failed
Comment 7 Stefan de Konink 2010-10-13 00:26:58 UTC
Created attachment 250407 [details]
Build.log of glibc
Comment 8 Stefan de Konink 2010-10-13 14:29:18 UTC
http://bugs.gentoo.org/show_bug.cgi?id=24379

Looks that on the above bug the exact same file is being borked.
Comment 9 Stefan de Konink 2010-10-13 14:38:44 UTC

*** This bug has been marked as a duplicate of bug 336020 ***