Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 294750 - kde-base/kdelibs-4.3.1-r2 fails to compile: conflicting types for 'usleep'
Summary: kde-base/kdelibs-4.3.1-r2 fails to compile: conflicting types for 'usleep'
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: x86 Linux
: High major
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-26 19:47 UTC by Curtis Farnham
Modified: 2011-02-03 14:57 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Farnham 2009-11-26 19:47:09 UTC
Trying to upgrade from KDE 4.2 to 4.3 on a mostly stable system.  kde-base/kdelibs-4.3.1-r2 fails to compile, saying:

/tmp/portage/kde-base/kdelibs-4.3.1-r2/work/kdelibs-4.3.1/kdecore/fakes.c:134: error: conflicting types for 'usleep'          
/usr/include/unistd.h:426: error: previous declaration of 'usleep' was here                                                   
make[2]: *** [kdecore/CMakeFiles/kdefakes.dir/fakes.o] Error 1                                                                
make[1]: *** [kdecore/CMakeFiles/kdefakes.dir/all] Error 2   


I found that /usr/include/unistd.h belongs to Glibc (sys-libs/glibc-2.9_p20081201-r2; the latest stable version).  I don't know C, C++, etc, but I browsed the sources of kdelibs and glibc a bit, and it looks like the argument for Glibc's usleep() expects a different data type than Kdelibs wants to provide it.

This bug means I am unable to upgrade to KDE 4.3.1 (or at least not without going to a Testing version of either KDE or Glibc, which I wish to avoid.)


Reproducible: Always

Steps to Reproduce:
1. On a system that uses sys-libs/glibc-2.9_p20081201-r2, emerge kde-base/kdelibs-4.3.1-r2.  (Both packages being the latest stable versions in the Portage tree as of Nov 26, 2009.)

Actual Results:  
Ebuild fails with the aforementioned error.

Expected Results:  
Compile nicely.  :-)

I saw another bug report that indicated kdelibs-4.3 would only compile with USE="-handbook" or equivalent.  I tried this, and still the same error.

My "emerge --info" output is:
Portage 2.1.6.13 (default/linux/x86/10.0/desktop, gcc-4.1.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r8 i686)
=================================================================                                          
System uname: Linux-2.6.30-gentoo-r8-i686-Intel-R-_Pentium-R-_4_CPU_3.00GHz-with-gentoo-1.12.13            
Timestamp of tree: Thu, 26 Nov 2009 16:30:12 +0000                                                         
distcc[9608] (dcc_mkdir) ERROR: mkdir '/root/.distcc/state' failed: No such file or directory [disabled]   
ccache version 2.4 [enabled]                                                                               
app-shells/bash:     4.0_p28                                                                               
dev-java/java-config: 1.3.7-r1, 2.1.9-r1                                                                   
dev-lang/python:     2.4.4-r13, 2.5.4-r3, 2.6.2-r1                                                         
dev-python/pycrypto: 2.0.1-r6                                                                              
dev-util/ccache:     2.4-r7                                                                                
dev-util/cmake:      2.6.4-r3                                                                              
sys-apps/baselayout: 1.12.13                                                                               
sys-apps/sandbox:    1.6-r2                                                                                
sys-devel/autoconf:  2.13, 2.63-r1                                                                         
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                                             
sys-devel/binutils:  2.18-r3                                                                               
sys-devel/gcc-config: 1.4.1                                                                                
sys-devel/libtool:   2.2.6a                                                                                
virtual/os-headers:  2.6.27-r2                                                                             
ACCEPT_KEYWORDS="x86"                                                                                      
CBUILD="i686-pc-linux-gnu"                                                                                 
CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"                                                    
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"   
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /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/splash /etc/terminfo /etc/udev/rules.d"                                                                                                 
CXXFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"                                                                     
DISTDIR="/usr/portage/distfiles"                                                                                              
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"         
GENTOO_MIRRORS="     ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/     http://gentoo.in.th/      http://mirror.pacific.net.au/linux/Gentoo "                                                                                                                 
LANG="en_US"                                                                                                                  
LC_ALL="en_US"                                                                                                                
LDFLAGS="-Wl,-O1"                                                                                                             
LINGUAS="en en_US"                                                                                                            
MAKEOPTS="-j3"                                                                                                                
PKGDIR="/usr/portage/packages"                                                                                                
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi akonadi alsa berkdb branding bzip2 cairo cdr cleartype cli consolekit cracklib crypt cups dbus dri dts dvd dvdr eds emboss encode evo fam firefox flac fortran gdbm gif gnokii google-gadgets gpm gstreamer gtk hal iconv ieee1394 ipv6 jpeg kde kdehiddenvisibility laptop ldap libnotify mad mikmod mmx modules mp3 mp4 mpeg mudflap ncurses networkmanager nls nptl nptlonly ogg opengl openmp openresolv pam pcre pdf perl phonon png ppds pppd python qt3support qt4 quicktime readline reflection rss samba sdl semantic-desktop session spell spl sse sse2 ssl startup-notification svg sysfs tcpd threads thumbnail thunar tiff truetype unicode usb vorbis win32codecs x264 x86 xcomposite xinerama xinetd xml xorg xulrunner xv xvid zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Curtis Farnham 2009-11-26 19:52:22 UTC
(In reply to comment #0)

> This bug means I am unable to upgrade to KDE 4.3.1 (or at least not without
> going to a Testing version of either KDE or Glibc, which I wish to avoid.)

Er, that is, now that there's a stable version of KDE 4 in Portage, I want to upgrade my otherwise-stable system (which is currently running KDE 4.2.x testing version) to it, in order to regain the predominance of Stable packages on my system.  But this bug stands in the way of that.
Comment 2 Maciej Mrozowski gentoo-dev 2009-12-01 00:11:28 UTC
Your you try upgrading gcc first to 4.3.x series?
Comment 3 Curtis Farnham 2009-12-01 05:43:58 UTC
(In reply to comment #2)
> Your you try upgrading gcc first to 4.3.x series?
> 

Genlop tells me I have gcc-4.1.2 and gcc-4.3.4 already installed.  I read the GCC Upgrading page (http://www.gentoo.org/doc/en/gcc-upgrading.xml) and it looks like all I have to do to make it use 4.3.4 is to uninstall 4.1.2.  Is that correct?  And then re-emerge world?  I'm sorry if I'm asking the obvious, but I want to make sure I don't overlook something that would break my system.

Thanks,
Curtis
Comment 4 Curtis Farnham 2009-12-01 05:54:11 UTC
Never mind my previous question about how to upgrade GCC properly.  I took a second look at Part 2 on that guide, the General Upgrading Instructions.  I am following it right now.  It'll take me 1 or 2 days to get through 'emerge -e world', but I'll report back when I know if the GCC upgrade solved the kdelibs problem.

Comment 5 Maciej Mrozowski gentoo-dev 2009-12-01 20:15:43 UTC
In this case just switching to 4.3.4 as system compiler should work, but to be safe you can still rebuild system with it. 4.1.2 is known to cause various miscompilations with KDE4.
Comment 6 Curtis Farnham 2009-12-03 05:30:03 UTC
(In reply to comment #5)
> In this case just switching to 4.3.4 as system compiler should work, but to be
> safe you can still rebuild system with it. 4.1.2 is known to cause various
> miscompilations with KDE4.
> 

Problem solved.  Switching to gcc-4.3.4 worked.  Thanks for your help!  :-)

What could/should be done to prevent this from happening for other users?  Can the ebuilds for kdelibs-4.3 and later be modified so they require being compiled with something later than gcc-4.1.2?


Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2009-12-03 09:03:07 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > In this case just switching to 4.3.4 as system compiler should work, but to be
> > safe you can still rebuild system with it. 4.1.2 is known to cause various
> > miscompilations with KDE4.
> > 
> 
> Problem solved.  Switching to gcc-4.3.4 worked.  Thanks for your help!  :-)
> 
> What could/should be done to prevent this from happening for other users?  Can
> the ebuilds for kdelibs-4.3 and later be modified so they require being
> compiled with something later than gcc-4.1.2?
> 

- They could but GCC 4.3 is part of /stable toolchain/ in Gentoo
+- anything older than that is completely unsupported, and if used, people are on their own

Anyway, thanks for verifying it works.
Comment 8 Kamen Dokov 2011-02-03 14:57:33 UTC
I have a similar issue and using 
# gcc-config -l
 [1] x86_64-pc-linux-gnu-4.5.2 * :


/var/tmp/portage/kde-base/kdelibs-4.6.0-r1/work/kdelibs-4.6.0/kdecore/fakes.c: In function ‘strlcat’:
/var/tmp/portage/kde-base/kdelibs-4.6.0-r1/work/kdelibs-4.6.0/kdecore/fakes.c:430:23: warning: incompatible implicit declaration of built-in function ‘strlen’
make[2]: *** [kdecore/CMakeFiles/kdefakes.dir/fakes.o] Error 1
make[1]: *** [kdecore/CMakeFiles/kdefakes.dir/all] Error 2