Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 39948

Summary: Python 2.3.3 build but modules won't load because not built correctly
Product: Gentoo Linux Reporter: Michele Alzetta <michele.alzetta>
Component: [OLD] DevelopmentAssignee: Python Gentoo Team <python>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Michele Alzetta 2004-01-31 02:33:44 UTC
The long and short of all the problems I've been having lately seems to be this: python 2.3.3 gets built, but it's modules don't get built correctly, which is why python doesn't work and portage and .... etc. etc. 

I tried using mcpu=athlon-xp and -O2 instead of -O3 but the problem doesn't change.
I wander if it is the fault of the new glibc ?

These are the error messages I get in build:

unning build
running build_ext
building 'struct' extension
creating build
creating build/temp.linux-i686-2.3
gcc -pthread -DNDEBUG -march=athlon-xp -O2 -pipe -fomit-frame-pointer -fPIC -fno-strict-aliasing -I. -I/var/tmp/portage/python-2.3.3/work/Python-2.3.3/./Include -I/var/tmp/portage/python-2.3.3/work/Python-2.3.3/Include -I/var/tmp/portage/python-2.3.3/work/Python-2.3.3 -c /var/tmp/portage/python-2.3.3/work/Python-2.3.3/Modules/structmodule.c -o build/temp.linux-i686-2.3/structmodule.o
creating build/lib.linux-i686-2.3
gcc -pthread -shared build/temp.linux-i686-2.3/structmodule.o -L/usr/local/lib -o build/lib.linux-i686-2.3/struct.so
*** WARNING: importing extension "struct" failed with exceptions.AttributeError: 'module' object has no attribute 'load_dynamic'

A quick google reveals a similar problem with python 2.3.3 on a totally different architecture:

http://mail.python.org/pipermail/python-bugs-list/2003-October/020521.html

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Michele Alzetta 2004-01-31 02:35:18 UTC
bash-2.05b$ emerge info
Portage 2.0.49-r20 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.22-gentoo-r5)
=================================================================
System uname: 2.4.22-gentoo-r5 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.4.3.10
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://212.219.247.11/sites/www.ibiblio.org/gentoo/ http://212.219.247.12/sites/www.ibiblio.org/gentoo/ http://212.219.247.16/sites/www.ibiblio.org/gentoo/ http://212.219.247.17/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib alsa apm arts avi berkdb cdr crypt cups dvd encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 imlib java jpeg kde libg++ libwww mad mikmod motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png postgres python qt quicktime readline scanner sdl slang spell ssl svga tcltk tcpd tetex tiff truetype usb x86 xml2 xmms xv zlib"

bash-2.05b$ uname -r
2.4.22-gentoo-r5
bash-2.05b$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs
Configured with: /var/tmp/portage/gcc-3.2.3-r3/work/gcc-3.2.3/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.2 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,f77,objc --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext
Thread model: posix
gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r3, propolice)
bash-2.05b$ cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 6
model name      : AMD Athlon(tm) Processor
stepping        : 2
cpu MHz         : 1145.204
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips        : 2260.99

Comment 2 Michele Alzetta 2004-01-31 02:36:55 UTC
qpkg -I -v | grep -E "gcc|glibc"
sys-devel/gcc-3.2.3-r3 *
sys-devel/gcc-config-1.3.4 *
sys-libs/glibc-2.3.2-r9 *
Comment 3 Michele Alzetta 2004-01-31 02:38:31 UTC
*** Bug 39435 has been marked as a duplicate of this bug. ***
Comment 4 Alastair Tse (RETIRED) gentoo-dev 2004-02-14 03:15:29 UTC
i can't see that their patches are relevant to whats happening on linux though. their patch adds -belf which isn't relevant with linux at all.

there's some other underlying problem here, especially as this is the first report i've seen of this kinda. does python-2.2 work fine for you?
Comment 5 Alastair Tse (RETIRED) gentoo-dev 2004-02-28 15:29:54 UTC
please reopen if you have more info