/usr/bin/ld.gold: --push-state: unknown option

Bug #1496743 reported by Timo Jyrinki
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gcc-5 (Ubuntu)
Fix Released
High
Matthias Klose
qtbase-opensource-src (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

With gcc 5.2.1-17ubuntu4, we're seeing https://launchpadlibrarian.net/218108553/buildlog_ubuntu-wily-amd64.ubuntu-ui-toolkit_1.3.1639%2B15.10.20150916.2-0ubuntu1_BUILDING.txt.gz

TJ- on #ubuntu-devel suggested:
< TJ-> Mirv: bzoltan: the issue could be in qtbase-opensource-src-5.4.2+dfsg (qmake) which does "mkspecs/common/gcc-base-unix.conf:19:QMAKE_LFLAGS_USE_GOLD = -fuse-ld=gold" irrespective of libraries being linked.

Ideas for a proper fix welcome.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gcc-5 (Ubuntu):
status: New → Confirmed
Changed in qtbase-opensource-src (Ubuntu):
status: New → Confirmed
Revision history for this message
Tim Lunn (darkxst) wrote :

This is fallout from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797577
It will affect any project that tries to link with ld.gold, such as Spidermonkey and WebkitGtk, since ld.gold does not recognize the "--push-state" flag that is injected by the fix/workaround from the above bug.

The underlying bug http://gcc.gnu.org/PR65913 looks to be fixed upstream and will be included in gcc 5.3

Changed in gcc-5 (Ubuntu):
importance: Undecided → High
assignee: nobody → Canonical Foundations Team (canonical-foundations)
tags: added: rls-w-incoming
Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1496743] [NEW] /usr/bin/ld.gold: --push-state: unknown option

On Mon, Sep 21, 2015 at 01:56:46PM -0000, Launchpad Bug Tracker wrote:
> With gcc 5.2.1-17ubuntu4, we're seeing
> https://launchpadlibrarian.net/218108553/buildlog_ubuntu-wily-amd64
> .ubuntu-ui-toolkit_1.3.1639%2B15.10.20150916.2-0ubuntu1_BUILDING.txt.gz

The error in the log is:

g++ -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -Wl,-O1 -fuse-ld=gold -o ubuntu-ui-toolkit-launcher .obj/launcher.o .obj/MouseTouchAdaptor.o -L/usr/X11R6/lib64 -lQt5Quick -lQt5Gui -lQt5Qml -lQt5Network -lQt5Test -lQt5Core -lGL -lpthread
/usr/bin/ld.gold: --push-state: unknown option
/usr/bin/ld.gold: use the --help option for usage information
collect2: error: ld returned 1 exit status

But --push-state only ever appears in the error message; it does not appear
in the g++ commandline that the build system claims to be invoking. Has
anyone tracked down the origin of this? I do see '--push-state' in the
output of 'strings /usr/bin/g++', so it's certainly possible that g++ itself
is adding it to the commandline when invoking ld. If so this is definitely
a gcc bug, passing extra arguments to ld regardless of which ld is being
called, and it doesn't matter what libraries are being passed.

Revision history for this message
Steve Langasek (vorlon) wrote :

The --push-state tracks to a Debian-specific patch in the source, debian/patches/pr65913-workaround.diff. This was added to fix Debian bug #797577, a build failure with a particular boost-using package in Debian.

This new failure was introduced in the latest upload (5.2.1-17ubuntu4) and can be resolved by reverting the change in this version to debian/rules.patch. If this is an urgent problem (and it looks like it might be, if it impacts all qmake-using packages in the archive), I would recommend that someone upload this revert now, until a cleaner fix for the original bug can be found.

Changed in gcc-5 (Ubuntu):
assignee: Canonical Foundations Team (canonical-foundations) → Matthias Klose (doko)
status: Confirmed → Triaged
Revision history for this message
Tim Lunn (darkxst) wrote :

Steve, did you miss my comment above?

This has been fixed upstream, so should be possible to replace that debian patch with a cherry-pick of the upstream fix
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=227878

Revision history for this message
Matthias Klose (doko) wrote :

I'm working on it

Revision history for this message
Olivier Tilloy (osomon) wrote :

This also affects building oxide-qt on wily (see e.g. https://launchpad.net/~phablet-team/+archive/ubuntu/ppa/+build/7930449).

Revision history for this message
Andrea Bernabei (faenil) wrote :

this also affects building ubuntu-ui-toolkit on wily

Revision history for this message
Charles Kerr (charlesk) wrote :

This also affects building qtpurchasing's ubuntu backend on wily

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-5 - 5.2.1-18ubuntu1

---------------
gcc-5 (5.2.1-18ubuntu1) wily; urgency=medium

  * Merge with Debian; remaining changes:

gcc-5 (5.2.1-18) unstable; urgency=medium

  * Update to SVN 20150922 (r228023, 5.2.1) from the gcc-5-branch.

  [ Matthias Klose ]
  * gcc-5-plugin-dev: Depend on libmpc-dev. Closes: #798997.
  * Fix PR libstdc++/65913, taken from the trunk. Closes: #797577.

  [ YunQiang Su ]
  * Build again the gnat-5-sjlj package. Closes: #798782.
  * Fix gnat cross builds, and cross building gnat.

 -- Matthias Klose <email address hidden> Wed, 23 Sep 2015 03:10:37 +0200

Changed in gcc-5 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote :

> Steve, did you miss my comment above?

Sure did, sorry Tim!

Changed in qtbase-opensource-src (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.