Debian Bug report logs - #852035
binutils: bfd stumbles over duplicated symbols generated by gold

version graph

Package: binutils; Maintainer for binutils is Matthias Klose <doko@debian.org>; Source for binutils is src:binutils (PTS, buildd, popcon).

Affects: src:libqapt, src:libkf5kipi

Reported by: Aurelien Jarno <aurel32@debian.org>

Date: Fri, 20 Jan 2017 21:57:02 UTC

Severity: serious

Tags: buster, sid, stretch, upstream

Merged with 852671, 852672, 852899, 852909

Found in versions binutils/2.28.51.20170620-1, binutils/2.27.90.20161231-1

Fixed in version binutils/2.27.90.20170124-2

Forwarded to https://sourceware.org/bugzilla/show_bug.cgi?id=21074

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#852035; Package binutils. (Fri, 20 Jan 2017 21:57:04 GMT) (full text, mbox, link).


Acknowledgement sent to Aurelien Jarno <aurel32@debian.org>:
New Bug report received and forwarded. Copy sent to Matthias Klose <doko@debian.org>. (Fri, 20 Jan 2017 21:57:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Aurelien Jarno <aurel32@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: binutils: bfd stumbles over duplicated symbols generated by gold
Date: Fri, 20 Jan 2017 22:55:42 +0100
Package: binutils
Version: 2.27.51.20161231-1
Severity: serious

When the gold linker is used, it sometimes generates duplicated symbols.
It's not something new, and can be seen for example in
qtbase-opensource-src 5.7.1+dfsg-2:

  1081: 00000000004caf88     0 NOTYPE  GLOBAL DEFAULT ABS __bss_start@Qt_5
  1082: 00000000004caf88     0 NOTYPE  GLOBAL DEFAULT ABS __bss_start@Qt_5

Note that bfd doesn't generate duplicated with the same command line
beside the -fuse-ld=gold. This used to not be a problem with both gold
and bfd. However the upstream commit eb3908448b , which first appeared
in binutils 2.27.51.20161231-1, causes this symbols to become
relocatable. This can be seen in qtbase-opensource-src 5.7.1+dfsg-3:

  1081: 00000000004caf88     0 NOTYPE  GLOBAL DEFAULT 19 __bss_start@Qt_5
  1082: 00000000004caf88     0 NOTYPE  GLOBAL DEFAULT 19 __bss_start@Qt_5

This in turn causes bfd to fail to link binaries against libQt5Core.so
or libQt5Gui.so, for example when building libqapt (see [1] for a full
build log):

  /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.7.1:(*IND*+0x0): multiple definition of `__bss_start'
  /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.7.1:(*IND*+0x0): multiple definition of `_edata'
  /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.7.1:(*IND*+0x0): multiple definition of `_end'
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple definition of `__bss_start'
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple definition of `__bss_start'
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple definition of `_edata'
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple definition of `_edata'
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple definition of `_end'
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple definition of `_end'

Note however that having duplicated symbols doesn't cause a problem to
gold, only to bfd.

I don't really know how this should be fixed, either bfd should accept
duplicated symbols, or gold should stop generating them.


[1] https://buildd.debian.org/status/fetch.php?pkg=libqapt&arch=mipsel&ver=3.0.2-1%2Bb2&stamp=1484821949&raw=0

-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)



No longer marked as found in versions 2.27.51.20161231-1. Request was from Dmitry Shachnev <mitya57@debian.org> to control@bugs.debian.org. (Sat, 21 Jan 2017 08:45:02 GMT) (full text, mbox, link).


Marked as found in versions binutils/2.27.90.20161231-1. Request was from Dmitry Shachnev <mitya57@debian.org> to control@bugs.debian.org. (Sat, 21 Jan 2017 08:45:03 GMT) (full text, mbox, link).


Set Bug forwarded-to-address to 'https://sourceware.org/bugzilla/show_bug.cgi?id=21074'. Request was from Matthias Klose <doko@debian.org> to control@bugs.debian.org. (Mon, 23 Jan 2017 14:12:06 GMT) (full text, mbox, link).


Added tag(s) upstream. Request was from Matthias Klose <doko@debian.org> to control@bugs.debian.org. (Mon, 23 Jan 2017 14:12:06 GMT) (full text, mbox, link).


Merged 852035 852671 852672 Request was from Adrian Bunk <bunk@debian.org> to control@bugs.debian.org. (Thu, 26 Jan 2017 10:15:13 GMT) (full text, mbox, link).


Added indication that 852035 affects src:libqapt and src:libkf5kipi Request was from Adrian Bunk <bunk@debian.org> to control@bugs.debian.org. (Thu, 26 Jan 2017 10:15:14 GMT) (full text, mbox, link).


Removed indication that 852035 affects src:libkf5kipi and src:libqapt Added indication that 852035 affects src:libqapt,src:libkf5kipi Request was from Adrian Bunk <bunk@debian.org> to control@bugs.debian.org. (Sat, 28 Jan 2017 09:18:09 GMT) (full text, mbox, link).


Added tag(s) stretch and sid. Request was from Adrian Bunk <bunk@debian.org> to control@bugs.debian.org. (Sat, 28 Jan 2017 09:18:11 GMT) (full text, mbox, link).


Merged 852035 852671 852672 852899 852909 Request was from Adrian Bunk <bunk@debian.org> to control@bugs.debian.org. (Sat, 28 Jan 2017 09:18:18 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#852035; Package binutils. (Sun, 29 Jan 2017 17:42:04 GMT) (full text, mbox, link).


Acknowledgement sent to Emilio Pozuelo Monfort <pochu@debian.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>. (Sun, 29 Jan 2017 17:42:04 GMT) (full text, mbox, link).


Message #28 received at 852035@bugs.debian.org (full text, mbox, reply):

From: Emilio Pozuelo Monfort <pochu@debian.org>
To: 852035@bugs.debian.org
Subject: Re: binutils: bfd stumbles over duplicated symbols generated by gold
Date: Sun, 29 Jan 2017 18:38:34 +0100
Control: severity -1 important

On Fri, 20 Jan 2017 22:55:42 +0100 Aurelien Jarno <aurel32@debian.org> wrote:
> Package: binutils
> Version: 2.27.51.20161231-1
> Severity: serious
> 
> When the gold linker is used, it sometimes generates duplicated symbols.
> It's not something new, and can be seen for example in
> qtbase-opensource-src 5.7.1+dfsg-2:
> 
>   1081: 00000000004caf88     0 NOTYPE  GLOBAL DEFAULT ABS __bss_start@Qt_5
>   1082: 00000000004caf88     0 NOTYPE  GLOBAL DEFAULT ABS __bss_start@Qt_5
> 
> Note that bfd doesn't generate duplicated with the same command line
> beside the -fuse-ld=gold. This used to not be a problem with both gold
> and bfd. However the upstream commit eb3908448b , which first appeared
> in binutils 2.27.51.20161231-1, causes this symbols to become
> relocatable. This can be seen in qtbase-opensource-src 5.7.1+dfsg-3:
> 
>   1081: 00000000004caf88     0 NOTYPE  GLOBAL DEFAULT 19 __bss_start@Qt_5
>   1082: 00000000004caf88     0 NOTYPE  GLOBAL DEFAULT 19 __bss_start@Qt_5
> 
> This in turn causes bfd to fail to link binaries against libQt5Core.so
> or libQt5Gui.so, for example when building libqapt (see [1] for a full
> build log):
> 
>   /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.7.1:(*IND*+0x0): multiple definition of `__bss_start'
>   /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.7.1:(*IND*+0x0): multiple definition of `_edata'
>   /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.7.1:(*IND*+0x0): multiple definition of `_end'
>   /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple definition of `__bss_start'
>   /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple definition of `__bss_start'
>   /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple definition of `_edata'
>   /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple definition of `_edata'
>   /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple definition of `_end'
>   /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.7.1:(*IND*+0x0): multiple definition of `_end'
> 
> Note however that having duplicated symbols doesn't cause a problem to
> gold, only to bfd.
> 
> I don't really know how this should be fixed, either bfd should accept
> duplicated symbols, or gold should stop generating them.

This is work-arounded in binutils/2.27.90.20170124-2. Let's keep this open until
we have a proper fix and not a workaround, but no longer at RC severity.

Cheers,
Emilio



Severity set to 'important' from 'serious' Request was from Emilio Pozuelo Monfort <pochu@debian.org> to 852035-submit@bugs.debian.org. (Sun, 29 Jan 2017 17:42:04 GMT) (full text, mbox, link).


Added tag(s) buster. Request was from ivodd@debian.org to control@bugs.debian.org. (Sun, 18 Jun 2017 09:57:47 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#852035; Package binutils. (Fri, 18 Aug 2017 11:09:02 GMT) (full text, mbox, link).


Acknowledgement sent to Dmitry Shachnev <mitya57@debian.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>. (Fri, 18 Aug 2017 11:09:02 GMT) (full text, mbox, link).


Message #37 received at 852035@bugs.debian.org (full text, mbox, reply):

From: Dmitry Shachnev <mitya57@debian.org>
To: Emilio Pozuelo Monfort <pochu@debian.org>, 852035@bugs.debian.org
Cc: Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Subject: Re: Bug#852035: binutils: bfd stumbles over duplicated symbols generated by gold
Date: Fri, 18 Aug 2017 14:04:26 +0300
[Message part 1 (text/plain, inline)]
Control: severity -1 serious

On Sun, Jan 29, 2017 at 06:38:34PM +0100, Emilio Pozuelo Monfort wrote:
> Control: severity -1 important
>
> This is work-arounded in binutils/2.27.90.20170124-2. Let's keep this open until
> we have a proper fix and not a workaround, but no longer at RC severity.

The workaround was dropped in binutils/2.28.51.20170620-1 (which reached
unstable on July 25th), so we have this bug again with Qt 5.9, and it is
blocking its transition. Bumping the severity back.

A couple of examples, thanks to Adrian Bunk:

https://tests.reproducible-builds.org/debian/rbuild/unstable/amd64/kphotoalbum_5.2-2.rbuild.log
https://tests.reproducible-builds.org/debian/rbuild/unstable/amd64/italc_3.0.3+dfsg1-1.rbuild.log

It also makes qtwebkit FTBFS on armel and armhf.

Either the workaround needs to be reintroduced, or we will have to rebuild
Qt with bfd instead of gold.

--
Dmitry Shachnev
[signature.asc (application/pgp-signature, inline)]

Severity set to 'serious' from 'important' Request was from Dmitry Shachnev <mitya57@debian.org> to 852035-submit@bugs.debian.org. (Fri, 18 Aug 2017 11:09:03 GMT) (full text, mbox, link).


Marked as fixed in versions binutils/2.27.90.20170124-2. Request was from Adrian Bunk <bunk@debian.org> to control@bugs.debian.org. (Fri, 18 Aug 2017 12:45:08 GMT) (full text, mbox, link).


Marked as found in versions binutils/2.28.51.20170620-1. Request was from Adrian Bunk <bunk@debian.org> to control@bugs.debian.org. (Fri, 18 Aug 2017 12:45:11 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Jan 10 06:13:12 2018; Machine Name: beach

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.