Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 541262 - dev-qt/qtcore 5.4.0 fails to compile: x86_64-pc-linux-gnu-g++: error: unrecognized command line option ‘-fuse-ld=gold’
Summary: dev-qt/qtcore 5.4.0 fails to compile: x86_64-pc-linux-gnu-g++: error: unrecog...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: qt-5.4.2-stable
  Show dependency tree
 
Reported: 2015-02-24 16:59 UTC by tobi
Modified: 2015-06-17 15:58 UTC (History)
1 user (show)

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


Attachments
emerge --info output (emerge-info.txt,5.44 KB, text/plain)
2015-02-24 16:59 UTC, tobi
Details
emerge -pqv output (emerge-pqv.txt,82 bytes, text/plain)
2015-02-24 17:00 UTC, tobi
Details
build.log of qtcore failing (build.log,256.40 KB, text/x-log)
2015-02-24 17:01 UTC, tobi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tobi 2015-02-24 16:59:19 UTC
Created attachment 397426 [details]
emerge --info output

As the title says, when updating my system qtcore 5.4.0 fails to compile.
Comment 1 tobi 2015-02-24 17:00:01 UTC
Created attachment 397428 [details]
emerge -pqv output
Comment 2 tobi 2015-02-24 17:01:28 UTC
Created attachment 397430 [details]
build.log of qtcore failing
Comment 3 Mike Gilbert gentoo-dev 2015-02-24 17:20:03 UTC
-fuse-ld was added in gcc-4.8. You currently have gcc-4.7 selected.

qtcore should probably be changed to detect that, or should ban usage of <gcc-4.8.
Comment 4 tobi 2015-02-24 17:31:21 UTC
Thanks for the fast answer. How do I change to a different gcc version? I can't find an eselect module for that.
Comment 5 tobi 2015-02-24 17:33:31 UTC
Nevermind, just found gcc-config.
Thanks for your effort and the fast solution to my problems.
Comment 6 Davide Pesavento (RETIRED) gentoo-dev 2015-02-24 17:35:43 UTC
(In reply to Mike Gilbert from comment #3)
> qtcore should probably be changed to detect that, or should ban usage of
> <gcc-4.8.

qtbase configure script already has code to detect -fuse-ld=gold support. So something's wrong...
Comment 7 Davide Pesavento (RETIRED) gentoo-dev 2015-02-24 17:48:37 UTC
The test is:

    if linkerSupportsFlag $TEST_COMPILER -fuse-ld=gold; then

which actually tests '-Wl,-fuse-ld=gold'. I guess linkerSupportsFlag should be changed to compilerSupportsFlag. Anyone with gcc-4.7 wants to try?
Comment 8 Mike Gilbert gentoo-dev 2015-02-24 17:51:42 UTC
(In reply to Davide Pesavento from comment #7)
> The test is:
> 
>     if linkerSupportsFlag $TEST_COMPILER -fuse-ld=gold; then
> 
> which actually tests '-Wl,-fuse-ld=gold'. I guess linkerSupportsFlag should
> be changed to compilerSupportsFlag.

Right. -fuse-ld=gold is a gcc switch, not an ld switch. I see people get this wrong surprisingly frequently.
Comment 9 Michael Palimaka (kensington) gentoo-dev 2015-05-31 17:36:56 UTC
In overlay, tested OK with gcc-4.7:

https://gitweb.gentoo.org/proj/qt.git/commit/?id=f6b7f47fb07fda8aa6e0c3be5be7f60c2d541b0d
Comment 10 Davide Pesavento (RETIRED) gentoo-dev 2015-05-31 19:06:10 UTC
Michael, I've reverted your commit because this bug was already fixed upstream for 5.4.2

https://code.qt.io/cgit/qt/qtbase.git/commit/?id=53e2db74dba8135bd88bad48fbf9f2fc81ed4f8b
Comment 11 Davide Pesavento (RETIRED) gentoo-dev 2015-06-17 15:58:55 UTC
fixed in 5.4.2