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

Bug 60678

Summary: Segmentation fault compiling QT under PPC (without /usr/qt tree)
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: [OLD] LibraryAssignee: Gentoo KDE team <kde>
Status: VERIFIED FIXED    
Severity: major CC: ppc
Priority: High    
Version: unspecified   
Hardware: PPC   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Complete log of the ebuild

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2004-08-17 08:28:57 UTC
Trying to compile QT under PPC (on an Apple iBook with Gentoo Linux ~ppc completely updated), I have a segfault in the compilation of cppeditor:

I haven't the /usr/qt tree.

Reproducible: Always
Steps to Reproduce:
1. Type 'emerge qt' command
2. Read The Lord of the Rings until emerge stops
3. See the result.
Actual Results:  
g++ -c -pipe -fno-exceptions -Wall -W -O2 -D_REENTRANT -fPIC  
-DQT_INTERNAL_XML -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_ 
PLUGIN -DQT_SHARED 
-I/var/tmp/portage/qt-3.3.3/work/qt-x11-free-3.3.3/mkspecs/linux-g++ -I. 
-I/usr/include/freetype2 -I../../interfaces -I. 
./../../../include -I/usr/X11R6/include -I.moc/release-shared-mt/ 
-o .obj/release-shared-mt/dlg2ui.o dlg2ui.cpp 
/var/tmp/portage/qt-3.3.3/work/qt-x11-free-3.3.3/bin/uic 
-L /var/tmp/portage/qt-3.3.3/work/qt-x11-free-3.3.3/plugins projectsettings.ui 
-i 
projectsettings.h -o projectsettings.cpp 
make[4]: *** [projectsettings.cpp] Segmentation fault 
make[4]: *** Deleting file `projectsettings.cpp' 
make[4]: Leaving directory 
`/var/tmp/portage/qt-3.3.3/work/qt-x11-free-3.3.3/tools/designer/plugins/cppeditor' 
make[3]: *** [sub-cppeditor] Error 2 
make[3]: *** Waiting for unfinished jobs.... 
test -d ../../../../plugins/designer/ || mkdir 
-p ../../../../plugins/designer/ 
rm -f libdlgplugin.so 
g++ -fno-exceptions  -Wl,-rpath,/usr/qt/3/lib -shared 
-Wl,-rpath,/var/tmp/portage/qt-3.3.3/work/qt-x11-free-3.3.3/plugins/designer 
-o libdl 
gplugin.so .obj/release-shared-mt/main.o .obj/release-shared-mt/dlg2ui.o   
-L/var/tmp/portage/qt-3.3.3/work/qt-x11-free-3.3.3/lib -L/usr/X1 
1R6/lib -lqt-mt -lmng -ljpeg -lpng -lz -lXi -lXrender -lXrandr -lXcursor -lXft 
-lfreetype -lfontconfig -lXext -lX11 -lm -lSM -lICE -ldl -lp 
thread 
mv -f libdlgplugin.so ../../../../plugins/designer/ 
make[4]: Leaving directory 
`/var/tmp/portage/qt-3.3.3/work/qt-x11-free-3.3.3/tools/designer/plugins/dlg' 
make[3]: Leaving directory 
`/var/tmp/portage/qt-3.3.3/work/qt-x11-free-3.3.3/tools/designer/plugins' 
make[2]: *** [sub-plugins] Error 2 
make[2]: Leaving directory 
`/var/tmp/portage/qt-3.3.3/work/qt-x11-free-3.3.3/tools/designer' 
make[1]: *** [sub-designer] Error 2 
make[1]: Leaving directory 
`/var/tmp/portage/qt-3.3.3/work/qt-x11-free-3.3.3/tools' 
make: *** [sub-tools] Error 2 
 
!!! ERROR: x11-libs/qt-3.3.3 failed. 
!!! Function src_compile, Line 107, Exitcode 2 
!!! (no error message) 
 

Expected Results:  
QT emerged correctly :) 

Gentoo Base System version 1.5.2 
Portage 2.0.50-r9 (default-ppc-2004.1, gcc-3.3.3, glibc-2.3.3.20040420-r1, 
2.6.7-gentoo-r14) 
================================================================= 
System uname: 2.6.7-gentoo-r14 ppc 7455, altivec supported 
Autoconf: sys-devel/autoconf-2.59-r4 
Automake: sys-devel/automake-1.8.5-r1 
ACCEPT_KEYWORDS="ppc ~ppc" 
AUTOCLEAN="yes" 
CFLAGS="-O3 -pipe -mcpu=7400 -maltivec -mabi=altivec" 
CHOST="powerpc-unknown-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-O3 -pipe -mcpu=7400 -maltivec -mabi=altivec" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="ccache" 
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ 
http://gentoo.tiscali.nl/gentoo/ http://ftp-stud.fht-esslingen.de/pub/ 
Mirrors/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo" 
MAKEOPTS="-j2" 
PKGDIR="/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="X alsa altivec berkdb cddb cdr cups dga divx4linux dvd faac faad flak 
foomaticdb gdbm gif gimpprint gphoto2 gtk gtk2 imlib jabber jpeg 
 kde libwww matroska mitshm mng motif mozilla oggvorbis ooo-kde opengl pam 
perl pic png ppc python qt readline samba sdl slang ssl tcpd the 
ora tiff truetype wifi xv xvid zlib"
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2004-08-17 08:30:34 UTC
Created attachment 37602 [details]
Complete log of the ebuild
Comment 2 Luca Barbato gentoo-dev 2004-08-17 13:11:15 UTC
-fno-strict-aliasing is missing, rebuild everything you build with gcc-333.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2004-08-18 02:22:21 UTC
So should I rebuild everything in the system?
Before do that.. you are sure that after the rebuild qt should compile fine?
I haven't it neither on my x86 system and everything works fine.
Comment 4 Luca Barbato gentoo-dev 2004-08-18 03:42:22 UTC
s/build/built

Well the new gcc just does some sort of optimization on type aliasing and if you enable it on code that doesn't follow the rules (basically do not use wierd cast on union and structs) you get non working code.
I hope that explained, see the gcc manpage for more insight about what -fstrict-aliasing (impliend in -O2) does.
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2004-08-18 15:05:27 UTC
Everything compiles fine using GCC 3.4
Comment 6 Luca Barbato gentoo-dev 2004-08-18 21:59:49 UTC
Closing then