Having upgraded to glibc-2.4-r1 and rebuilt world [emerge -e system; emerge -e world], KDE packages would not compile because UIC segfaulted during econf (see http://bugs.gentoo.org/show_bug.cgi?id=126078 for similar case). I found that the packages can be compiled if qt-3.3.6 was built with USE="debug", but now KDE can't be started. With DISPLAYMANAGER="kdm", X dies on startup. Here's /var/log/kdm.log: X Window System Version 7.0.0 Release Date: 21 December 2005 X Protocol Version 11, Revision 0, Release 7.0 Build Operating System:Linux 2.6.15-gentoo-r7 i686 Current Operating System: Linux pengi 2.6.16-gentoo #1 PREEMPT Mon Mar 27 16:13:42 GMT 2006 i686 Build Date: 25 March 2006 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Module Loader present Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/var/log/Xorg.0.log", Time: Tue Mar 28 12:36:58 2006 (==) Using config file: "/etc/X11/xorg.conf" Synaptics DeviceInit called SynapticsCtrl called. The XKEYBOARD keymap compiler (xkbcomp) reports: > Warning: Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols > Ignoring extra symbols Errors from xkbcomp are not fatal to the X server Synaptics DeviceOn called kdmgreet: WARNING: KLocale: trying to look up "" in catalog. Fix the program Synaptics DeviceOff called FreeFontPath: FPE "/usr/share/fonts/misc" refcount is 2, should be 1; fixing. With DISPLAYMANAGER="xdm", my user can login, and X stays up, but just with a black screen, console log window (no output), and mouse cursor. Here's ~/.xsession-errors xset: bad font path element (#76), possible causes are: Directory does not exist or has wrong permissions Directory missing fonts.dir Incorrect font server address or syntax xset: bad font path element (#76), possible causes are: Directory does not exist or has wrong permissions Directory missing fonts.dir Incorrect font server address or syntax startkde: Starting up... Warning: connect() failed: : Connection refused KCrash: Application 'ksplash' crashing... Warning: connect() failed: : Connection refused KCrash cannot reach kdeinit, launching directly. Emerge --info: Gentoo Base System version 1.12.0_pre16 Portage 2.1_pre6-r7 (default-linux/x86/2005.0, gcc-4.1.0, glibc-2.4-r1, 2.6.16-gentoo i686) ================================================================= System uname: 2.6.16-gentoo i686 Intel(R) Celeron(R) CPU 2.60GHz dev-lang/python: 2.4.2-r1 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-Os -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -fomit-frame-pointer -pipe -ffast-math -w" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/make.conf /usr/NX/etc /usr/NX/home /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-Os -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -fomit-frame-pointer -pipe -ffast-math -w" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/" LINGUAS="en" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage" USE="x86 X a52 aac acpi alsa apache2 apm arts asf avi berkdb bitmap-fonts bluetooth bzip2 cairo cdparanoia cdr crypt cups dbus dio doc dri dvd dvdread eds emboss encode ffmpeg flac flash foomaticdb fortran gdbm gif gpm gstreamer gtk2 hal i8x0 ieee1394 imagemagick imlib innodb ipv6 java javascript jpeg kde libg++ libwww mad matroska mikmod mmx motif mp3 mpeg msn mysql mysqli ncurses nls nptl nptlonly nsplugin odbc ogg oggvorbis opengl oss pam pcmcia pcre pdflib perl php png ppds python qt quicktime readline samba sdl session sharedmem soap sockets spell sse sse2 ssl svg tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb utf8 vcd vhosts vorbis wifi win32codecs xine xml2 xmlrpc xmms xsl xv xvid xvmc zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_synaptics kernel_linux linguas_en userland_GNU video_cards_i810 video_cards_fbdev video_cards_vesa" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS Steps to reproduce: 1. emerge -C kdebase-startkde; emerge --depclean; emerge -C kdelibs qt 2. echo "x11-libs/qt debug" >>/etc/portage/package.use 3. emerge kdebase-startkde
Three changes made but the disposition of my system is still the same. 1) Removed "debug" flag and rebuilt qt 2) Rebuilt qt with less aggressive C[XX]FLAGS="-O2 -march=pentium4 -pipe" 3) KDE upgraded to 3.5.2 All behaviour/messages observed at startup remain as before. This does beg the question of whether the KDE-apps are indeed miscompiled, or whether it's a problem with the interaction between startkde and X11R7. But would this cause KCrash to report the programs were "crashing"? I had assumed this word denoted a segfault or similar type of crash. Can anyone advise?
I've heard that this may be caused using -Os with GCC 4.1.0 I'm experiencing the same problem and I'm attempting to fix it
(In reply to comment #2) > I've heard that this may be caused using -Os with GCC 4.1.0 > > I'm experiencing the same problem and I'm attempting to fix it > Hi Michael As I mentioned above, the condition is the same with -O2; would it be worth trying with -O3 also? (What I'm asking is, based on what you have heard, is that a logical step?) I'd also like to know what steps I can take to get more useful error-reporting. There's so little useful output right now (unless there is somewhere else I'm not looking).
-O2 would most likely be more stable than -O3. Can you try running the failing programs in gdb. Perhaps we can get a useful backtrace.
Okay, I just emerged gdb and have not used it before, so forgive me if I'm on a bit of a learning-curve. I did gdb sh ...and then... (gdb) run /usr/kde/3.5/bin/startkde Starting program: /bin/sh /usr/kde/3.5/bin/startkde (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) xset: bad font path element (#76), possible causes are: Directory does not exist or has wrong permissions Directory missing fonts.dir Incorrect font server address or syntax startkde: Starting up... startkde: Running kpersonalizer... Session management error: Authentication Rejected, reason : None of the authenti cation protocols specified are supported and host-based authentication failed Session management error: Authentication Rejected, reason : None of the authenti cation protocols specified are supported and host-based authentication failed KCrash: Application 'kpersonalizer' crashing... Warning: connect() failed: : No such file or directory KCrash cannot reach kdeinit, launching directly. KCrash: Application 'kwin' crashing... Warning: connect() failed: : No such file or directory KCrash cannot reach kdeinit, launching directly. call failed Session management error: Authentication Rejected, reason : None of the authenti cation protocols specified are supported and host-based authentication failed KCrash: Application 'ksplash' crashing... KCrash cannot reach kdeinit, launching directly. Warning: connect() failed: : Connection refused Will be happy to run some individual binaries too, but though this was the best place to start. Does it help?
Sorry, the debug above isn't analogous to the previous output, because this time I was running startkde from root. I recompiled kdelibs, kwin, kdm, ksplash and kpersonalizer with +debug, but the output with gdb was exactly the same! sh startkde (as user this time): robin@pengi ~ $ gdb sh GNU gdb 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run startkde Starting program: /bin/sh startkde (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) xset: bad font path element (#76), possible causes are: Directory does not exist or has wrong permissions Directory missing fonts.dir Incorrect font server address or syntax xset: bad font path element (#76), possible causes are: Directory does not exist or has wrong permissions Directory missing fonts.dir Incorrect font server address or syntax startkde: Starting up... KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = ksplash path = <unknown> pid = 27012 Warning: connect() failed: : No such file or directory KCrash cannot reach kdeinit, launching directly. kdeinit: Pipe closed unexpectedly: No such file or directory kdeinit: Launched DCOPServer, pid = 27016 result = 1 kdeinit: DCOPServer could not be started, aborting. Warning: connect() failed: : Connection refused kdeinit: Pipe closed unexpectedly: No such file or directory kdeinit: Launched DCOPServer, pid = 27020 result = 1 kdeinit: DCOPServer could not be started, aborting. Could not register with DCOPServer. Aborting. ERROR: Couldn't attach to DCOP server! startkde: Shutting down... Warning: connect() failed: : Connection refused Error: Can't contact kdeinit! startkde: Running shutdown scripts... startkde: Done. Program exited normally. (gdb) quit There was also a motif popup error-dialog saying something about the DCOPserver, which unfortunately I wasn't able to transcribe at the time (will do so later). ksplash: (gdb) run Starting program: /usr/kde/3.5/bin/ksplash (no debugging symbols found) ...snip x30 or so... (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread 1857033904 (LWP 26960)] Program exited normally. (gdb) DCOPClient::attachInternal. Attach failed Could not open network socket DCOPClient::attachInternal. Attach failed Could not open network socket DCOPClient::attachInternal. Attach failed Could not open network socket DCOPClient::attachInternal. Attach failed Could not open network socket DCOPClient::attachInternal. Attach failed Could not open network socket DCOPClient::attachInternal. Attach failed Could not open network socket kio (KSycoca): Trying to open ksycoca from /var/tmp/kdecache-robin/ksycoca kio (KTrader): query for KSplash/Plugin : returning 1 offers KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = ksplash path = <unknown> pid = 26963 Warning: connect() failed: : No such file or directory KCrash cannot reach kdeinit, launching directly. Quit (gdb) quit kwin: robin@pengi ~ $ gdb kwin GNU gdb 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run Starting program: /usr/kde/3.5/bin/kwin (no debugging symbols found) ...snip... (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread 1859786416 (LWP 8131)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1859786416 (LWP 8131)] 0x6ed9f36c in alphaBlendColors () from /usr/kde/3.5/lib/kde3/plugins/styles/plastik.so This last error I also got with kpersonalizer. kdm exited normally. Hope this gives better clues. BTW, why are these apps still spewing so many 'no debugging symbols' messages?
Here's that dialog box: There was an error setting up inter-process communications for KDE. The message returned by the system was: Could not read network connection list. /home/robin/.DCOPserver_pengi___0 Please check that the "dcopserver" program is running!
So it's crashing when starting up. Are you able to manually start up some of the kde related programs? One of them looks to be crashing. That's the one we need to investigate. Have a look through startkde and see if you can try manually starting a few of the processes it does.
Will do - later tonight hopefully, in the meantime I'm taking your advice (from bug #81066) and doing another emerge -e world. Regarding which apps are crashing, some things such as ksmserver or kdm may keep running (albeit not doing anything useful). They remain in the process list, whereas kwin, ksplash, kpersonalizer just die. Will be back with more info once I've looked over startkde again.
OK very strange. I think I've pinpointed the promlem. Namely Keramic When Plastik is set KDE loads up perfectly and if you try and change the setting kcontrol crashes Any one know what could be causing this? Mike
Mike, Have a look at #6. I have plastik set and am having the problem. I do think it is theme-related (or with the building of themes), but not that it's linked to a particular one.
V strange just changed -Os to -O2 and did a revdep-rebuild --library libqt.*.*.*.* Now everything seems to work fine Mike
(In reply to comment #8) > So it's crashing when starting up. > > Are you able to manually start up some of the kde related programs? One of > them looks to be crashing. That's the one we need to investigate. > > Have a look through startkde and see if you can try manually starting a few of > the processes it does. > Okay, I read through startkde and edited some markers into it. That tells me where the first section of error output (not counting the 'bad font path' errors, which I'mm sure are non-fatal) occurs. So this section of the script... # We set LD_BIND_NOW to increase the efficiency of kdeinit. # kdeinit unsets this variable before loading applications. LD_BIND_NOW=true kdeinit +kcminit if test $? -ne 0; then # Startup error echo 'startkde: Could not start kdeinit. Check your installation.' 1>&2 xmessage -geometry 500x100 "Could not start kdeinit. Check your installation." fi ...causes this output... kdeinit: Pipe closed unexpectedly: No such file or directory kdeinit: Launched DCOPServer, pid = 8142 result = 1 kdeinit: DCOPServer could not be started, aborting. Does this help at all? Running kdeinit +kcminit in gdb just gives the same output as above. As you'll see above, I have already identified segfaults in kwin and kpersonalizer...
Looks like I may have overcome this one. I rebuilt the core packages with reduced flags, as follows: CFLAGS="-O2 -pipe -march=pentium4" CXXFLAGS="${CXXFLAGS}" emerge --oneshot kcminit kdm ksplashml kwin That was enough to get through KDM and the Desktop up, though there remain a number of other apps to be rebuilt. If successful I'll let you know.
I've been able to get all of KDE running again by using -O2 instead of -Os. This fix also worked with building the latest python, and there were a couple of others (non-KDE) but I forget which. It seems to be a larger issue with the use of -Os possibly related to glibc-2.4 or gcc-4, but it will definitely affect all KDE GUI apps built with UIC - question is, will it do so with other Qt apps?
I am having this kind of problem too but just when I build an app with debug especially with kdevelop when I build the lastest svn with debug (yes the svn ebuild is not in portage...) kdevelop keep on crashing (and QDataStream seems to work wrong, often) but when I built it without debug everything works fine I wonder why this only happens on gentoo systems a friend of mine has the same problem, but I never found a guy with another distro who has this problem gcc-4.1.1, glibc-2.5, qt-3.3.6-r4(with debug) CFLAGS="-march=athlon64 -O2 -pipe" CBUILD="x86_64-pc-linux-gnu" I would be happy if you could give me a hint to fix this :)
Is this still a problem with current versions?
No, it works fine for me. It wasnt a qt problem anyway, it was just an uninitialized used variable which cause the problem for me in in kdevelop. So from my point of view the bug is invalid.
This was most likely caused by the combination of the old versions no longer in Portage and CFLAGS.