Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 90839 - [patch] wxGTK & GCC4
Summary: [patch] wxGTK & GCC4
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Gentoo wxWidgets project
URL:
Whiteboard:
Keywords:
: 114808 (view as bug list)
Depends on: 89937
Blocks:
  Show dependency tree
 
Reported: 2005-04-29 03:53 UTC by Ryan Hill (RETIRED)
Modified: 2005-12-07 15:29 UTC (History)
3 users (show)

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


Attachments
wxGTK-2.4.2-gcc4.patch (wxGTK-2.4.2-gcc4.patch,10.08 KB, patch)
2005-04-29 03:54 UTC, Ryan Hill (RETIRED)
Details | Diff
wxGTK-2.6.0-gcc4.patch (wxGTK-2.6.0-gcc4.patch,11.99 KB, patch)
2005-04-29 17:10 UTC, Ryan Hill (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill (RETIRED) gentoo-dev 2005-04-29 03:53:16 UTC
GCC4 miscompiles wxGTK, resulting in undefined references and failed compiles when a package is built against it.  a typical error example is "libwx_gtk2-2.4.so: undefined reference to `wxwxListStringNode::~wxwxListStringNode()'".  this patch from Fedora fixes these errors.  the patch also happens to fix the pragma bug that prevented the use of -fvisibility-inlines-hidden (bug #82207).
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2005-04-29 03:54:18 UTC
Created attachment 57562 [details, diff]
wxGTK-2.4.2-gcc4.patch
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2005-04-29 17:10:44 UTC
Created attachment 57630 [details, diff]
wxGTK-2.6.0-gcc4.patch

ported patch to 2.6.0
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2005-04-29 17:12:27 UTC
marking depends on bug #89937 for 2.6.0.
Comment 4 Rob Cakebread (RETIRED) gentoo-dev 2005-05-02 12:24:54 UTC
Thanks Ryan, both patches added.
Comment 5 Rob Cakebread (RETIRED) gentoo-dev 2005-05-11 13:47:37 UTC
Ryan, I'm re-opening this, but not sure what to do with it at the moment. Its causing at least one package to fail:
http://bugs.gentoo.org/show_bug.cgi?id=91443

vlc ran for me when I tested it, but no menus worked, so until I can test a lot more packages, I've removed the patch to be safe.
Comment 6 Ryan Hill (RETIRED) gentoo-dev 2005-05-11 20:26:46 UTC
best to be safe, esp since gcc 4 isn't supported.  i'll see what i can dig up.

Comment 7 Ryan Hill (RETIRED) gentoo-dev 2005-05-11 23:25:44 UTC
-fvisibility-inlines-hidden needs to be stripped from 2.6.0-r1 in the meantime.
Comment 8 Mart Raudsepp gentoo-dev 2005-06-18 07:53:17 UTC
... or -DNO_GCC_PRAGMA declared in CPPFLAGS in case of wxGTK-2.6.x

http://thread.gmane.org/gmane.comp.lib.wxwidgets.devel/62713

The sckfile.h issue is beyond me. It was #pragma interface "sckfile.h" in file.h
and #pragma implementation "sckfile.h" in the appropriate .cpp file, so why the
issue? Oh, and with the pragma patch wx/protocol/file.h and wx/file.h will both
get #pragma interface "file.h" and that certainly sounds like trouble.

At any rate -DNO_GCC_PRAGMA makes these pragmas not used at all (no
NO_GCC_PRAGMA in 2.4 branch).

I have been using -fvisibility-inlines-hidden since about wxGTK-2.5.4 CVS HEAD
till now - never have had any problems (CVS builds though).

I believe there is a motion to release wxWidgets 2.4.4 in some shape or form
that would then have this issue patched among other things, but others are more
capable of commenting on the validity of this belief of mine.

The above noted thread also has links to relevant gcc bugzilla entries for the
virtual dtor problem with comments about them.
Comment 9 Ryan Hill (RETIRED) gentoo-dev 2005-06-19 13:22:42 UTC
-DNO_GCC_PRAGMA is already used when building 2.6.0-r1 (or at least it is in the
build i'm doing right now ;).  i'm not seeing the virtual function warnings I
saw before either.  if it does manage to link properly i'll consider closing
this bug.  backporting GCC 4 support to 2.4.2 isn't really a high priority i
don't think.  if upstream implements it in a future 2.4 release, then more power
to them ;).

for the record i'm running a GCC cvs snapshot that should be very similar to GCC
4.0.1 final to be released this week, and i'm building with
-fvisibility-inlines-hidden.
Comment 10 Ryan Hill (RETIRED) gentoo-dev 2005-06-19 15:04:10 UTC
yeah, no problems building 2.6.0 w/ gcc-4.0.1 here.  all the wx apps i have are
working as well, inc VLC.  closing WFM.


Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-4.0.1-beta20050609,
glibc-2.3.5.20050421-r0, 2.6.12-rc6 i686)
=================================================================
System uname: 2.6.12-rc6 i686 Pentium III (Katmai)
Gentoo Base System version 1.6.12
ccache version 2.4 [enabled]
dev-lang/python:     2.4.1
sys-apps/sandbox:    1.2.9
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.94.0.2.2, 2.15.97, 2.16-r1, 2.16.1
sys-devel/libtool:   1.5.18
virtual/os-headers:  2.6.11-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe -fno-ident"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe -fno-ident
-fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms test"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/dirtyepic/work/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aac alsa avi bash-completion berkdb bzip2 cddb cdr crypt curl expat
fbcon flac gdbm gif gnutls gphoto2 graphviz gtk gtk2 hal imlib java javascript
jpeg mmx mng moon-on-a-stick mozilla mp3 mpeg ncurses ogg oggvorbis opengl oss
perl pic png python quicktime readline ruby sse ssl svg tcpd threads truetype
vcd vorbis xml xml2 xmms xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LINGUAS
Comment 11 Mart Raudsepp gentoo-dev 2005-06-19 16:05:11 UTC
(In reply to comment #9)
> -DNO_GCC_PRAGMA is already used when building 2.6.0-r1 (or at least it is in the
> build i'm doing right now ;).

It wasn't the case in 2.6.0 and 2.6.1, when not using precompiled headers at
least, iirc. Can't exactly remember what was the case if precompiled headers
were used. At any rate there was never a problem for me if they were used.
Current CVS HEAD of wx always defines NO_GCC_PRAGMA now, soon I or someone else
will probably remove the pragmas as a whole from 2.4 and 2.6 branches, fixing
next 2.4 release too (if one is to come).

> if upstream implements it in a future 2.4 release, then more power to them ;).

Ayea :)
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2005-12-07 15:29:16 UTC
*** Bug 114808 has been marked as a duplicate of this bug. ***