Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 411849 - x11-libs/qt-webkit-4.8.1 fails with gcc-4.7: unrecognized command line option '-fuse-ld=gold'
Summary: x11-libs/qt-webkit-4.8.1 fails with gcc-4.7: unrecognized command line option...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
Keywords: PATCH
Depends on:
Blocks: gcc-4.7
  Show dependency tree
Reported: 2012-04-13 12:42 UTC by Andrew John Hughes
Modified: 2012-04-30 09:44 UTC (History)
3 users (show)

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

zipped build log (x11-libs:qt-webkit-4.8.1:20120421-130326.log.gz,153.65 KB, application/gzip)
2012-04-22 16:35 UTC, Nicolas Schlumberger

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Andrew John Hughes 2012-04-13 12:43:10 UTC
Link to gcc 4.7 bug.
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2012-04-13 14:26:40 UTC
Which version of qt-webkit? Can we please have an emerge --info or a build.log or something?
Comment 3 Nicolas Schlumberger 2012-04-22 11:41:10 UTC
I can confirm the issue with qt-webkit-4.8.1, and the following emerge --info:

IIRC the final ld call fails due to -fuse-ld=gold. removing that argument (3 times) allows completing the build.

Portage 2.2.0_alpha100 (hardened/linux/amd64/desktop, gcc-4.7.0, glibc-2.14.1-r3, 3.3.2-hardened x86_64)
System uname: Linux-3.3.2-hardened-x86_64-Intel-R-_Core-TM-_i7-2620M_CPU_@_2.70GHz-with-gentoo-2.1
Timestamp of tree: Sat, 21 Apr 2012 22:45:01 +0000
app-shells/bash:          4.2_p24
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3, 3.2.2-r1
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.5
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.2, 4.7.0::hardened-dev
sys-devel/gcc-config:     1.7
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo kde hardened-dev local
Installed sets: @kde-telepathy, @kdeaccessibility-4.8, @kdeadmin-4.8, @kdeartwork-4.8, @kdebase-4.8, @kdegraphics-4.8, @kdelibs-4.8, @kdemultimedia-4.8, @kdenetwork-4.8, @kdepim-4.8, @kdetoys-4.8, @kdeutils-4.8, @system
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=native -O2 -pipe -floop-interchange -floop-strip-mine -floop-block"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
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/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -floop-interchange -floop-strip-mine -floop-block"
EMERGE_DEFAULT_OPTS="--misspell-suggestions=n --jobs=3"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersandbox usersync xattr"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,relro -Wl,-z,now"
LINGUAS="en en_US"
MAKEOPTS="-j5 -l11"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/var/lib/layman/kde /var/lib/layman/hardened-development /usr/local/portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 c++0x cairo caps cli consolekit cracklib crypt cups cxx dbus dri dts dvd emboss encode exif expat fam ffmpeg fftw firefox flac gdbm gdu gif gpm gstreamer handbook hardened iconv icu idn introspection ipv6 jpeg justify kde kerberos lcms ldap libedit libnotify logrotate lzma mad mmx mng modules mp3 mp4 mpeg mpi mudflap multilib mysql ncurses networkmanager nls nptl nptlonly ogg openexr opengl openmp pam pango pax_kernel pcre pdf png policykit ppds pppd qt3support qt4 sdl semantic-desktop session smp spell sqlite sse sse2 ssl svg sysfs syslog tcpd theora threads tiff truetype udev unicode urandom usb v4l v4l2 vim-syntax vorbis wxwidgets x264 xattr xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="biosdevname btrfs caps crypt crypt-gpg syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="intel vesa v4l v4l2" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.2"
Comment 4 Davide Pesavento (RETIRED) gentoo-dev 2012-04-22 11:55:51 UTC
(In reply to comment #3)
> IIRC the final ld call fails due to -fuse-ld=gold. removing that argument (3
> times) allows completing the build.

Can you attach a full build.log please?
Comment 5 Nicolas Schlumberger 2012-04-22 16:35:52 UTC
Created attachment 309797 [details]
zipped build log

full build log

please note, that i completed the build with ebuild <pkg> compile install qmerge, so there is some additional cruft therein. 
log taken from /var/log/portage.

the error itself can be found before line 7316.
Comment 6 Davide Pesavento (RETIRED) gentoo-dev 2012-04-26 22:35:59 UTC
It looks like gcc-4.7 no longer recognizes -fuse-ld=gold command line option. Is that expected? The list of changes at does not mention it and it doesn't seem the deprecation and subsequent removal of that option has ever been announced.
Comment 7 SpanKY gentoo-dev 2012-04-27 01:12:25 UTC
err, i don't think any gcc version has accepted -fuse-ld=xxx (even though i really wish they'd merge the patches already).  any package requiring that flag is broken.
Comment 8 Davide Pesavento (RETIRED) gentoo-dev 2012-04-27 10:21:36 UTC
(In reply to comment #7)
> err, i don't think any gcc version has accepted -fuse-ld=xxx (even though i
> really wish they'd merge the patches already).  any package requiring that
> flag is broken.

Well, that flag is accepted by gcc 4.5 and 4.6 at least and has been working fine until now. Anyway, what's the suggested replacement?
Comment 9 James Cloos 2012-04-27 12:54:53 UTC
Prior to 4.7 the gcc frontend would ignore any -f option sit didn't recognise; now it complains about them.

There was a thread on either gcc@ or gcc-help@ complaining about the change.
Comment 10 SpanKY gentoo-dev 2012-04-27 16:24:37 UTC
(In reply to comment #8)

i really don't think that flag has ever been in any gcc release.  the replacement is to not use the flag -- it's never been supported.

(In reply to comment #9)

that's not what i see:
$ for v in 4.0.4 4.1.2 4.2.4 4.3.6 4.4.7 4.5.3 4.6.2 4.7.0 ; do \
  gcc-$v -fuse-ld=gold test.c -c ; done
cc1: error: unrecognized command line option "-fuse-ld=gold"
cc1: error: unrecognized command line option "-fuse-ld=gold"
cc1: error: unrecognized command line option "-fuse-ld=gold"
cc1: error: unrecognized command line option "-fuse-ld=gold"
cc1: error: unrecognized command line option "-fuse-ld=gold"
cc1: error: unrecognized command line option "-fuse-ld=gold"
cc1: error: unrecognized command line option ‘-fuse-ld=gold’
gcc-4.7.0: error: unrecognized command line option '-fuse-ld=gold'
Comment 11 Ryan Hill (RETIRED) gentoo-dev 2012-04-28 02:31:45 UTC
Only Debian/Ubuntu GCC accepts that flag, and upstream has rejected it a couple times.  So not a toolchain issue.
Comment 12 Ryan Hill (RETIRED) gentoo-dev 2012-04-28 02:45:19 UTC
The reason this doesn't fail for previous versions is the flag is being passed as a linker option.   See the first entry in
Comment 13 SpanKY gentoo-dev 2012-04-28 02:59:15 UTC
(In reply to comment #12)

i don't that wording is quite right.  previous versions would not barf if it was only passed when linking.

$ gcc -c test.c
$ gcc-4.4.7 -fuse-ld=gold test.o -o a.out
<no error>

so yes, gcc-4.7 has changed behavior, but any package using -fuse-ld=gold has always been wrong.  fix your pkg :p.
Comment 14 Davide Pesavento (RETIRED) gentoo-dev 2012-04-28 10:36:27 UTC
Ok guys, thanks a lot for the info! This is definitely a qt-webkit issue.
Comment 15 Davide Pesavento (RETIRED) gentoo-dev 2012-04-28 10:53:19 UTC
And now fixed in CVS. Thank you all :)