Summary: | x11-libs/qt-webkit-4.6.2: ld crashes at linking libQtWebKit.so.4.6.2 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | urcindalo <urcindalo> |
Component: | [OLD] Library | Assignee: | Qt Bug Alias <qt> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | aguertin+gentoo, amigadave, jer, jm.leddy, kallamej, realnc |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Build log of qt-webkit-4.6.2
build.log with stable x86 binutils environment for qt-webkit-4.6.2-r1 on ppc32 Patch to warn x86 users for using -ggdb |
Description
urcindalo
2010-03-05 08:11:15 UTC
Are you sure it was the first error ? Attach full build log. Created attachment 222191 [details] Build log of qt-webkit-4.6.2 $ emerge --info qt-webkit Portage 2.1.7.17 (hardened/linux/x86, gcc-4.3.4, glibc-2.10.1-r1, 2.6.32-hardened-r3 i686) ================================================================= System Settings ================================================================= System uname: Linux-2.6.32-hardened-r3-i686-AMD_Athlon-tm-_XP_1800+-with-gentoo-1.12.13 Timestamp of tree: Wed, 03 Mar 2010 17:30:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 4.0_p35 dev-java/java-config: 2.1.10 dev-lang/python: 2.6.4-r1 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.7.9-r1, 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.18-r3 sys-devel/gcc: 4.3.4 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="*" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -ggdb -fstack-protector-all" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=athlon-xp -O2 -pipe -ggdb -fstack-protector-all" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests ccache collision-protect distlocks fixpackages keeptemp keepwork news parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo http://mirror.pudas.net/gentoo http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LANG="en_GB.UTF-8" LDFLAGS="-Wl,-O1" 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="3dnow X acl acpi alsa berkdb bitmap-fonts branding bzip2 caps cdr cli cracklib crypt cups curl cxx dri encode flac gdbm gnome gtk gtk2 hal hardened iconv java jikes jpeg mad mmx modules mp3 mpeg mudflap mysql ncurses nls nptl nptlonly ogg oggvorbis opengl openmp pam pcre perl pic png pppd python quicktime readline reflection session spell spl sse ssl sysfs tcpd tiff truetype truetype-fonts type1-fonts unicode urandom usb vorbis x86 xorg xv zlib" ALSA_CARDS="intel8x0 via82xx" 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 authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse joystick evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv nouveau vesa none v4l" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= x11-libs/qt-webkit-4.5.3 was built with the following: USE="-debug -kde (-pch)" Created attachment 222213 [details]
build.log with stable x86 binutils
Here it is the build.log
It corresponds to the emerging trial with binutils 2.18-r3
Removing -ggdb from CFLAGS makes it work for me. I had this exact same problem and tracked it down to running out of RAM. I have 1GB of physical RAM and 384MB of swap, and it was getting completely used up, even without X or any other applications running. I added the following lines to my /etc/make.conf and it built, supposedly more slowly but with no loss in functionality: # To fix packages that need more memory than I have: LDFLAGS="-Wl,--reduce-memory-overheads -Wl,--no-keep-memory" I suggest that the ebuild should check the total amount of RAM+swap available, and if it's less than a certain amount (2GB?) ewarn the user. With -ggdb, 2 GB of RAM + ~300 MB of swap space have always been enough on my amd64 laptop (with KDE4 and lots of apps running at the same time). Apparently x86 needs more space though. I suppose we could indeed add a check for available memory and add a warning that this package needs lots. (In reply to comment #7) > I suppose we could indeed add a check for available memory and add a warning > that this package needs lots. > Yes, but how much? I already assigned 3 GB RAM to the virtual machine out of my 4 GB physical RAM. There's no lack of hard drive space, neither, as the virtual hard drive has 10 GB free available for compilation. I increased the RAM to 3.5 GB, to no avail. I'm beginning to get desperate, as I need my virtual machine to run certain programs. Any news on this? (In reply to comment #9) > I increased the RAM to 3.5 GB, to no avail. I'm beginning to get desperate, as > I need my virtual machine to run certain programs. > > Any news on this? > Have you tried without -ggdb? Have you tried adding -Wl,--reduce-memory-overheads and/or -Wl,--no-keep-memory to your LDFLAGS? (In reply to comment #10) > Have you tried without -ggdb? Removing -ggdb did the trick :) I didn't remember I had it in my LDFLAGS. I should have checked it before panicking. However, I think some kind of warning should be added to the ebuild, preferably at config time. I doubt it is a memory issue cause I am able to build Qt on a Virtual machine with only 256MB of ram. (In reply to comment #12) > I doubt it is a memory issue cause I am able to build Qt on a Virtual machine > with only 256MB of ram. > With -ggdb in your CXXFLAGS? (In reply to comment #9) > I increased the RAM to 3.5 GB, to no avail. I'm beginning to get desperate, as > I need my virtual machine to run certain programs. Maybe it's a good idea to figure out if a program on your system really can allocate more than, say, 1GB. That's normally a kernel setting. (In reply to comment #13) > (In reply to comment #12) > > I doubt it is a memory issue cause I am able to build Qt on a Virtual machine > > with only 256MB of ram. > > > > With -ggdb in your CXXFLAGS? > Yeah (In reply to comment #12) > I doubt it is a memory issue cause I am able to build Qt on a Virtual machine > with only 256MB of ram. > binutils version? I just ran into this and noticed I have -ggdb in my CFLAGS. I have a T43 (5 years old maybe?) and only .75 Gigs of memory. Okay, I removed -ggdb (not sure why I had it in the first place) and everything is working fine now. (In reply to comment #18) > Okay, I removed -ggdb (not sure why I had it in the first place) and everything > is working fine now. Closing, then. Thanks. (In reply to comment #19) > (In reply to comment #18) > > Okay, I removed -ggdb (not sure why I had it in the first place) and everything > > is working fine now. > > Closing, then. Thanks. > Fixed... how? The memory leak is there. Reopening (In reply to comment #21) > The memory leak is there. Reopening Do we know it's a memory leak? Maybe ld just needs that much memory to handle the debug tables. At the very least, there must be a warning as suggested in comment #7 before this is closed. (In reply to comment #12) > I doubt it is a memory issue cause I am able to build Qt on a Virtual machine > with only 256MB of ram. So far this has only been reported on x86 systems. Are you running another processor? Gentooappel ~ # emerge --info Portage 2.1.8.3 (default/linux/powerpc/ppc32/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.29.6-rt24 ppc) ================================================================= System uname: Linux-2.6.29.6-rt24-ppc-7447A,_altivec_supported-with-gentoo-1.12.13 Timestamp of tree: Tue, 20 Apr 2010 11:00:01 +0000 app-shells/bash: 4.0_p37 dev-java/java-config: 1.3.7-r1, 2.1.10 dev-lang/python: 2.4.6, 2.5.4-r3, 2.6.4-r1 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.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.3, 1.11.1 sys-devel/binutils: 2.18-r3 sys-devel/gcc: 4.1.2, 4.3.4 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="ppc" ACCEPT_LICENSE="*" CBUILD="powerpc-unknown-linux-gnu" CFLAGS="-O2 -mcpu=7450 -mtune=7450 -maltivec -mabi=altivec -pipe -mpowerpc-gfxopt" CHOST="powerpc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -mcpu=7450 -mtune=7450 -maltivec -mabi=altivec -pipe -mpowerpc-gfxopt" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests collision-protect distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,--reduce-memory-overheads -Wl,--no-keep-memory" LINGUAS="nl" MAKEOPTS="-j2" 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/layman/pro-audio /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aac acl alsa altivec ao apache2 avahi bash-completion berkdb bzip2 cdda cddb cdparanoia cdr cgi cli cracklib cups cursors cvs cxx dbus dri dvd dvdread encode exif expat extras ffmpeg firefox flac fortran ftp gcj gdbm geoip gif glut gnome gphoto2 gpm gtk hal icons iconv imap imlib ipod jack java javascript jbig jpeg kde kdm krb4 lame libnotify libpng libwww mad matroska mdnsresponder-compat memlimit mime modules mozilla mp3 mpeg mplayer msn mudflap ncurses nls nntp nptl nptlonly nsplugin ogg openal opengl openmp oss pam parcheck pcre pdf perl png ppc pppd pulseaudio python qt3 qt3support qt4 quicktime rdesktop readline realmedia reflection sdl session sockets spl ssl subversion suid svg symlink sysfs syslog tcpd tiff tk truetype unicode usb v4l v4l2 videos vnc vorbis wavpack webkit wma wxwindows xattr xcomposite xine xinetd xml xmp xorg xulrunner xv xvid zlib zoran" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" 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 authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="nl" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Gentooappel ~ # The problem is also on my machine PPC32. (see below), will now try to recompile the package as suggested with the LDFLAGS for reduced memory, I only have 512MB. Regards Oscar compiling .moc/release-shared/moc_qwebhistoryinterface.cpp compiling .moc/release-shared/moc_qwebpluginfactory.cpp compiling .moc/release-shared/moc_qwebinspector.cpp compiling .rcc/release-shared/qrc_WebCore.cpp compiling .rcc/release-shared/qrc_WebKit.cpp rm -f libQtWebKit.so.4.6.2 libQtWebKit.so libQtWebKit.so.4 libQtWebKit.so.4.6 linking ../../../../lib/libQtWebKit.so.4.6.2 collect2: ld terminated with signal 11 [Segmentation fault] make: *** [../../../../lib/libQtWebKit.so.4.6.2] Error 1 * ERROR: x11-libs/qt-webkit-4.6.2 failed: * emake failed * * Call stack: * ebuild.sh, line 54: Called src_compile * environment, line 3375: Called qt4-build_src_compile * environment, line 3027: Called build_directories 'src/3rdparty/webkit/WebCore' 'tools/designer/src/plugins/qwebview' * environment, line 599: Called die * The specific snippet of code: * emake CC="@echo compiling \$< && $(tc-getCC)" CXX="@echo compiling \$< && $(tc-getCXX)" LINK="@echo linking \$@ && $(tc-getCXX)" || die "emake failed"; * unfortunately this did not work, even with the new LDFLAGS, see below for the error message. I am now trying to emerge the unstable r1 release. Maybe that would work.. Regards Oscar ompiling .rcc/release-shared/qrc_WebCore.cpp compiling .rcc/release-shared/qrc_WebKit.cpp rm -f libQtWebKit.so.4.6.2 libQtWebKit.so libQtWebKit.so.4 libQtWebKit.so.4.6 linking ../../../../lib/libQtWebKit.so.4.6.2 collect2: ld terminated with signal 11 [Segmentation fault] make: *** [../../../../lib/libQtWebKit.so.4.6.2] Error 1 * ERROR: x11-libs/qt-webkit-4.6.2 failed: * emake failed * * Call stack: * ebuild.sh, line 54: Called src_compile * environment, line 3375: Called qt4-build_src_compile * environment, line 3027: Called build_directories 'src/3rdparty/webkit/WebCore' 'tools/designer/src/plugins/qwebview' * environment, line 599: Called die * The specific snippet of code: * emake CC="@echo compiling \$< && $(tc-getCC)" CXX="@echo compiling \$< && $(tc-getCXX)" LINK="@echo linking \$@ && $(tc-getCXX)" || die "emake failed"; * Looking at comment 25, it shows ld dying with signal 11 [Segmentation fault], as the log attached by Anders Hellgren does, while the log attached by the original reporter (as well as my own, not attached anywhere) shows it dying with signal 9 [Killed]. Could there be multiple problems here? Note, removing -ggdb from CFLAGS has fixed the problem for one person with signal 11, one with signal 9, and one person with unreported signal, so that provides counter-evidence to there being multiple problems... I can confirm this for PPC32 with 1.5GB RAM. ld dies with segfault. I'm not hundred percent sure, whether this is evidence enough, but in my opinion, I don't have -ggdb enabled. Environment will attached. Created attachment 228965 [details]
environment for qt-webkit-4.6.2-r1 on ppc32
(In reply to comment #27) > I can confirm this for PPC32 with 1.5GB RAM. ld dies with segfault. > > I'm not hundred percent sure, whether this is evidence enough, but in my > opinion, I don't have -ggdb enabled. > > Environment will attached. > This is a separate issue, see bug #302696. You need >=sys-devel/binutils-2.20.1 to build qt-webkit on ppc. Thank you, Davide. That solved my problem. Created attachment 229141 [details, diff]
Patch to warn x86 users for using -ggdb
Once you get it compiled, the flag works fine. The warning should really say it makes compilation require lots of RAM. (In reply to comment #32) > Once you get it compiled, the flag works fine. The warning should really say it > makes compilation require lots of RAM. We've confirmed that 3.5Gig isn't enough. To expect someone to have more than that is unreasonable for someone's personal computer. And more than 4g would require PAE (In reply to comment #11) > (In reply to comment #10) > > Have you tried without -ggdb? > Removing -ggdb did the trick :) I didn't remember I had it in my LDFLAGS. I > should have checked it before panicking. > However, I think some kind of warning should be added to the ebuild, preferably > at config time. In which file should I remove -ggdb?? (In reply to comment #33) > (In reply to comment #32) > > Once you get it compiled, the flag works fine. The warning should really say it > > makes compilation require lots of RAM. > > We've confirmed that 3.5Gig isn't enough. To expect someone to have more than > that is unreasonable for someone's personal computer. And more than 4g would > require PAE Right, but the patch as attached says that it makes -ggdb "not work", which sounds like it would compile but fail to provide debugging information. What would you say to "-ggdb can cause compilation failure of x11-libs/qt-webkit on x86 due to lack of memory"? (In reply to comment #34) > In which file should I remove -ggdb?? Typically if you've set -ggdb, it would be in your CFLAGS or CXXFLAGS in /etc/make.conf (In reply to comment #35) > (In reply to comment #33) > > (In reply to comment #32) > > > Once you get it compiled, the flag works fine. The warning should really say it > > > makes compilation require lots of RAM. > > > > We've confirmed that 3.5Gig isn't enough. To expect someone to have more than > > that is unreasonable for someone's personal computer. And more than 4g would > > require PAE > Right, but the patch as attached says that it makes -ggdb "not work", which > sounds like it would compile but fail to provide debugging information. > What would you say to "-ggdb can cause compilation failure of > x11-libs/qt-webkit on x86 due to lack of memory"? > (In reply to comment #34) > > In which file should I remove -ggdb?? > Typically if you've set -ggdb, it would be in your CFLAGS or CXXFLAGS in > /etc/make.conf I cant find /etc/make.conf , machine is IBM Cell QS20 ppc64 and OS Fedora release 7 (Moonshine). I am just building qt-4.6.2 using gmake and when it comes to webkit it gives this error and quits collect2: ld terminated with signal 11 [Segmentation fault] gmake[1]: *** [../../../../lib/libQtWebKit.so.4.6.2] Error 1 gmake: *** [sub-webkit-make_default-ordered] Error 2 Ram is 1 GB and swap is 1GB too, shall I increase swap size? or do something else? Also someone suggested using binutils2.2 but yum is only upgrading it till 2.17 Thanks wops I am at a wrong place, sorry folks :( but this qt error is driving me nuts again apologies I compiled fine with 3.5 GB of RAM, and a fully featured KDE 4.4.4 running. My specs are: CFLAGS="-O2 -march=prescott -g" LDFLAGS="-Wl,--as-needed,-O1" MAKEOPTS="-j3 -l5 -s" 4 GB swap, vm.swappiness = 60 (default), 32bit CPU: 3.2 GHz Pentium4 HT Maybe this hits people who (mis-)tuned their swappiness or it doesn't affect "-g" usage, only "-ggdb"... Only caveat was it took 2 hours to compile but my system was perfectly usable during this time (I constantly had about 700M free RAM). I don't have problems building it either with -g. But I still get the warning about -ggdb :-/ The warning pops up only if you use -g/-ggdb on your CFLAGS (In reply to comment #40) > The warning pops up only if you use -g/-ggdb on your CFLAGS Yep, -g. I thought only -ggdb is affected, not -g. No because both -g and -ggdm add debug symbols to the object file leading to extensive memory usage during compilation Well... the warning against -g/-ggdb was added quite some time ago, closing. |