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

Bug 219238

Summary: dev-python/wxpython- fails to build, dev-lang/python gentoo patch breaks distutils _compile interface
Product: Gentoo Linux Reporter: Helmut Jarausch <jarausch>
Component: Current packagesAssignee: Python Gentoo Team <python>
Severity: normal CC: aklhfex, andrey.prok, coldwind, cuciferus, gentoo, ikelos, john, koprut, pqGungnir, python, r.a, spamdummy, wxwidgets
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 230205    
Attachments: patch for build wxPython- against python 2.5.2-r2
modified ebuild

Description Helmut Jarausch 2008-04-25 06:09:29 UTC
emerge dev-python/wxpython  (with USEFLAG opengl)  gives

package init file 'wx/tools/XRCed/plugins/' not found (or not a regular file)
running build_ext
building '_core_' extension
creating build-gtk2.unicode/temp.linux-i686-2.5
creating build-gtk2.unicode/temp.linux-i686-2.5/src
creating build-gtk2.unicode/temp.linux-i686-2.5/src/gtk
Traceback (most recent call last):
  File "", line 922, in <module>
    'clean':           wx_extra_clean,
  File "/usr/lib/python2.5/distutils/", line 151, in setup
  File "/usr/lib/python2.5/distutils/", line 974, in run_commands
  File "/usr/lib/python2.5/distutils/", line 994, in run_command
  File "/usr/lib/python2.5/distutils/command/", line 112, in run
  File "/usr/lib/python2.5/distutils/", line 333, in run_command
  File "/usr/lib/python2.5/distutils/", line 994, in run_command
  File "/usr/lib/python2.5/distutils/command/", line 290, in run
  File "/usr/lib/python2.5/distutils/command/", line 416, in build_extensions
  File "/usr/lib/python2.5/distutils/command/", line 481, in build_extension
  File "/usr/lib/python2.5/distutils/", line 700, in compile
TypeError: _compile() got an unexpected keyword argument 'lang'
 * ERROR: dev-python/wxpython- failed.

Reproducible: Always

emerge --info
Portage 2.1.5_rc6 (default-linux/x86/2007.0, gcc-4.2.3, glibc-2.7-r2, 2.6.25-gentoo-r1 i686)
System uname: 2.6.25-gentoo-r1 i686 Pentium III (Coppermine)
Timestamp of tree: Thu, 24 Apr 2008 13:17:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.5
dev-lang/python:     2.5.2-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
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.25-r1
CFLAGS="-O2 -march=i686 -pipe"
CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
FEATURES="distlocks parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
LINGUAS="en de"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X acl alsa atm berkdb cairo cdr cli cracklib crypt cups doc dri dvd fortran gdbm gif gimp gnome gpm gtk iconv ipv6 isdnlog jpeg kde lcms midi mmx mudflap ncurses nls nptl nptlonly opengl openmp pam pcre pdf perl png pppd python qt qt4 readline reflection session spl sqlite sqlite3 sse ssl svg tcl tcpd tetex tiff tk unicode x86 xorg xulrunner zlib" ALSA_CARDS="ens1371" 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 wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="nv"
Comment 1 manwe 2008-04-25 17:28:00 UTC
Same error.

Portage 2.1.5_rc6 (default-linux/amd64/2007.0, gcc-4.2.3, glibc-2.7-r2, 2.6.24-zen4-endar-v21 x86_64)
System uname: 2.6.24-zen4-endar-v21 x86_64 AMD Turion(tm) 64 Mobile Technology MT-32
Timestamp of tree: Thu, 24 Apr 2008 19:16:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.5
dev-lang/python:     2.4.4-r11
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.1
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.25-r1
CAMERAS="canon ptp2"
CFLAGS="-O2 -pipe -msse3 -march=athlon64"
CFLAGS_x86="-m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib"

Comment 2 Ryan Hill (RETIRED) gentoo-dev 2008-04-27 07:45:02 UTC
looks like distutils breakage.  python guys?
Comment 3 tonich 2008-04-29 05:38:43 UTC
in python-gentoo-patches-2.5.2-r2.tar.bz2 in file 18_all_distutils-cxxflags.patch

this patch adds extra argument (lang=lang) to _compile function call.

wxPython's build script defines custom _compile function without this extra argument.

Ways to solve: remove _compile related patches from python-gentoo-patches or patch _ALL_ packages, who redefines _compile function.
Comment 4 tonich 2008-04-29 06:20:00 UTC
Created attachment 151295 [details, diff]
patch for build wxPython- against python 2.5.2-r2

This patch adds extra argument to redefined in wxPython build scripst _compile() function.
Comment 5 tonich 2008-04-29 06:26:13 UTC
Created attachment 151296 [details]
modified ebuild

if distutil's patch in python 2.5.2 is persistent, then this ebuild solves the problem, else this is teporary solution.
Comment 6 Ryan Hill (RETIRED) gentoo-dev 2008-04-30 17:08:07 UTC
*** Bug 219847 has been marked as a duplicate of this bug. ***
Comment 7 cucu ionut 2008-05-01 10:26:25 UTC
Thanks for the patch guys! It now works(although the patch could be renamed to wxpython-2.8.7-build.patch for others to get minimum fuss)
Comment 8 James Ausmus 2008-05-01 21:11:31 UTC
(In reply to comment #7)
> Thanks for the patch guys! It now works(although the patch could be renamed to
> wxpython-2.8.7-build.patch for others to get minimum fuss)

Works for me on amd64.

Comment 9 Michael Polskienazwisko 2008-05-02 13:05:33 UTC
if this patch works it should be incorporated to portage 

Comment 10 Ryan Hill (RETIRED) gentoo-dev 2008-05-02 13:30:59 UTC
just because it works doesn't mean it's the right fix.

i need to know if the problem is with the distutils patch in python, or if the python team wants us to patch any package that uses custom _compile functions (i don't know how common this is, if at all).
Comment 11 Ali Polatel (RETIRED) gentoo-dev 2008-05-13 15:51:41 UTC
Created attachment 153063 [details, diff]

2.5.2-r3 and 2.4.4-r12 should work fine with wxpython. Attached is a patch for
wxpython- to respect CXXFLAGS.  This is _not_ for wxpython itself but
for packages that uses wxpython's to build.
Comment 12 Mike Auty gentoo-dev 2008-09-14 13:12:10 UTC
Hiya guys,

I just ran into this exact problem on python-2.6b3 and wxpython- (but then assumed it was an issue with the beta, rather than a gentoo patch).  It's in 2.6b3 as 010_all_cflags.patch.

It strikes me as a really bad idea to knowingly break an interface that people are recommended to subclass (such as the _compile interface).  No other patch (at least in 2.6b3) changes function signatures, and probably with good reason.

It might have been ok if there were a **kwargs entry in there originally, and it would just have been ignored, but this will break anyone that attempts to implement their own compiler.

Moreover, at the moment it seems that the only place the lang variable is used is to choose the compiler to use, but it's identical whether lang is c or c++.

Since we're only patching the UnixCompiler, would it not be possible to move the "lang = self.detect_language(sources)" inside the unixcompiler?  If it's subclassed, then detect_language should still be a valid call, and would save us a lot of patching other _working_ packages...
Comment 13 Ryan Hill (RETIRED) gentoo-dev 2008-09-14 18:14:22 UTC
i'd just like to go on record as finding this whole thing kind of icky.  if it's not going upstream then we should seriously question whether we should be doing it at all.
Comment 14 Mike Auty gentoo-dev 2008-10-21 22:18:24 UTC
I'd also like to note that and also both fail for exactly the same reason (on python-2.6).  Also, bug 240690 seems to be a duplicate and suggests that fails (I don't know if it's been patched since I last tried it).

Python guys, any chance you could make a decision one way or another, so we can figure out whether to remove the offending patch from python, or keep it and fix wxpython?  It's a shame to have this hampering install for the past three versions of wxwidgets?
Comment 15 Ryan Hill (RETIRED) gentoo-dev 2008-10-21 23:24:20 UTC
*** Bug 240690 has been marked as a duplicate of this bug. ***
Comment 16 Wormo (RETIRED) gentoo-dev 2008-10-25 07:25:19 UTC
*** Bug 243796 has been marked as a duplicate of this bug. ***
Comment 17 Jesus Rivero (RETIRED) gentoo-dev 2008-11-17 21:51:48 UTC

   First of all, sorry for the delay on this one. 

   Here's the deal, the patch is really necessary for distutils to correctly use gentoo's cxxflags, so no icky things on this. The fact was that a proper patch was added to python-2.5.2-r3 and python-2.4.4-r12 that fixed the issue when UnixCCompiler was overridden and not properly reflected on this bug. That was the main cause why trying to get the error was difficult. However, the patch got lost with the version bump for python-2.6. 

   dev-lang/python-2.6-r5 addresses this issue, re-adds lost patch to patchset and fixes the issue with packages overriding stuff from disutils' compilers. 

  Best regards, 

PS: Closing this bug, please re-open as needed