Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 281968 - dev-lang/python: Missing dependency on >=dev-libs/expat-2 and non-zero exit status of setup.py when building of extensions has failed
Summary: dev-lang/python: Missing dependency on >=dev-libs/expat-2 and non-zero exit s...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Python Gentoo Team
URL: http://bugs.python.org/issue6731
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2009-08-18 20:34 UTC by Robin Johnson
Modified: 2009-08-28 18:03 UTC (History)
2 users (show)

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


Attachments
Build log (dev-lang:python-2.5.4-r3:20090818-203644.log,755.21 KB, text/plain)
2009-08-18 20:48 UTC, Robin Johnson
Details
build log with -j1 (dev-lang:python-2.5.4-r3:20090818-205839.log,788.73 KB, text/plain)
2009-08-18 21:04 UTC, Robin Johnson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-08-18 20:34:31 UTC
The python2.5 just installed on several infra machines is broken. It does not have working expat/celementree:
# python /usr/lib64/python2.5/test/test_pyexpat.py              
Traceback (most recent call last):
  File "/usr/lib64/python2.5/test/test_pyexpat.py", line 6, in <module>
    import pyexpat
ImportError: No module named pyexpat

# equery f =python-2.5* |grep _failed
/usr/lib64/python2.5/lib-dynload/_elementtree_failed.so
/usr/lib64/python2.5/lib-dynload/pyexpat_failed.so

# emerge -pv =python-2.5*
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-lang/python-2.5.4-r3  USE="berkdb ipv6 ncurses readline ssl threads xml -build -doc -examples -gdbm -sqlite -tk -ucs2 -wininst" 0 kB

Portage 2.1.6.13 (hardened/amd64/multilib, gcc-3.4.6, glibc-2.9_p20081201-r2, 2.6.XX-hardened-XX x86_64)
=================================================================
System uname: Linux-2.6.XX-hardened-XX-x86_64-Dual-Core_AMD_Opteron-tm-_Processor_2210-with-glibc2.3.2
Timestamp of tree: Tue, 18 Aug 2009 18:50:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r14, 2.5.4-r3
dev-python/pycrypto: 2.0.1-r8
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -fomit-frame-pointer -fforce-addr -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php4/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php4/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php4/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -fomit-frame-pointer -fforce-addr -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distlocks fixpackages genpkgindex parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j8 --quiet"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="XXXXXXXXXXXXXXXXXXXX"
USE="amd64 bash-completion berkdb cracklib crypt hardened ipv6 justify mmx multilib ncurses nptl nptlonly pam perl pic python readline snmp ssl sysfs tcpd urandom xml xorg zlib" 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" KERNEL="linux" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-08-18 20:38:15 UTC
Build log coming in a couple of mins
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-08-18 20:43:57 UTC
Second try, and it didn't generate the _failed.so at all, or the pyexpat.so EITHER!
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-08-18 20:45:45 UTC
From the buildlog:
building 'pyexpat' extension
x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -march=k8 -fomit-frame-pointer -fforce-addr -O2 -pipe -I/usr/include -I. -I/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include -I. -IInclude -I./Include -I/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Include -I/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4 -c -I/usr/include -I. -I/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include -I. -IInclude -I./Include -I/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Include -I/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4 -c /var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/pyexpat.c -o build/temp.linux-x86_64-2.5/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/pyexpat.o
In file included from /var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/pyexpat.c:7:
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include/pyexpat.h:19: error: syntax error before "XML_Size"
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include/pyexpat.h:19: warning: no semicolon at end of struct or union
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include/pyexpat.h:20: error: syntax error before '*' token
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include/pyexpat.h:20: error: `XML_Size' declared as function returning a function
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include/pyexpat.h:20: warning: data definition has no type or storage class
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include/pyexpat.h:46: error: syntax error before '}' token
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/pyexpat.c: In function `initpyexpat':
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/pyexpat.c:1854: error: storage size of 'capi' isn't known
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/pyexpat.c:1854: error: storage size of `capi' isn't known
building '_elementtree' extension
x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -march=k8 -fomit-frame-pointer -fforce-addr -O2 -pipe -DUSE_PYEXPAT_CAPI -I/usr/include -I. -I/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include -I. -IInclude -I./Include -I/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Include -I/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4 -c -DUSE_PYEXPAT_CAPI -I/usr/include -I. -I/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include -I. -IInclude -I./Include -I/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Include -I/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4 -c /var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/_elementtree.c -o build/temp.linux-x86_64-2.5/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/_elementtree.o
In file included from /var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/_elementtree.c:1832:
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include/pyexpat.h:19: error: syntax error before "XML_Size"
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include/pyexpat.h:19: warning: no semicolon at end of struct or union
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include/pyexpat.h:20: error: syntax error before '*' token
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include/pyexpat.h:20: error: `XML_Size' declared as function returning a function
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include/pyexpat.h:20: warning: data definition has no type or storage class
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/./Include/pyexpat.h:46: error: syntax error before '}' token
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/_elementtree.c: In function `expat_default_handler':
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/_elementtree.c:1998: error: dereferencing pointer to incomplete type
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/_elementtree.c:1999: error: dereferencing pointer to incomplete type
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/_elementtree.c: In function `xmlparser':
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/_elementtree.c:2252: error: dereferencing pointer to incomplete type
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/_elementtree.c:2265: error: dereferencing pointer to incomplete type
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/_elementtree.c:2285: error: dereferencing pointer to incomplete type
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/_elementtree.c:2286: error: dereferencing pointer to incomplete type
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/_elementtree.c:2291: error: dereferencing pointer to incomplete type
/var/tmp/portage/dev-lang/python-2.5.4-r3/work/Python-2.5.4/Modules/_elementtree.c:2295: error: dereferencing pointer to incomplete type
....


It SHOULD have failed out at this point, NOT continued.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-08-18 20:48:58 UTC
Created attachment 201643 [details]
Build log
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-08-18 20:50:18 UTC
expat is still valid (other stuff is compiled against it and works), no errors. expat-1.95.8 installed.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-08-18 21:01:02 UTC
expat1 doesn't seem to declare a bunch of the symbols used in the pyexpat extension.

Ergo:
1. deps on python are broken. Needs to be >=dev-libs/expat-2
2. the build system is not detecting failure and erroring out properly

Please fix both of these. I've got 7 broken machines (more critically than planet, it's broken glsa-check).
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-08-18 21:04:22 UTC
Created attachment 201644 [details]
build log with -j1
Comment 8 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-08-18 21:08:46 UTC
(In reply to comment #6)

> Please fix both of these. I've got 7 broken machines (more critically than
> planet, it's broken glsa-check).

bug 233973 seems to document this.
Comment 9 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-08-21 01:54:57 UTC
Fixed in 2.5.4-r3, 2.6.2-r1 and 3.1.1.
(Python 2.4.* doesn't require >=dev-libs/expat-2.)
Comment 10 Paul Varner (RETIRED) gentoo-dev 2009-08-28 18:03:48 UTC
*** Bug 233973 has been marked as a duplicate of this bug. ***