Debian Bug report logs -
#629866
gcc-4.6: --no-add-needed disturbs weak references
Reported by: Samuel Thibault <sthibault@debian.org>
Date: Thu, 9 Jun 2011 00:27:01 UTC
Severity: normal
Found in version gcc-4.6/4.6.0-10
Fixed in version 4.6.4-7+rm
Done: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#629866; Package gcc-4.6.
(Thu, 09 Jun 2011 00:27:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Samuel Thibault <sthibault@debian.org>:
New Bug report received and forwarded. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>.
(Thu, 09 Jun 2011 00:27:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Package: gcc-4.6
Version: 4.6.0-10
Severity: normal
Hello,
Since gcc started using --no-add-needed by default, there are issues
with weak references, see attached testcase:
- libthread represents a thread library, which here only provide the
"cancel" symbol.
- libA is a library which uses the "cancel" symbol, and links against
the thread library.
- foo.c is a file which detects whether the thread library is brought
into the program by showing the value of a weak reference to cancel.
- main.c uses both libA and foo.
The result is this:
cc thread.c -o libthread.so -shared -fPIC
cc libA.c -o libA.so -shared -fPIC -L. -lthread -Wl,-rpath=/tmp/tmp
cc -Wall -g -c -o foo.o foo.c
cc foo.o main.c -o main -L. -lA
/usr/bin/ld.bfd.real: ./libA.so: undefined reference to symbol 'cancel'
/usr/bin/ld.bfd.real: note: 'cancel' is defined in DSO /tmp/tmp/libthread.so so try adding it to the linker command line
/tmp/tmp/libthread.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [main] Erreur 1
For some reason the linker doesn't manage to resolve the "cancel"
symbol, although it's supposed to be brought in by libA.so.
In case you wonder where that testcast comes from, it's actually gcc
itself, the __gthread_active_p() function, which gets inlined into
applications.
Samuel
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.39 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gcc-4.6 depends on:
ii binutils 2.21.51.20110523-1 The GNU assembler, linker and bina
ii cpp-4.6 4.6.0-10 The GNU C preprocessor
ii gcc-4.6-base 4.6.0-10 The GNU Compiler Collection (base
ii libc6 2.13-4 Embedded GNU C Library: Shared lib
ii libcloog-ppl0 0.15.9-3 the Chunky Loop Generator (runtime
ii libgcc1 1:4.6.0-10 GCC support library
ii libgmp10 2:5.0.1+dfsg-7 Multiprecision arithmetic library
ii libgmpxx4ldbl 2:5.0.1+dfsg-7 Multiprecision arithmetic library
ii libgomp1 4.6.0-10 GCC OpenMP (GOMP) support library
ii libmpc2 0.9-3 multiple precision complex floatin
ii libmpfr4 3.0.1-3 multiple precision floating-point
ii libppl-c4 0.11.2-3 Parma Polyhedra Library (C interfa
ii libppl9 0.11.2-3 Parma Polyhedra Library (runtime l
ii libquadmath0 4.6.0-10 GCC Quad-Precision Math Library
ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime
Versions of packages gcc-4.6 recommends:
ii libc6-dev 2.13-4 Embedded GNU C Library: Developmen
Versions of packages gcc-4.6 suggests:
pn binutils-gold <none> (no description available)
ii gcc-4.6-doc 4.6-20110123-1 Documentation for the GNU compiler
pn gcc-4.6-locales <none> (no description available)
pn gcc-4.6-multilib <none> (no description available)
ii libgcc1-dbg 1:4.6.0-10 GCC support library (debug symbols
pn libgomp1-dbg <none> (no description available)
pn libmudflap0-4.6-dev <none> (no description available)
pn libmudflap0-dbg <none> (no description available)
pn libquadmath0-dbg <none> (no description available)
-- no debconf information
[test.tgz (application/x-tar-gz, attachment)]
Reply sent
to Debian FTP Masters <ftpmaster@ftp-master.debian.org>:
You have taken responsibility.
(Fri, 21 Aug 2015 13:45:23 GMT) (full text, mbox, link).
Notification sent
to Samuel Thibault <sthibault@debian.org>:
Bug acknowledged by developer.
(Fri, 21 Aug 2015 13:45:23 GMT) (full text, mbox, link).
Message #10 received at 629866-done@bugs.debian.org (full text, mbox, reply):
Version: 4.6.4-7+rm
Dear submitter,
as the package gcc-4.6 has just been removed from the Debian archive
unstable we hereby close the associated bug reports. We are sorry
that we couldn't deal with your issue properly.
For details on the removal, please see https://bugs.debian.org/796274
The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.
This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.
Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Sat, 19 Sep 2015 07:41:23 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:
Thu Jan 11 05:30:04 2024;
Machine Name:
buxtehude
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.