Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308903 - kde-4.4.4: multiple TOCs issue with kmail and kstars on PPC64, compilation fails
Summary: kde-4.4.4: multiple TOCs issue with kmail and kstars on PPC64, compilation fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: PPC64 Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 313999
  Show dependency tree
 
Reported: 2010-03-10 21:50 UTC by Andreas Thalhammer
Modified: 2010-06-22 16:23 UTC (History)
3 users (show)

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


Attachments
patched ebuild (kmail-4.3.3.ebuild,1.72 KB, text/plain)
2010-03-10 21:52 UTC, Andreas Thalhammer
Details
emerge output when compilation fails (emerge.log,143.17 KB, text/plain)
2010-03-10 21:55 UTC, Andreas Thalhammer
Details
portage tree patch, kmail-4.4.4 and kstars-4.4.4 (kde-ppc64-toc.patch,1.26 KB, patch)
2010-06-13 19:05 UTC, Andreas Thalhammer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Thalhammer 2010-03-10 21:50:32 UTC
Similar failure as mentioned in bug #241900 (and as mentioned in comment 10 of bug 241900):

When the linking takes place, errors similar to the following keep showing up and the emerge (naturally) fails:
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kmailprivate.dir/kmfolderindex.o(.text+0xbf4): sibling call optimization to `QString::~QString()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `QString::~QString()' extern

After applying a similar patch as provided by Stefan Nürnberger in bug #241900 I was able to emerge kmail successfully. (see next attachment)

Cheers,
Andreas.
Comment 1 Andreas Thalhammer 2010-03-10 21:52:41 UTC
Created attachment 223079 [details]
patched ebuild

Just included the following:

src_unpack() {
	# workaround for a bug similar to bug 241900
	if [ ${ARCH} == ppc64 ];
	then
		append-flags "-mminimal-toc"
	fi

	kde4-meta_src_unpack
}
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2010-03-10 21:54:32 UTC
4.3.5 is about to be stabilized on PowerPC/PowerPC64 so you might want to try it instead. 

Adding ppc64@ to CC.
Comment 3 Andreas Thalhammer 2010-03-10 21:55:10 UTC
Created attachment 223081 [details]
emerge output when compilation fails

This is the ouput I see with the in-tree ebuild on my computer (PPC64).
Comment 4 Andreas Thalhammer 2010-03-10 22:22:54 UTC
The same workaround (a patched ebuild) worked for me with kde-base/kstars-4.3.3, which has the same complaints about TOCs when linking.

comment #2 by Samuli:
Will check it out when it becomes stable. Since it is all now working properly I'll keep it that way for now. (Too much unmasking to do for KDE-4.3.5, I'll wait for it to be stable...)

Thanks!
Comment 5 Mounir Lamouri (volkmar) (RETIRED) gentoo-dev 2010-03-11 00:38:33 UTC
Adding rangerpb in CC as he wants to work on KDE-4.3.5 stuff for ppc/ppc64.
Comment 6 Brent Baude (RETIRED) gentoo-dev 2010-03-11 16:16:52 UTC
Andreas, was kmail the only package in the kde-4.3.5 "suite" that had TOC failures?
Comment 7 Andreas Thalhammer 2010-03-11 18:02:28 UTC
(In reply to comment #6)
> Andreas, was kmail the only package in the kde-4.3.5 "suite" that had TOC
> failures?
 
I'm now with KDE-4.3.3:
Two packages only: kmail and kstars
I was able to fix it by adding the "-mminimal-toc" flag in both ebuilds.

Surprisingly all other packages in the kde suite compiled just fine.
Comment 8 Andreas Thalhammer 2010-03-12 14:21:48 UTC
My heart aches today. As I turned on my Power Mac G5 this morning -- the Late 2005 model with PCIe and one Dual-Core 2.0 GHz PowerPC 970 CPU -- I heared a load "bang" and that was it. It was a sudden death... (My guess is the power supply is broken.)

Sorry, I cannot continue with feedback on this bug. You may change the status to WONTFIX if you like, do as you see fit.

Thanks,
Andreas.
Comment 9 Brent Baude (RETIRED) gentoo-dev 2010-03-13 16:34:43 UTC
Andreas, sorry to hear about your mac.  Thanks for your input and we'll keep this bug.  Being that it is only the two packages, it's worth just fixing the ebuilds.
Comment 10 Andreas K. Hüttel archtester gentoo-dev 2010-04-09 22:14:38 UTC
Does anyone know about the status of this for kde-4.4.2?
Comment 11 Andreas K. Hüttel archtester gentoo-dev 2010-06-05 12:57:33 UTC
ppc64 team- ping: anything we should know about this issue before starting the stable process for 4.4.4?
Comment 12 Andreas Thalhammer 2010-06-05 17:30:51 UTC
Hey there! I just wanted to report back, my Power Mac G5 is running again, so if you want me to test anyting, or if you need anything, let me know.
Comment 13 Andreas K. Hüttel archtester gentoo-dev 2010-06-06 16:32:06 UTC
(In reply to comment #12)
> Hey there! I just wanted to report back, my Power Mac G5 is running again, so
> if you want me to test anyting, or if you need anything, let me know.
> 

Well if you feel like it, try to emerge kde-meta-4.4.4 and tell us about the results! :)

This is the version that will be stabled so we're glad about all feedback that we can get, especially from the non-intel arches...

Comment 14 Andreas Thalhammer 2010-06-12 18:07:39 UTC
(In reply to comment #13)
> Well if you feel like it, try to emerge kde-meta-4.4.4 and tell us about the
> results! :)

x11-libs/qt-webkit-4.6.3 (dependency of KDE) failed:

<snip>
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: BFD (GNU Binutils) 2.19.1 internal error, aborting at /var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/binutils-2.19.1/bfd/elf64-ppc.c line 5545 in ppc64_elf_gc_sweep_hook

/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: Please report this bug.

collect2: ld gab 1 als Ende-Status zurück
make: *** [../../../../lib/libQtWebKit.so.4.6.3] Fehler 1
 * ERROR: x11-libs/qt-webkit-4.6.3 failed:
 *   emake failed
 *
 * Call stack:
 *     ebuild.sh, line   54:  Called src_compile
 *   environment, line 3425:  Called qt4-build_src_compile
 *   environment, line 3073:  Called build_directories 'src/3rdparty/webkit/WebCore' 'tools/designer/src/plugins/qwebview'
 *   environment, line  630:  Called die
 * The specific snippet of code:
 *           emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" LINK="$(tc-getCXX)" || die "emake failed";
 *
 * If you need support, post the output of 'emerge --info =x11-libs/qt-webkit-4.6.3',
 * the complete build log and the output of 'emerge -pqv =x11-libs/qt-webkit-4.6.3'.
 * The complete build log is located at '/var/log/portage/x11-libs:qt-webkit-4.6.3:20100612-100708.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-libs/qt-webkit-4.6.3/temp/environment'.
 * S: '/var/tmp/portage/x11-libs/qt-webkit-4.6.3/work/qt-everywhere-opensource-src-4.6.3'

>>> Failed to emerge x11-libs/qt-webkit-4.6.3, Log file:

>>>  '/var/log/portage/x11-libs:qt-webkit-4.6.3:20100612-100708.log'
</snip>

This was fixed with ACCEPT_KEYWORDS="~ppc64" emerge -1 sys-devel/binutils
<snip>
Calculating dependencies... done!
[ebuild     U ] sys-devel/binutils-2.20.1-r1 [2.19.1-r1] USE="nls -multislot -multitarget -test -vanilla" 17,106 kB

Total: 1 package (1 upgrade), Size of downloads: 17,106 kB
</snip>
Comment 15 Andreas Thalhammer 2010-06-12 18:08:36 UTC
<snip>
[ 99%] Building CXX object kstars/kstars/CMakeFiles/kstars.dir/comast/execute.o                                                           
[ 99%] Building CXX object kstars/kstars/CMakeFiles/kstars.dir/kstarsadaptor.o                                                            
[ 99%] Building CXX object kstars/kstars/CMakeFiles/kstars.dir/simclockadaptor.o                                                          
[100%] Building CXX object kstars/kstars/CMakeFiles/kstars.dir/Options.o                                                                  
Linking CXX executable kstars                                                                                                             
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kstars.dir/dialogs/addcatdialog.o(.text+0x1afc): sibling call optimization to `i18n(char const*)' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `i18n(char const*)' extern                                                                           
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kstars.dir/dialogs/addcatdialog.o(.text+0x1b4c): sibling call optimization to `QString::operator+=(char const*)' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `QString::operator+=(char const*)' extern                                             
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kstars.dir/dialogs/addcatdialog.o(.text+0x1c68): sibling call optimization to `i18n(char const*)' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `i18n(char const*)' extern                                                                           
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kstars.dir/dialogs/addcatdialog.o(.text+0x1c84): sibling call optimization to `QString::~QString()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `QString::~QString()' extern                                                                       
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kstars.dir/dialogs/addcatdialog.o(.text+0x1c98): sibling call optimization to `i18n(char const*)' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `i18n(char const*)' extern                                                                           
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kstars.dir/dialogs/addcatdialog.o(.text+0x1cb4): sibling call optimization to `QString::~QString()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `QString::~QString()' extern                                                                       
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kstars.dir/dialogs/addcatdialog.o(.text+0x1cc8): sibling call optimization to `QString::operator+=(char const*)' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `QString::operator+=(char const*)' extern                                             
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kstars.dir/dialogs/addcatdialog.o(.text+0x1cd8): sibling call optimization to `QString::operator+=(char const*)' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `QString::operator+=(char const*)' extern                                             
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kstars.dir/dialogs/addcatdialog.o(.text+0x1ce8): sibling call optimization to `i18n(char const*)' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `i18n(char const*)' extern                                                                           
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kstars.dir/dialogs/addcatdialog.o(.text+0x1d04): sibling call optimization to `QString::~QString()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `QString::~QString()' extern                                                                       
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kstars.dir/dialogs/addcatdialog.o(.text+0x1d18): sibling call optimization to `QString::operator+=(char const*)' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `QString::operator+=(char const*)' extern                                             
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kstars.dir/dialogs/addcatdialog.o(.text+0x2260): sibling call optimization to `i18n(char const*)' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `i18n(char const*)' extern
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kstars.dir/dialogs/addcatdialog.o(.text+0x24bc): sibling call optimization to `i18n(char const*)' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `i18n(char const*)' extern
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [kstars/kstars/kstars] Fehler 1
make[1]: *** [kstars/kstars/CMakeFiles/kstars.dir/all] Fehler 2
make: *** [all] Fehler 2
 * ERROR: kde-base/kstars-4.4.4 failed:
 *   Make failed!
 *
 * Call stack:
 *     ebuild.sh, line   54:  Called src_compile
 *   environment, line 4189:  Called kde4-meta_src_compile
 *   environment, line 3274:  Called kde4-base_src_compile
 *   environment, line 2932:  Called cmake-utils_src_compile
 *   environment, line 1115:  Called _execute_optionaly 'src_compile'
 *   environment, line  531:  Called enable_cmake-utils_src_compile
 *   environment, line 1480:  Called cmake-utils_src_make
 *   environment, line 1134:  Called die
 * The specific snippet of code:
 *           emake "$@" || die "Make failed!";
 *
 * If you need support, post the output of 'emerge --info =kde-base/kstars-4.4.4',
 * the complete build log and the output of 'emerge -pqv =kde-base/kstars-4.4.4'.
 * The complete build log is located at '/var/log/portage/kde-base:kstars-4.4.4:20100612-161611.log'.
 * The ebuild environment file is located at '/var/tmp/portage/kde-base/kstars-4.4.4/temp/environment'.
 * S: '/var/tmp/portage/kde-base/kstars-4.4.4/work/kstars-4.4.4'

>>> Failed to emerge kde-base/kstars-4.4.4, Log file:

>>>  '/var/log/portage/kde-base:kstars-4.4.4:20100612-161611.log'

 * Regenerating GNU info directory index...

 * IMPORTANT: 2 config files in '/etc' need updating.

 * IMPORTANT: 11 config files in '/usr/share/config' need updating.
 * See the CONFIGURATION FILES section of the emerge
</snip>

I _just_ hit this already known issue, trying to emerge kde-base/kde-meta-4.4.4.
I now continue with the rest (emerge --resume --skipfirst) to see if I also hit this with kmail again.
Comment 16 Maciej Mrozowski gentoo-dev 2010-06-12 19:52:00 UTC
Is there a possibility more recent gcc (4.4.x) would fix it?
Comment 17 Maciej Mrozowski gentoo-dev 2010-06-13 01:56:11 UTC
Does -fno-optimize-sibling-calls fix it for you? It seems to be less performance hitting candidate (than -mminimal-toc) to be globally enabled.
Comment 18 Andreas Thalhammer 2010-06-13 11:28:18 UTC
Finished with most of KDE, and I can confirm this issue only with kmail and kstarts.

<snip>
[ 92%] Building CXX object kmail/CMakeFiles/kmailprivate.dir/templatesconfiguration_kfg.o                                                 
[ 92%] Building CXX object kmail/CMakeFiles/kmailprivate.dir/customtemplates_kfg.o                                                        
Linking CXX shared library ../lib/libkmailprivate.so                                                                                      
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kmailprivate.dir/kmfolderindex.o(.text+0x95c): sibling call optimization to `QVector<KMMsgBase*>::realloc(int, int)' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `QVector<KMMsgBase*>::realloc(int, int)' extern                                   
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kmailprivate.dir/kmfolderindex.o(.text+0xce4): sibling call optimization to `QString::~QString()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `QString::~QString()' extern                                                                         
… snip …
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: CMakeFiles/kmailprivate.dir/kmfolderindex.o(.text+0x48dc): sibling call optimization to `QString::~QString()' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `QString::~QString()' extern
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/../../../../powerpc64-unknown-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [lib/libkmailprivate.so.4.4.0] Fehler 1
make[1]: *** [kmail/CMakeFiles/kmailprivate.dir/all] Fehler 2
make: *** [all] Fehler 2
 * ERROR: kde-base/kmail-4.4.4 failed:
 *   Make failed!
 *
 * Call stack:
 *     ebuild.sh, line   54:  Called src_compile
 *   environment, line 4259:  Called kde4-meta_src_compile
 *   environment, line 3333:  Called kde4-base_src_compile
 *   environment, line 2991:  Called cmake-utils_src_compile
 *   environment, line 1174:  Called _execute_optionaly 'src_compile'
 *   environment, line  590:  Called enable_cmake-utils_src_compile
 *   environment, line 1539:  Called cmake-utils_src_make
 *   environment, line 1193:  Called die
 * The specific snippet of code:
 *           emake "$@" || die "Make failed!";
 *
 * If you need support, post the output of 'emerge --info =kde-base/kmail-4.4.4',
 * the complete build log and the output of 'emerge -pqv =kde-base/kmail-4.4.4'.
 * The complete build log is located at '/var/log/portage/kde-base:kmail-4.4.4:20100613-100219.log'.
 * The ebuild environment file is located at '/var/tmp/portage/kde-base/kmail-4.4.4/temp/environment'.
 * S: '/var/tmp/portage/kde-base/kmail-4.4.4/work/kmail-4.4.4'

>>> Failed to emerge kde-base/kmail-4.4.4, Log file:
</snip>

I'll try the gcc update next…
Comment 19 Andreas Thalhammer 2010-06-13 17:23:10 UTC
Tried with sys-devel/gcc-4.4.3-r2 (which is the current stable version on amd64/x86): no luck, same errors.

Will try now -fno-optimize-sibling-calls (as workaround in the ebuild itself)…
Comment 20 Andreas Thalhammer 2010-06-13 19:05:21 UTC
Created attachment 235205 [details, diff]
portage tree patch, kmail-4.4.4 and kstars-4.4.4

Nope. Only -mminimal-toc fixes this issue.

Doesn't anyone from the ppc64-devs use KDE? I can hardly believe that I am the only one using profile default/linux/powerpc/ppc64/10.0/64bit-userland/desktop/kde…

Anyway, here is the patch for the portage tree. Hope this helps…
Comment 21 Andreas Thalhammer 2010-06-13 19:12:06 UTC
Because I don't really understand this, I'll just ask like a newbie:

If this is really just an issue with KMail and KStars, should it be reported and fixed upstream? It cannot be a general KDE issue, since most stuff and especially kdelibs compiles fine.

If you need anything, let me know. I also have all the build logs if you should need them.
Comment 22 Andreas Thalhammer 2010-06-16 15:16:45 UTC
Well, everything seemed to be fine, until I tried to write+send an email.

I get error messages like this (every second or so) on the console:
---- snap ----
kmail(7483)/libakonadi Akonadi::SessionPrivate::socketError: Socket error occurred: "QLocalSocket::connectToServer: Invalid name" 
---- snap ----

The number in the brackets after “kmail” is different after restarting it, but not always. ???


KMail freezes completely (both windows, the main KMail window and the window for answering/writing a message), in two cases:
* after a time period which seems to be between 1-3 minutes,
* when hitting the “send” button


This is a similar bug:
http://www.mail-archive.com/kdepim-bugs@kde.org/msg33220.html

Mine is different though because it also freezes after a short period of time.
The akondiserver workaround (kill all adondi stuff), as suggested by the mentioned similar bug, did't work for me.


Anyway, this can be but doesn't have to be related to this bug.

Cheers,
Andreas.
Comment 23 Andreas K. Hüttel archtester gentoo-dev 2010-06-16 19:28:07 UTC
(In reply to comment #20)
> Created an attachment (id=235205) [details]
> portage tree patch, kmail-4.4.4 and kstars-4.4.4
> 
> Nope. Only -mminimal-toc fixes this issue.
> 
> Anyway, here is the patch for the portage tree. Hope this helps…
> 

Any particular reason why the append-flags is done in src_unpack? I'd guess that src_configure would be the right place...
Comment 24 Andreas Thalhammer 2010-06-17 04:46:23 UTC
(In reply to comment #23)

> Any particular reason why the append-flags is done in src_unpack? I'd guess
> that src_configure would be the right place...

I just copied the solution from bug 241900 with no modification. Sorry if this is not the correct way. Feel free to adjust and correct it.
Comment 25 Maciej Mrozowski gentoo-dev 2010-06-22 16:23:23 UTC
Added use ppc64 && append-flags -mminimal-toc for kmail and kstars, please report any other similar issues in separate bug.

Thanks for reporting!