Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 163566 - dev-python/wxpython-2.6.3.3 _core_ module broken by certain cflags
Summary: dev-python/wxpython-2.6.3.3 _core_ module broken by certain cflags
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo wxWidgets project
URL:
Whiteboard:
Keywords:
: 163260 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-24 09:40 UTC by Jordan Callicoat
Modified: 2010-08-31 02:55 UTC (History)
2 users (show)

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


Attachments
test case (test.py,638 bytes, text/plain)
2007-01-24 09:41 UTC, Jordan Callicoat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan Callicoat 2007-01-24 09:40:13 UTC
The _core_ module of wxpython-2.6.3.3 is broken when built with the following:

CFLAGS="-O2 -march=i686 -pipe"
CXXFLAGS="${CFLAGS}"

Reproducible: Always

Steps to Reproduce:
1. run test case

Actual Results:  
Traceback (most recent call last):
  File "/mydocs/bin/test.py", line 29, in <module>
    app = App(0)
  File "/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line 7700, in __init__
    self._BootstrapApp()
  File "/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line 7352, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "/mydocs/bin/test.py", line 24, in OnInit
    frame = MainFrame(None, -1, 'test.py')
  File "/mydocs/bin/test.py", line 16, in __init__
    box.Add(button, 1)
  File "/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line 11711, in Add
    return _core_.Sizer_Add(*args, **kwargs)
TypeError: wx.Window, wx.Sizer, wx.Size, or (w,h) expected for item


Expected Results:  
program runs
Comment 1 Jordan Callicoat 2007-01-24 09:41:00 UTC
Created attachment 107986 [details]
test case
Comment 2 Jordan Callicoat 2007-01-24 09:45:29 UTC
Oh yeah, and the _core_ module functions properly if I unset CFLAGS CXXFLAGS just before the "python setup.py" in the src_compile section of the ebuild. Which is why I say that it's my flags that caused the problem.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-01-24 09:51:48 UTC
*** Bug 163260 has been marked as a duplicate of this bug. ***
Comment 4 4nykey 2007-02-22 13:47:04 UTC
Same here with gcc-4.1.1 and python-2.5.
Apparently -O1 and below is fine, 2.6.3.3 ebuild with this line
> sed -i "s:cflags.append('-O3'):pass:" config.py || die "sed failed"
replaced with
> sed -i "s:-O3:-O:" config.py || die "sed failed"
produced working wxpython on my end.
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2007-05-13 17:42:47 UTC
emerge --info please.
Comment 6 4nykey 2007-05-15 14:01:56 UTC
Here's mine

Portage 2.1.2.7 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r2, 2.6.20-gentoo-r6 i686)
=================================================================
System uname: 2.6.20-gentoo-r6 i686 AMD Duron(tm) processor
Gentoo Base System release 2.0.0_alpha2
Timestamp of tree: Fri, 11 May 2007 01:47:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.32
dev-lang/python:     2.5.1-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
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
sys-devel/binutils:  2.17.50.0.15
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon -mtune=athlon -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/cron.daily /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/app-defaults /usr/share/X11/locale /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon -mtune=athlon -fomit-frame-pointer -fvisibility-inlines-hidden -pipe"
DISTDIR="/files/distfiles"
FEATURES="candy ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/"
LANG="ru_RU.UTF-8"
LC_ALL="C"
LDFLAGS=" -Wl,-O1 -Wl,--as-needed"
LINGUAS="ru en"
MAKEOPTS="-j2"
PKGDIR="/files/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/repos/gentoo"
PORTDIR_OVERLAY="/var/repos/layman/mpd /var/repos/layman/gnome-experimental /var/repos/layman/sunrise /var/repos/mingw32 /var/repos/4nykey /var/repos/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
Comment 7 Mart Raudsepp gentoo-dev 2007-05-15 14:04:22 UTC
(In reply to comment #6)
> CXXFLAGS="-O2 -march=athlon -mtune=athlon -fomit-frame-pointer
> -fvisibility-inlines-hidden -pipe"

-fvisibility-inlines-hidden is unsupported and breaks stuff. However the original bug reporter doesn't seem to use this, but I don't see a full emerge --info yet from him.
Comment 8 Peter 2007-05-15 15:43:52 UTC
(In reply to comment #5)
> emerge --info please.
> 

Portage 2.1.2_rc4 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r2 i686)
=================================================================
System uname: 2.6.19-gentoo-r2 i686 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.8
Last Sync: Wed, 14 Feb 2007 22:00:01 +0000
dev-lang/python:     2.3.6, 2.4.4, 2.5-r1
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
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
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -msse2 -O2 -pipe -ftracer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=athlon-xp -msse2 -O2 -pipe -ftracer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dfx 3dnow 3dnowext X aac aalib acpi alsa alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1 alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol bash-completion berkdb bitmap-fonts cdparanoia cli cpudetection cracklib crypt cups directfb dlloader dri dts dv dvb dvd dvdread elibc_glibc examples fbcon foomaticdb fortran gdbm gif gphoto2 gpm gtk iconv imagemagick input_devices_evdev input_devices_keyboard input_devices_mouse isdnlog jpeg kernel_linux lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text libg++ midi mmx mp3 mpeg mplayer mysql ncurses nls nptl nptlonly pam pcre perl ppds pppd python readline real reflection rtc samba session slang spl sse sse2 ssl svga tcltk tcpd tga theora threads tidy truetype truetype-fonts type1-fonts unicode usb userland_GNU v4l v4l2 vcd video_cards_fglrx video_cards_nv video_cards_radeon video_cards_vesa win32codecs wxwindows xanim xine xinerama xorg xvid xvmc zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 9 Qiangning Hong 2007-05-16 03:06:13 UTC
and mine followed.  no this problem if change -O2 to -O1

Portage 2.1.2.7 (default-linux/amd64/2006.1/desktop, gcc-4.1.2, glibc-2.5-r2, 2.6.19-suspend2-r3 x86_64)
=================================================================
System uname: 2.6.19-suspend2-r3 x86_64 AMD Turion(tm) 64 Mobile Technology MT-30
Gentoo Base System release 1.12.10
Timestamp of tree: Fri, 11 May 2007 19:50:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.32
dev-lang/python:     2.4.4, 2.5-r2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
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
sys-devel/binutils:  2.17.50.0.15
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=athlon64 -O2 -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.hamakor.org.il/pub/mirrors/gentoo/"
LC_ALL="en_US.UTF-8"
LINGUAS="en zh_CN"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/secondlife /usr/portage/local/layman/hongqn /usr/local/portage"
SYNC="rsync://hongqn.7766.org/gentoo-portage"
USE="X a52 aac acpi alsa amd64 ao aoss audiofile automount bash-completion battery bitmap-fonts branding bzip2 cairo caps ccache cdr chardet cjk cli cpufreq cracklib dbus divx dri dv dvd dvdr emboss encode exo fam fbsplash ffmpeg firefox freetype gif glut gmedia gstreamer gtk gtk2 hal hashstyle hddtemp iconv imagemagick innodb isdnlog ithreads jpeg kqemu libg++ libnotify libsamplerate lm_sensors logrotate lzo macmenu mad matroska mikmod mjpeg mmap mozdevelop mp3 mpeg ncurses network-cron networkmanager nls no-old-linux nptl nptlonly nsplugin nvidia offensive ogg opengl oss pam panel-plugin pcre png ppds pppd quicktime rar readline realmedia reflection sdl session spell spl ssl startup-notification svg tcpd threads thunar thunar-vfs truetype truetype-fonts type1-fonts unicode vim vim-syntax vorbis wifi wmp x264 xcb xcomposite xface xforms xinerama xml xorg xscreensaver xv xvid zlib" ALSA_CARDS="intel8x0" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en zh_CN" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 10 Jordan Callicoat 2007-11-24 06:32:35 UTC
#7

I've since changed computers and reinstalled gentoo, but as I recall the env variables I posted for CFLAGS/CXXFLAGS were taken from emerge --info. Sorry for not posting the whole dump, I just figured that since I had isolated the problem, it wasn't necessary.
Comment 11 Ryan Hill (RETIRED) gentoo-dev 2007-11-24 14:48:02 UTC
i needed the GCC version ;)

i can't reproduce this, but i'm working on wxpython this weekend so i'll keep trying.
Comment 12 Jordan Callicoat 2007-11-25 09:13:41 UTC
#11

Aha. I posted to the forums before I figured out that my C/XXFLAGS were the problem, and included most of my system info, which was as follows:

$ gcc-config -l
[1] i686-pc-linux-gnu-4.1.1 *

$ python -V
Python 2.5

$ /usr/lib/python2.5/site-packages/wxpy-config.py -l

You have these versions of wxPython installed:

wx-2.4-gtk2-unicode
wx-2.6-gtk2-unicode (System default)
wx-2.8-gtk2-unicode

$ wx-config-2.6 --version
2.6.3

$ PORTDIR_OVERLAY="" emerge -pv wxGTK wxpython

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] x11-libs/wxGTK-2.6.3.3 USE="X gnome joystick sdl unicode -debug -doc -odbc -opengl" 18,519 kB
[ebuild R ] dev-python/wxpython-2.6.3.3 USE="unicode -opengl" 0 kB

Total: 2 packages (2 reinstalls), Size of downloads: 18,519 kB
Comment 13 Raúl Porcel (RETIRED) gentoo-dev 2008-01-28 15:42:31 UTC
Move stuff to new alias
Comment 14 Raúl Porcel (RETIRED) gentoo-dev 2008-01-31 10:34:51 UTC
Re-reassigning, sorry for the bugspam
Comment 15 Joseph Turian 2008-06-07 16:39:06 UTC
I am having this problem too, and I don't think it is the CFLAGS.

See this thread:
http://archives.devshed.com/forums/python-122/wxpython-error-after-updating-system-2148563.html

Robin Dunn explains:
"
Is it possible that the previous 2.6 version was not cleanly
uninstalled? This should not happen if the item passed to Add is
derived from wxWindow (like wxStaticLine is) but it seems to be getting
confused on the typeinfo, which can happen if different versions mix.
"
Comment 16 Ryan Hill (RETIRED) gentoo-dev 2010-08-31 02:55:46 UTC
Reopen if this is still a problem.