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

Bug 284478

Summary: kde-base/kcontrol-3.5.10 fails to compile with gcc-4.4
Product: Gentoo Linux Reporter: Vladimir Berezhnoy <non7top>
Component: Current packagesAssignee: Gentoo KDE team <kde>
Status: RESOLVED WORKSFORME    
Severity: normal CC: raxas, rhill, zgredder
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 249226    

Description Vladimir Berezhnoy 2009-09-10 13:26:58 UTC
kde-base/kcontrol-3.5.10 fails to compile with gcc-4.4 but compiles fine with gcc-4.3.4

Reproducible: Always

Steps to Reproduce:

Actual Results:  
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../../..  -DOS_Linux -I./../lib -I./../../fonts -I/usr/kde/3.5/include -I/usr/qt/3/include -I.  -I/usr/include/freetype2  -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -O2 -march=native -pipe -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -c -o Fontmap.o Fontmap.cpp                                          
Fontmap.cpp: In function 'bool parseLine(const char*, QString&, QString&, bool&)':                                                                                                                                   
Fontmap.cpp:68: error: invalid conversion from 'const char*' to 'char*'                                                                                                                                              
Fontmap.cpp: In function 'void addEntry(QStringList&, const QString&, const QString&, const QString&)':                                                                                                              
Fontmap.cpp:199: warning: suggest explicit braces to avoid ambiguous 'else'                                                                                                                                          
Fontmap.cpp: In function 'QString locateFile(const char*, const char*, int)':                                                                                                                                        
Fontmap.cpp:256: warning: suggest explicit braces to avoid ambiguous 'else'                                                                                                                                          
make[4]: *** [Fontmap.o] Error 1                                                                                                                                                                                     
make[4]: Leaving directory `/var/tmp/portage/kde-base/kcontrol-3.5.10/work/kcontrol-3.5.10/kcontrol/kfontinst/kfontinst'                                                                                             
make[3]: *** [all-recursive] Error 1                                                                                                                                                                                 
make[3]: Leaving directory `/var/tmp/portage/kde-base/kcontrol-3.5.10/work/kcontrol-3.5.10/kcontrol/kfontinst'                                                                                                       
make[2]: *** [all-recursive] Error 1                                                                                                                                                                                 
make[2]: Leaving directory `/var/tmp/portage/kde-base/kcontrol-3.5.10/work/kcontrol-3.5.10/kcontrol'                                                                                                                 
make[1]: *** [all-recursive] Error 1                                                                                                                                                                                 
make[1]: Leaving directory `/var/tmp/portage/kde-base/kcontrol-3.5.10/work/kcontrol-3.5.10'                                                                                                                          
make: *** [all] Error 2                               


# emerge --info                            
Portage 2.2_rc40 (default/linux/x86/10.0/desktop, gcc-4.4.1, glibc-2.10.1-r0, 2.6.29-gentoo-r6-home1 i686)
=================================================================                                         
System uname: Linux-2.6.29-gentoo-r6-home1-i686-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 08 Sep 2009 10:30:01 +0000                                                           
distcc 3.1 i686-pc-linux-gnu [disabled]                                                                      
ccache version 2.4 [enabled]                                                                                 
app-shells/bash:     4.0_p28
dev-lang/python:     2.6.2-r1, 3.1.1
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.1
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
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/config /usr/share/hddtemp/"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /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/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/mnt/large/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1"
LINGUAS="ru en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="lzma"
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/layman/berkano /usr/local/portage/layman/swegener /usr/local/portage/layman/hollow /usr/local/portage/layman/zen-overlay /usr/local/portage/layman/sunrise /usr/local/portage/layman/qting-edge /usr/local/portage/layman/vmware /usr/local/portage/layman/kde-testing /usr/local/portage/layman/rion /usr/local/portage/layman/scarabeus /home/non7top/overlays/arcon-hg /home/non7top/overlays/arcon/trunk/arcon-testing"
SYNC="rsync://s/gentoo-portage"
USE="3dfx 3dnow 3dnowext 7zip X a52 aac acpi addbookmarks additions aften aim akode alias alsa amazon amr amrwb ansi apm applet archive artswrappersuid ass atm automount autoreplace avahi bash-completion bashlogger binary-drivers bittorrent branding bzip2 cairo captury cdr cdrkit cgi chm cisco connectionstatus consolekit contactnotes coreavc cracklib crypt css curl custom-optimization dbus deskbar dhcp disk-partition djvu dri dts dvd dvdr eds emboss emovix enca encode epiphany evo exif expat extensions extras faac faad fam fat fbcondecor ffmpeg flac flash fontconfig fortran ftp gd gdbm geoip gif glib glitz gnokii gnome-keyring gnutls gphoto2 gpm gstreamer gtk gzip hal hddtemp highlight history httpd iconv id3 ieee1394 imagemagick imlib inotify insecure-patches isdnlog ithreads jabber javascript jfs jpeg kde kde4 kdeenablefinal lame libass libextractor libnotify lm_sensors logrotate lzma mad maps matroska mikmod mktemp mkvlinks mmx mmxext mng mouse mozdevelop mozilla mp3 mp4 mpeg mplayer mudflap musicbrainz mysql mysqli nas nautilus ncurses network network-cron nls nowlistening nptl nptlonly nsplugin ntfs ntlm nvidia obex ogg opengl openmp openntpd oscar pam passwordsave pcf pch pcre pdf perl php plasma plugins png ppds pppd python qt-copy qt3support qt4 quicktime rdesktop readline reflection samba sasl screen sdl semantic-desktop session sha512 simplexml slang sndfile spell spl sqlite sqlite3 srt srv sse sse2 ssl startup-notification statistics subtitles subversion svg swat sysfs syslog taglib tcpd theora threads threadsafe thumbnail thunar tiff tordns tos tracker translator trayicon truetype unicode upnp urandom usb utempter vim-syntax visualization vnc vorbis wavpack weather web webkit win32codecs winbind wxwindows x264 x86 xcb xcomposite xfs xhtml xine xinetd xml xmlreader xmlrpc xmlwriter xorg xosd xpm xsl xulrunner xv xvid zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse ps2mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en" USERLAND="GNU" VIDEO_CARDS="radeonhd fglrx vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Bartosz Szreder 2009-09-11 11:43:09 UTC
This is due to improvements in handling const-corectness in gcc-4.4
http://gcc.gnu.org/gcc-4.4/porting_to.html

I looked at the code and it's not trivial to fix, because a pointer obtained by strchr function is later manipulated. If it wouldn't be then patching kcontrol would be a simple "char *" => "const char *" conversion.

Gentoo KDE Team: is it worth fixing (if so, I can come up with a patch) or KDE 3 is going to be nuked soon from portage?
Comment 2 Petr Kočmíd 2009-09-11 13:23:22 UTC
since the kde 3.5.10 stuff is alrady in kde-sunset overlay, hopefully to keep it there in working state as long as would be possible, your patch is very welcome :)
Comment 3 Bartosz Szreder 2009-09-11 16:11:39 UTC
kcontrol-3.5.10 compiles fine on my machine with gcc-4.1.1. Please sync your portage tree - there's already a patch for this issue.

I think this can be closed as RESOLVED INVALID?
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2009-09-13 05:03:13 UTC
yep, already fixed.