Bug 118458 - 3ddesktop doesn't compile with gcc4 (patch included)
Bug#: 118458 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: nelchael@gentoo.org Reported By: simon.strandman@telia.com
Component: GCC Porting
URL: 
Summary: 3ddesktop doesn't compile with gcc4 (patch included)
Keywords:  
Status Whiteboard: 
Opened: 2006-01-09 13:32 0000
Description:   Opened: 2006-01-09 13:32 0000
3ddesktop doesn't compile with gcc4.

------- Comment #1 From Simon Strandman 2006-01-09 13:33:54 0000 -------
Created an attachment (id=76668) [details]
Patch

Patch to fix compile problems. I found it with google.

------- Comment #2 From Marcelo Goes 2006-01-10 12:02:51 0000 -------
Even though this is just a printf, removing it is a workaround, not a solution.

------- Comment #3 From Simon Strandman 2006-01-11 13:52:16 0000 -------
Created an attachment (id=76859) [details]
Better patch

This one is from debian.

------- Comment #4 From Bernard Cafarelli 2006-01-12 06:51:22 0000 -------
Works fine for me on ~amd64 with gcc 4.0.2

------- Comment #5 From Krzysiek Pawlik 2006-01-14 14:22:02 0000 -------
3ddesktop compiled fine and runs ok for me with gcc 4.0.2-r2

------- Comment #6 From Simon Strandman 2006-01-15 04:02:10 0000 -------
It fails for me with 4.0.2-r3:

if x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.    -Wall -O3
-DQT_CLEAN_NAMESPACE -DSHAREDIR=\"/usr/share/3ddesktop\" -DSYSCONFDIR=\"/etc\" 
 -O2 -march=athlon64 -pipe -fno-ident -fno-enforce-eh-specs
-fvisibility-inlines-hidden  -L/usr/lib64 -L/usr/lib64 -MT 3ddeskd.o -MD -MP
-MF ".deps/3ddeskd.Tpo" -c -o 3ddeskd.o 3ddeskd.cpp; \
then mv -f ".deps/3ddeskd.Tpo" ".deps/3ddeskd.Po"; else rm -f
".deps/3ddeskd.Tpo"; exit 1; fi
event.hpp: In member function 

------- Comment #7 From Simon Strandman 2006-01-15 04:02:10 0000 -------
It fails for me with 4.0.2-r3:

if x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.    -Wall -O3
-DQT_CLEAN_NAMESPACE -DSHAREDIR=\"/usr/share/3ddesktop\" -DSYSCONFDIR=\"/etc\" 
 -O2 -march=athlon64 -pipe -fno-ident -fno-enforce-eh-specs
-fvisibility-inlines-hidden  -L/usr/lib64 -L/usr/lib64 -MT 3ddeskd.o -MD -MP
-MF ".deps/3ddeskd.Tpo" -c -o 3ddeskd.o 3ddeskd.cpp; \
then mv -f ".deps/3ddeskd.Tpo" ".deps/3ddeskd.Po"; else rm -f
".deps/3ddeskd.Tpo"; exit 1; fi
event.hpp: In member function ‘void EventManager::print_events_in_queue()’:
event.hpp:77: error: cast from ‘void (*)(Event*)’ to ‘unsigned int’ loses
precision
make[1]: *** [3ddeskd.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/3ddesktop-0.2.9/work/3ddesktop-0.2.9'
make: *** [all] Error 2

emerge --info:
Portage 2.0.53 (default-linux/amd64/2005.1, gcc-4.0.2, glibc-2.3.6-r2,
2.6.15-ck1 x86_64)
=================================================================
System uname: 2.6.15-ck1 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
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.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe -fno-ident"
CHOST="x86_64-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=athlon64 -pipe -fno-ident -fno-enforce-eh-specs
-fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://snigel.no-ip.com/ http://mirror.pudas.net/gentoo
ftp://ftp.rhnet.is/pub/gentoo/"
LANG="sv_SE.UTF-8"
LC_ALL="sv_SE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,-Bdirect"
LINGUAS="sv sv-SE"
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="amd64 X aalib alsa artswrappersuid audiofile avi berkdb bzip2 cairo caps
cdb cdr compositor crypt dbus dga dlloader dvd dvdr dvdread emboss encode exif
expat f77 fam fbcon firefox foomaticdb fortran gif glibc-omitfp glut gmp gnome
gphoto2 gpm gtk gtk2 hal imagemagick imlib ipv6 ithreads jack-tmpfs java
javascript jpeg kdeenablefinal lcms logitech-mouse lzw lzw-tiff mad mikmod mng
mozpango mozsvg mp3 mpeg nautilus ncurses nls nomalloccheck nptl nptlonly
nsplugin nvidia objc offensive ogg oggvorbis opengl pdflib perl pic png pnp
python quicktime readline samba sdl spell ssl svg tcpd threads tiff truetype
truetype-fonts type1-fonts udev unicode usb userlocales visualization vorbis
xine xml2 xmms xpm xv xvid zlib video_cards_nvidia linguas_sv linguas_sv-SE
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET

Applying any of the patches fixes it.

------- Comment #8 From Krzysiek Pawlik 2006-01-15 04:25:22 0000 -------
Fixed in 0.2.9.