Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39651 - python 2.3.3 borks with pystate.c:128: internal error: Illegal instruction
Summary: python 2.3.3 borks with pystate.c:128: internal error: Illegal instruction
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-28 03:47 UTC by Matt
Modified: 2004-01-29 02:25 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 Matt 2004-01-28 03:47:04 UTC
Python/pystate.c: In function `threadstate_getframe':
Python/pystate.c:128: internal error: Illegal instruction

This fails on a Via Ezra (x86 with mmx,sse but w/o cmov) using the following flags:

-mcpu=i486 -Os -mmmx -msse -pipe -fomit-frame-pointer -funroll-loops

Switching to these flags allows it to compile error free:

-mcpu=i486 -O2

Suggested Remedy: 
Don't allow python to be built with flags more aggressive than -02 on this particular CPU.

In (probably syntatically wrong) bash:

if [ grep 'CentaurHauls' /proc/cpuinfo ]; then
  CFLAGS="-mcpu=i486 -O2";
endif
Comment 1 SpanKY gentoo-dev 2004-01-28 04:26:50 UTC
you forgot `emerge info`
Comment 2 Matt 2004-01-28 05:04:27 UTC
Portage 2.0.49-r21 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.22-gentoo-r2)
=================================================================
System uname: 2.4.22-gentoo-r2 i686 VIA Nehemiah
Gentoo Base System version 1.4.3.10
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=i486 -Os -mmmx -msse -pipe -fomit-frame-pointer -funroll-loops"
CHOST="i586-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=i486 -Os -mmmx -msse -pipe -fomit-frame-pointer -funroll-loops"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="acl acpi apache2 berkdb bidi cdr crypt cups curl directfb dvb dvd dvdr fam fastcgi fbcon firebird flash foomaticdb freetds gd gdbm gif gpm gstreamer guile imap imlib informix innodb ipv6 java jikes jpeg kerberos krb4 lcms ldap libg++ libwww maildir memlimit mmx mpeg mpi mysql ncurses nls nocardbus oci8 odbc oggvorbis pam pdflib perl png postgres ppds prelude python quicktime readline ruby samba sasl slang spell sqlite sse ssl svga tcpd tiff truetype unicode usb wmf x86 xml xml2 zeo zlib"
Comment 3 Alastair Tse (RETIRED) gentoo-dev 2004-01-28 05:37:12 UTC
we can't filter for every possible cpu. i suggest you use less aggressive CFLAGS given that you are using a somewhat special CPU with incomplete support for certain mmx/sse instructions.
Comment 4 Georgios E. Kylafas 2004-01-29 02:25:25 UTC
I think the problem was the -Os flag only. I also had a problem compiling
python, although not the same as reported here, using CFLAGS="-Os".

Switching to "-march=i686 -mcpu=i686 -O2 -pipe -fomit-frame-pointer" allowed the compilation to proceed normally (!).