Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 302696 - <sys-devel/binutils-2.20-r1 crashes on PowerPC while linking =x11-libs/qt-webkit-4.6*
Summary: <sys-devel/binutils-2.20-r1 crashes on PowerPC while linking =x11-libs/qt-web...
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: PPC64 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 295765 305015 (view as bug list)
Depends on:
Blocks: qt46
  Show dependency tree
 
Reported: 2010-01-28 22:51 UTC by Andrew John Hughes
Modified: 2010-06-27 11:43 UTC (History)
9 users (show)

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


Attachments
Build log (build.log,126.69 KB, text/plain)
2010-01-29 02:06 UTC, Andrew John Hughes
Details
ld command executed that segfaults (out2,50.29 KB, text/plain)
2010-01-29 03:07 UTC, Andrew John Hughes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew John Hughes 2010-01-28 22:51:31 UTC
rm -f libQtWebKit.so.4.6.1 libQtWebKit.so libQtWebKit.so.4 libQtWebKit.so.4.6
linking ../../../../lib/libQtWebKit.so.4.6.1
collect2: ld terminated with signal 11 [Segmentation fault]
make: *** [../../../../lib/libQtWebKit.so.4.6.1] Error 1


Reproducible: Always

Steps to Reproduce:
1. emerge qt-webkit
2.
3.




Portage 2.2_rc40 (default/linux/powerpc/ppc64/10.0/32bit-userland/desktop, gcc-4.4.2, glibc-2.9_p20081201-r2, 2.6.24-gentoo-r8.omega ppc64)
=================================================================
System uname: Linux-2.6.24-gentoo-r8.omega-ppc64-PPC970MP,_altivec_supported-with-glibc2.0
Timestamp of tree: Wed, 27 Jan 2010 23:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.2
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="ppc ~ppc"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mtune=G5 -mcpu=G5 -mabi=altivec -pipe -ggdb"
CHOST="powerpc-unknown-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/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -mtune=G5 -mcpu=G5 -mabi=altivec -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://gentoo.blueyonder.co.uk ftp://mirrors.blueyonder.co.uk/mirrors/gentoo "
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB en"
MAKEOPTS="-j5"
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/java-overlay /usr/local/portage/ppc64 /usr/local/portage/xmmsroot2_overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl addbookmarks alias alsa altivec asf autoreplace avahi bash-completion berkdb bindist bluetooth branding bzip2 cairo caps cdaudio cdda cddb cdparanoia cdr cli connectionstatus consolekit contactnotes cracklib crypt cups curl cvs cxx daap dbus dga dia dirac djvu dri dts dv dvd dvdnav dvdr dvdread dvi eds effects emacs emboss emf encode evo examples exif fam fame ffmpeg fftw firefox flac fortran fping gcc64 gcj gdbm gif gimp git gmp gnome gnome-keyring gnutls gpac gpgme gphoto2 gpm gstreamer gtk hal hfs highlight history iconv id3tag idn ieee1394 imagemagick imap imlib ipod ipv6 irc jack java java5 javascript jingle jpeg jpeg2k kde ladspa lame lapack latex lcms libnotify live lzo mad matroska mbox mikmod mjpeg mmap mng modules mp2 mp3 mp4 mpeg mplayer mudflap musepack musicbrainz ncurses netmeeting network nls nntp nowlistening nptl nptlonly nsplugin ogg openal openexr opengl openmp optimisememory oss pam pcre pdf perl pidgin plotutils png pnm pop postscript ppc ppds pppd pulseaudio python qt qt3 qt3support qt4 quicktime readline reflection rtc sasl scanner schroedinger sdl session shout slp smime smp sms smtp snmp sox speex spell spl sqlite ssl startup-notification statistics stream subtitles subversion svg sysfs syslog t1lib tcpd tetex texteffect tga theora threads thunar tiff translator truetype twolame unicode usb v4l2 vcd visualization vorbis vram webkit webpresence wifi wmf x264 xattr xchattext xcomposite xine xinerama xml xmmsroot2 xorg xscreensaver xulrunner xv xvid yahoo zeroconf zlib" 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Dror Levin (RETIRED) gentoo-dev 2010-01-28 22:54:53 UTC
Please attach full build.log.
Comment 2 Andrew John Hughes 2010-01-29 02:06:41 UTC
Created attachment 217777 [details]
Build log
Comment 3 Andrew John Hughes 2010-01-29 03:07:19 UTC
Managed to get a backtrace:

#0  ppc_elf_gc_sweep_hook (abfd=<value optimized out>, info=0x10382570, sec=0x1050acd8, relocs=0x105110f8)
    at /var/tmp/portage/sys-devel/binutils-2.20/work/binutils-2.20/bfd/elf32-ppc.c:4537
#1  0x0fb35894 in bfd_elf_gc_sections (abfd=0x103a40c0, info=0x10382570)
    at /var/tmp/portage/sys-devel/binutils-2.20/work/binutils-2.20/bfd/elflink.c:11528
#2  0x10019474 in ?? ()
#3  0x1001e9b4 in ?? ()
#4  0x0f8626fc in generic_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, 
    auxvec=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, 
    stack_end=<value optimized out>) at ../csu/libc-start.c:220
#5  0x0f8628a0 in __libc_start_main (argc=<value optimized out>, ubp_av=<value optimized out>, ubp_ev=<value optimized out>, 
    auxvec=<value optimized out>, rtld_fini=<value optimized out>, stinfo=<value optimized out>, 
    stack_on_entry=<value optimized out>) at ../sysdeps/unix/sysv/linux/powerpc/libc-start.c:92
#6  0x00000000 in ?? ()
Comment 4 Andrew John Hughes 2010-01-29 03:07:58 UTC
Created attachment 217778 [details]
ld command executed that segfaults
Comment 5 Andrew John Hughes 2010-01-29 03:56:08 UTC
With installsources:

ppc_elf_gc_sweep_hook (abfd=<value optimized out>, info=0x10380578, sec=0x10508cd8, relocs=0x1050f0f8)
    at /usr/src/debug/sys-devel/binutils-2.20/binutils-2.20/bfd/elf32-ppc.c:4537
4537                  if (ent->plt.refcount > 0)
(gdb) bt
#0  ppc_elf_gc_sweep_hook (abfd=<value optimized out>, info=0x10380578, sec=0x10508cd8, relocs=0x1050f0f8)
    at /usr/src/debug/sys-devel/binutils-2.20/binutils-2.20/bfd/elf32-ppc.c:4537
#1  0x0fb35904 in bfd_elf_gc_sections (abfd=0x103a20c0, info=0x10380578)
    at /usr/src/debug/sys-devel/binutils-2.20/binutils-2.20/bfd/elflink.c:11528
#2  0x10018524 in ?? ()
#3  0x1001da64 in ?? ()
#4  0x0f8626fc in generic_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, 
    auxvec=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, 
    stack_end=<value optimized out>) at ../csu/libc-start.c:220
#5  0x0f8628a0 in __libc_start_main (argc=<value optimized out>, ubp_av=<value optimized out>, ubp_ev=<value optimized out>, 
    auxvec=<value optimized out>, rtld_fini=<value optimized out>, stinfo=<value optimized out>, 
    stack_on_entry=<value optimized out>) at ../sysdeps/unix/sysv/linux/powerpc/libc-start.c:92
#6  0x00000000 in ?? ()

So looks like it hits a NULL ent.
Comment 6 Andrew John Hughes 2010-01-29 03:57:14 UTC
Yep...

(gdb) print ent
$1 = (struct plt_entry *) 0x0
Comment 7 Andrew John Hughes 2010-01-29 03:58:28 UTC
              ent = find_plt_ent (ifunc, got2, addend);
              if (ent->plt.refcount > 0)
                ent->plt.refcount -= 1;

does not check for the returned ent being null.
Comment 8 Davide Pesavento gentoo-dev 2010-02-04 23:05:38 UTC
Looks like a binutils bug, Cc'ing toolchain for advice.
Comment 9 Andrew John Hughes 2010-02-10 10:12:21 UTC
Note that this does not happen with webkit-gtk, only the Qt version.
Comment 10 Christian Schmitt 2010-02-10 19:51:11 UTC
Can confirm this on my G4 PPC 32.
Comment 11 Andrew John Hughes 2010-02-12 10:02:42 UTC
Still fails with gcc 4.4.3
Comment 12 Davide Pesavento gentoo-dev 2010-02-12 10:46:45 UTC
Have you tried with binutils-2.20.51.0.6 ?
Comment 13 Christian Schmitt 2010-02-12 15:00:44 UTC
I just tried binutils-2.20.51.0.6 and to my surprise it worked :-)
Comment 14 Samuli Suominen gentoo-dev 2010-02-14 12:02:06 UTC
*** Bug 305015 has been marked as a duplicate of this bug. ***
Comment 15 Samuli Suominen gentoo-dev 2010-02-14 12:03:01 UTC
(In reply to comment #14)
> *** Bug 305015 has been marked as a duplicate of this bug. ***
> 

It was said in above bug:

I was able to solve the problem by applying the following patches:

http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/elf64-ppc.c.diff?cvsroot=src&only_with_tag=binutils-2_20-branch&r1=1.299.2.3&r2=1.299.2.4
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/elf32-ppc.c.diff?cvsroot=src&only_with_tag=binutils-2_20-branch&r1=1.267.2.3&r2=1.267.2.4
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/include/elf/ppc.h.diff?cvsroot=src&only_with_tag=binutils-2_20-branch&r1=1.25.4.1&r2=1.25.4.2

As suggested in:

http://sourceware.org/bugzilla/show_bug.cgi?id=11088

I applied them on top of those already applied by the ebuild. After doing this,
qt webkit compiled and installed without issues.
Comment 16 Andrew John Hughes 2010-02-15 16:36:55 UTC
That version of binutils is not keyworded :-(

Installing it by using ** does work though and it allows qt-webkit to be built.  Can that version please be keyworded ~ppc?
Comment 17 Samuli Suominen gentoo-dev 2010-02-15 17:02:10 UTC
(In reply to comment #16)
> That version of binutils is not keyworded :-(
> 
> Installing it by using ** does work though and it allows qt-webkit to be built.
>  Can that version please be keyworded ~ppc?
> 

Didn't you read the above comment? The user kindly offered us links to backport the patches to the stable binutils branch, why should we keyword a experimental version then?
Comment 18 Mark Loeser (RETIRED) gentoo-dev 2010-02-16 01:03:17 UTC
Thanks.  Patch queued for 2.20-r1.
Comment 19 Ben de Groot (RETIRED) gentoo-dev 2010-02-17 03:01:52 UTC
*** Bug 295765 has been marked as a duplicate of this bug. ***
Comment 20 Mike Limansky 2010-02-25 09:45:27 UTC
Hi All,

  Could anybody please clarify, why this bug is a blocker for Qt 4.6 stabilization? As I understand this issue can be reproduced only with latest unstable binutils and only on ppc platform. So it's not related to current stable profiles.
Comment 21 Ben de Groot (RETIRED) gentoo-dev 2010-02-25 10:53:27 UTC
(In reply to comment #20)
>   Could anybody please clarify, why this bug is a blocker for Qt 4.6
> stabilization? As I understand this issue can be reproduced only with latest
> unstable binutils

I don't see any indication in this bug that it works with 2.18 or 2.19

> and only on ppc platform.

That is true and for that reason this is only a blocker for Qt 4.6 stabilization on ppc. Stabilization for the other arches will go ahead, as planned, next week.
Comment 22 Mike Limansky 2010-02-25 11:12:52 UTC
(In reply to comment #21)
> I don't see any indication in this bug that it works with 2.18 or 2.19

So you mean that the Qt 4.6 cannot be built on ppc at all? I think in this case the bug description is ambiguous, because it looks like only 2.20 branch is affected.
 
> That is true and for that reason this is only a blocker for Qt 4.6
> stabilization on ppc. Stabilization for the other arches will go ahead, as
> planned, next week.

Wow, great.
Comment 23 Mark Loeser (RETIRED) gentoo-dev 2010-02-26 22:08:58 UTC
In the tree.
Comment 24 Davide Pesavento gentoo-dev 2010-04-24 10:43:00 UTC
qt-webkit-4.6.2 is stable on ppc, but newer binutils is not, thus users are hitting this bug in the stable tree.
Comment 25 Samuli Suominen gentoo-dev 2010-06-27 11:43:57 UTC
(In reply to comment #24)
> qt-webkit-4.6.2 is stable on ppc, but newer binutils is not, thus users are
> hitting this bug in the stable tree.
> 

  27 Jun 2010; <nixnut@gentoo.org> binutils-2.20.1-r1.ebuild:
  ppc stable #298571