Debian Bug report logs - #468555
linking with g++ uses -nostdlib and does not add -lpthread or -lgcc

version graph

Package: libtool; Maintainer for libtool is Kurt Roeckx <kurt@roeckx.be>; Source for libtool is src:libtool.

Reported by: Vincent Danjean <vdanjean@debian.org>

Date: Fri, 29 Feb 2008 13:42:01 UTC

Severity: important

Tags: upstream

Found in versions libtool/1.5.26-1, libtool/2.1a+cvs1.2525+20071016-1, libtool/2.4.2-1

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, Kurt Roeckx <kurt@roeckx.be>:
Bug#468555; Package libtool. Full text and rfc822 format available.

Acknowledgement sent to Vincent Danjean <vdanjean@debian.org>:
New Bug report received and forwarded. Copy sent to Kurt Roeckx <kurt@roeckx.be>. Full text and rfc822 format available.

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

From: Vincent Danjean <vdanjean@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libtool in link mode makes the -pthread flags ignored
Date: Fri, 29 Feb 2008 14:40:34 +0100
Package: libtool
Version: 1.5.26-1
Severity: normal

I've an automake/libtool project where I build a library. This library
uses pthread functions so it needs to be linked against (dynamic
library).
To find the flags to use to be linked against the libpthread, I use
the ACX_PTHREAD m4 macro (from the autoconf-archive package).
It finds that all is needed is the FLAGS "-pthread"

However, libtool invoque the g++ linker with the -nostdlib flags that
render the -pthread flags ignored.
How can this be avoided ?
(for now, I've disabled the ACX_MACRO on linux and used the hard coded
-lpthread flags but I do not find this really portable...)


Here is some examples to illustrate what I said:

The fact that libtool use add -nostdlib when it calls the real linker
(g++ here)

vdanjean@cayuga:~/travail/Recherche/KAAPI/git/build$ /bin/sh ./libtool --tag=CXX  --mode=link g++  -g -O2 -version-info 0:0:0  -o libkaapi.la -rpath /home/vdanjean/kaapi/lib  utils/libkaapiutils.la kernel/libkaapicore.la rfo/libkaapirfo.la dfg/libkaapidfg.la network/libkaapinet.la ws/libkaapiws.la api-atha/libatha.la st/libkaapisched.la -pthread
rm -fr  .libs/libkaapi.la .libs/libkaapi.lai .libs/libkaapi.so .libs/libkaapi.so.0 .libs/libkaapi.so.0.0.0
g++ -shared -nostdlib /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.2.3/crtbeginS.o  -Wl,--whole-archive utils/.libs/libkaapiutils.a kernel/.libs/libkaapicore.a rfo/.libs/libkaapirfo.a dfg/.libs/libkaapidfg.a network/.libs/libkaapinet.a ws/.libs/libkaapiws.a api-atha/.libs/libatha.a st/.libs/libkaapisched.a -Wl,--no-whole-archive -lrt -L/usr/lib/gcc/i486-linux-gnu/4.2.3 -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i486-linux-gnu/4.2.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crtn.o  -pthread -Wl,-soname -Wl,libkaapi.so.0 -o .libs/libkaapi.so.0.0.0
(cd .libs && rm -f libkaapi.so.0 && ln -s libkaapi.so.0.0.0 libkaapi.so.0)
(cd .libs && rm -f libkaapi.so && ln -s libkaapi.so.0.0.0 libkaapi.so)
creating libkaapi.la
(cd .libs && rm -f libkaapi.la && ln -s ../libkaapi.la libkaapi.la)
vdanjean@cayuga:~/travail/Recherche/KAAPI/git/build$ objdump -x
.libs/libkaapi.so.0.0.0 | grep NEEDED | grep pthread
vdanjean@cayuga:~/travail/Recherche/KAAPI/git/build$ /bin/sh ./libtool --tag=CXX  --mode=link g++  -g -O2 -version-info 0:0:0  -o libkaapi.la -rpath /home/vdanjean/kaapi/lib  utils/libkaapiutils.la kernel/libkaapicore.la rfo/libkaapirfo.la dfg/libkaapidfg.la network/libkaapinet.la ws/libkaapiws.la api-atha/libatha.la st/libkaapisched.la -lpthread
rm -fr  .libs/libkaapi.la .libs/libkaapi.lai .libs/libkaapi.so .libs/libkaapi.so.0 .libs/libkaapi.so.0.0.0
g++ -shared -nostdlib /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.2.3/crtbeginS.o  -Wl,--whole-archive utils/.libs/libkaapiutils.a kernel/.libs/libkaapicore.a rfo/.libs/libkaapirfo.a dfg/.libs/libkaapidfg.a network/.libs/libkaapinet.a ws/.libs/libkaapiws.a api-atha/.libs/libatha.a st/.libs/libkaapisched.a -Wl,--no-whole-archive -lrt -lpthread -L/usr/lib/gcc/i486-linux-gnu/4.2.3 -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i486-linux-gnu/4.2.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crtn.o  -Wl,-soname -Wl,libkaapi.so.0 -o .libs/libkaapi.so.0.0.0
(cd .libs && rm -f libkaapi.so.0 && ln -s libkaapi.so.0.0.0 libkaapi.so.0)
(cd .libs && rm -f libkaapi.so && ln -s libkaapi.so.0.0.0 libkaapi.so)
creating libkaapi.la
(cd .libs && rm -f libkaapi.la && ln -s ../libkaapi.la libkaapi.la)
vdanjean@cayuga:~/travail/Recherche/KAAPI/git/build$ objdump -x
.libs/libkaapi.so.0.0.0 | grep NEEDED | grep pthread
  NEEDED      libpthread.so.0
vdanjean@cayuga:~/travail/Recherche/KAAPI/git/build$ 


The fact that g++ ignore -pthread when -nostdlib is present :

vdanjean@cayuga:/tmp$ cat toto.c 
int main() {return 0; }
vdanjean@cayuga:/tmp$ g++ -c -Wall toto.c 
vdanjean@cayuga:/tmp$ g++ -v  -shared   toto.o -pthread  -lrt -Wl,-soname -Wl,libkaapi.so.0 -o toto 
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libmudflap --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.3 (Debian 4.2.3-1)
 /usr/lib/gcc/i486-linux-gnu/4.2.3/collect2 --eh-frame-hdr -m elf_i386 --hash-style=both -shared -o toto /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.2.3/crtbeginS.o -L/usr/lib/gcc/i486-linux-gnu/4.2.3 -L/usr/lib/gcc/i486-linux-gnu/4.2.3 -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../.. toto.o -lrt -soname libkaapi.so.0 -lstdc++ -lm -lgcc_s -lpthread -lc -lgcc_s /usr/lib/gcc/i486-linux-gnu/4.2.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crtn.o
vdanjean@cayuga:/tmp$ objdump -x toto | grep NEEDED | grep pthread
  NEEDED      libpthread.so.0
vdanjean@cayuga:/tmp$ g++ -v -shared -nostdlib /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.2.3/crtbeginS.o   toto.o -pthread  -lrt -L/usr/lib/gcc/i486-linux-gnu/4.2.3 -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../..  -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i486-linux-gnu/4.2.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crtn.o  -Wl,-soname -Wl,libkaapi.so.0 -o toto 
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libmudflap --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.3 (Debian 4.2.3-1)
 /usr/lib/gcc/i486-linux-gnu/4.2.3/collect2 --eh-frame-hdr -m elf_i386 --hash-style=both -shared -o toto -L/usr/lib/gcc/i486-linux-gnu/4.2.3 -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../..  -L/usr/lib/gcc/i486-linux-gnu/4.2.3 -L/usr/lib/gcc/i486-linux-gnu/4.2.3 -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../..  /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.2.3/crtbeginS.o toto.o -lrt -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i486-linux-gnu/4.2.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crtn.o -soname libkaapi.so.0
vdanjean@cayuga:/tmp$ objdump -x toto | grep NEEDED | grep pthread
vdanjean@cayuga:/tmp$ 


  Best regards,
    Vincent


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
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 libtool depends on:
ii  autotools-dev                 20070725.1 Update infrastructure for config.{
ii  cpp                           4:4.2.2-2  The GNU C preprocessor (cpp)
ii  file                          4.23-2     Determines file type using "magic"
ii  gcc [c-compiler]              4:4.2.2-2  The GNU C compiler
ii  gcc-3.3 [c-compiler]          1:3.3.6-15 The GNU C compiler
ii  gcc-3.4 [c-compiler]          3.4.6-6    The GNU C compiler
ii  gcc-4.1 [c-compiler]          4.1.2-19   The GNU C compiler
ii  gcc-4.2 [c-compiler]          4.2.3-1    The GNU C compiler
ii  libc6-dev [libc-dev]          2.7-8      GNU C Library: Development Librari

Versions of packages libtool recommends:
ii  libltdl3-dev                  1.5.26-1   A system independent dlopen wrappe

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Kurt Roeckx <kurt@roeckx.be>:
Bug#468555; Package libtool. Full text and rfc822 format available.

Acknowledgement sent to Vincent Danjean <Vincent.Danjean@ens-lyon.org>:
Extra info received and forwarded to list. Copy sent to Kurt Roeckx <kurt@roeckx.be>. Full text and rfc822 format available.

Message #10 received at 468555@bugs.debian.org (full text, mbox):

From: Vincent Danjean <Vincent.Danjean@ens-lyon.org>
To: 468555@bugs.debian.org
Subject: Re: libtool in link mode makes the -pthread flags ignored
Date: Fri, 29 Feb 2008 14:53:06 +0100
  Hi,

  I just see that gcc refused to see this as one of their bug :
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460

  Best regards,
    Vincent





Information forwarded to debian-bugs-dist@lists.debian.org, Kurt Roeckx <kurt@roeckx.be>:
Bug#468555; Package libtool. Full text and rfc822 format available.

Acknowledgement sent to Vincent Danjean <vdanjean@debian.org>:
Extra info received and forwarded to list. Copy sent to Kurt Roeckx <kurt@roeckx.be>. Full text and rfc822 format available.

Message #15 received at 468555@bugs.debian.org (full text, mbox):

From: Vincent Danjean <vdanjean@debian.org>
To: Debian Bug Tracking System <468555@bugs.debian.org>
Subject: new libtool still does not honour the -pthread flags when creating a library
Date: Fri, 29 Feb 2008 17:54:37 +0100
Package: libtool
Version: 2.1a+cvs1.2525+20071016-1
Followup-For: Bug #468555

  Hi,

  I just try with libtool from experimental. The bug is still here (even
if something changed as the -pthread flags appears twice now in the g++
invocation).
g++ is always invoked with -nostdlib AND -pthread so -pthread is
ignored and the library is not linked to libpthread.

vdanjean@cayuga:~/travail/Recherche/KAAPI/git/build$ /bin/sh ./libtool --tag=CXX  --mode=link g++  -g -O2 -version-info 0:0:0 -pthread  -o libkaapi.la -rpath /home/vdanjean/kaapi/lib  utils/libkaapiutils.la kernel/libkaapicore.la rfo/libkaapirfo.la dfg/libkaapidfg.la network/libkaapinet.la ws/libkaapiws.la api-atha/libatha.la st/libkaapisched.la 
libtool: link: rm -fr  .libs/libkaapi.la .libs/libkaapi.lai .libs/libkaapi.so .libs/libkaapi.so.0 .libs/libkaapi.so.0.0.0
libtool: link: g++ -shared -nostdlib /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.2.3/crtbeginS.o  -Wl,--whole-archive utils/.libs/libkaapiutils.a kernel/.libs/libkaapicore.a rfo/.libs/libkaapirfo.a dfg/.libs/libkaapidfg.a network/.libs/libkaapinet.a ws/.libs/libkaapiws.a api-atha/.libs/libatha.a st/.libs/libkaapisched.a -Wl,--no-whole-archive -lrt -L/usr/lib/gcc/i486-linux-gnu/4.2.3 -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i486-linux-gnu/4.2.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crtn.o  -pthread -pthread -Wl,-soname -Wl,libkaapi.so.0 -o .libs/libkaapi.so.0.0.0
libtool: link: (cd ".libs" && rm -f "libkaapi.so.0" && ln -s "libkaapi.so.0.0.0" "libkaapi.so.0")
libtool: link: (cd ".libs" && rm -f "libkaapi.so" && ln -s "libkaapi.so.0.0.0" "libkaapi.so")
libtool: link: creating libkaapi.la
libtool: link: ( cd ".libs" && rm -f "libkaapi.la" && ln -s "../libkaapi.la" "libkaapi.la" )
vdanjean@cayuga:~/travail/Recherche/KAAPI/git/build$ !obj
objdump -x .libs/libkaapi.so.0.0.0 | grep NEEDED | grep pthread
vdanjean@cayuga:~/travail/Recherche/KAAPI/git/build$ less libtool 

  Best regards,
    Vincent


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
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 libtool depends on:
ii  autotools-dev                 20070725.1 Update infrastructure for config.{
ii  cpp                           4:4.2.2-2  The GNU C preprocessor (cpp)
ii  file                          4.23-2     Determines file type using "magic"
ii  gcc [c-compiler]              4:4.2.2-2  The GNU C compiler
ii  gcc-3.3 [c-compiler]          1:3.3.6-15 The GNU C compiler
ii  gcc-3.4 [c-compiler]          3.4.6-6    The GNU C compiler
ii  gcc-4.1 [c-compiler]          4.1.2-19   The GNU C compiler
ii  gcc-4.2 [c-compiler]          4.2.3-1    The GNU C compiler
ii  libc6-dev [libc-dev]          2.7-8      GNU C Library: Development Librari

Versions of packages libtool recommends:
ii  libltdl7-dev   2.1a+cvs1.2525+20071016-1 A system independent dlopen wrappe

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Kurt Roeckx <kurt@roeckx.be>:
Bug#468555; Package libtool. (Sun, 25 Jan 2009 12:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bastien ROUCARIES <roucaries.bastien+debian@gmail.com>:
Extra info received and forwarded to list. Copy sent to Kurt Roeckx <kurt@roeckx.be>. (Sun, 25 Jan 2009 12:42:02 GMT) Full text and rfc822 format available.

Message #20 received at 468555@bugs.debian.org (full text, mbox):

From: Bastien ROUCARIES <roucaries.bastien+debian@gmail.com>
To: 468555@bugs.debian.org
Subject: [libtool] -nostdlib linking provoque FTBS
Date: Sun, 25 Jan 2009 13:39:59 +0100
retitle 468555 -nostdlib linking provoque FTBS
severity 468555 serious
block 468555 512252
thanks

Automatic linking with -nostdlib do not link with libgcc and therefore provoque a serious mess. Lib pthread is another exemple.

For an exemple see bug 512252 that is under investigation, and will hurt us for next version of djvulibre, therefore serious because it could hurt poor soul
programmer and lead to hard to debug bug :-/ 

Please correct this quite old bug:
Seems a libtool bug :(

http://gcc.gnu.org/ml/gcc/2001-09/msg00262.html
http://www.archivum.info/libtool@gnu.org/2005-03/msg00272.html

gcc say it is not a gcc bug
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460

Adding lib dependancy to libgcc is messy because other compiler do not need to lin against libgcc.

Regards.

Bastien
-- 

"ROUCARIÈS Bastien"
                                            roucaries.bastien+debian@gmail.com
-------------------------------------------------------------------------------
DO NOT WRITE TO roucaries.bastien+blackhole@gmail.com OR BE BLACKLISTED




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#468555; Package libtool. (Sun, 25 Jan 2009 13:54:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kurt Roeckx <kurt@roeckx.be>:
Extra info received and forwarded to list. (Sun, 25 Jan 2009 13:54:05 GMT) Full text and rfc822 format available.

Message #25 received at 468555@bugs.debian.org (full text, mbox):

From: Kurt Roeckx <kurt@roeckx.be>
To: Bastien ROUCARIES <roucaries.bastien+debian@gmail.com>, 468555@bugs.debian.org
Subject: Re: Bug#468555: [libtool] -nostdlib linking provoque FTBS
Date: Sun, 25 Jan 2009 14:50:41 +0100
On Sun, Jan 25, 2009 at 01:39:59PM +0100, Bastien ROUCARIES wrote:
> retitle 468555 -nostdlib linking provoque FTBS
> severity 468555 serious
> block 468555 512252
> thanks
> 
> Automatic linking with -nostdlib do not link with libgcc and therefore provoque a serious mess. Lib pthread is another exemple.
> 
> For an exemple see bug 512252 that is under investigation, and will hurt us for next version of djvulibre, therefore serious because it could hurt poor soul
> programmer and lead to hard to debug bug :-/ 

It might be an annoying bug, but that does not mean it's a serious
error for this package.


Kurt





Information forwarded to debian-bugs-dist@lists.debian.org, Kurt Roeckx <kurt@roeckx.be>:
Bug#468555; Package libtool. (Sun, 25 Jan 2009 16:15:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to roucaries bastien <roucaries.bastien+debian@gmail.com>:
Extra info received and forwarded to list. Copy sent to Kurt Roeckx <kurt@roeckx.be>. (Sun, 25 Jan 2009 16:15:08 GMT) Full text and rfc822 format available.

Message #30 received at 468555@bugs.debian.org (full text, mbox):

From: roucaries bastien <roucaries.bastien+debian@gmail.com>
To: Kurt Roeckx <kurt@roeckx.be>
Cc: 468555@bugs.debian.org, Matthias Klose <doko@cs.tu-berlin.de>
Subject: Re: Bug#468555: [libtool] -nostdlib linking provoque FTBS
Date: Sun, 25 Jan 2009 17:13:34 +0100
On Sun, Jan 25, 2009 at 2:50 PM, Kurt Roeckx <kurt@roeckx.be> wrote:
> On Sun, Jan 25, 2009 at 01:39:59PM +0100, Bastien ROUCARIES wrote:
>> retitle 468555 -nostdlib linking provoque FTBS
>> severity 468555 serious
>> block 468555 512252
>> thanks
>>
>> Automatic linking with -nostdlib do not link with libgcc and therefore provoque a serious mess. Lib pthread is another exemple.
>>
>> For an exemple see bug 512252 that is under investigation, and will hurt us for next version of djvulibre, therefore serious because it could hurt poor soul
>> programmer and lead to hard to debug bug :-/
>
> It might be an annoying bug, but that does not mean it's a serious
> error for this package.

Every c++ lib is linking by default with -nostdlib :( Depending of
buildin used by gcc, gcc version and phase of moon, it could work or
not work. Morevoer it could lead to hisenbug.

Moreover it break at link time or even at run time of the program
depending of the arch used. I think it is serious because we do not
know the number of program affected at run time, and this the next
compiler build ins are more important and therefore this bug could be
generic.

Do not really know if it is a goal for lenny or should be fixed after.

An esay work arround is to add a -lgcc on the lib list but it is ugly
and should die. For lenny it will be sufficient but we should fix this
bug before this kind of workarround be generalized. Linking with
nostdlib is evil and poor soul love band aid like -lgcc :(

Regards

Bastien




Information forwarded to debian-bugs-dist@lists.debian.org, Kurt Roeckx <kurt@roeckx.be>:
Bug#468555; Package libtool. (Sun, 25 Jan 2009 16:18:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bastien ROUCARIES <roucaries.bastien+debian@gmail.com>:
Extra info received and forwarded to list. Copy sent to Kurt Roeckx <kurt@roeckx.be>. (Sun, 25 Jan 2009 16:18:05 GMT) Full text and rfc822 format available.

Message #35 received at 468555@bugs.debian.org (full text, mbox):

From: Bastien ROUCARIES <roucaries.bastien+debian@gmail.com>
To: 468555@bugs.debian.org, Debian bugs control server <control@bugs.debian.org>
Subject: [libtool] -nostdlib linking provoque FTBS
Date: Sun, 25 Jan 2009 17:16:01 +0100
retitle 468555 -nostdlib linking provoque FTBS
severity 468555 serious
block 468555 512252
thanks

Automatic linking with -nostdlib do not link with libgcc and therefore provoque a serious mess. Lib pthread is another exemple.

For an exemple see bug 512252 that is under investigation, and will hurt us for next version of djvulibre, therefore serious because it could hurt poor soul
programmer and lead to hard to debug bug :-/ 

Please correct this quite old bug:
Seems a libtool bug :(

http://gcc.gnu.org/ml/gcc/2001-09/msg00262.html
http://www.archivum.info/libtool@gnu.org/2005-03/msg00272.html

gcc say it is not a gcc bug
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460

Adding lib dependancy to libgcc is messy because other compiler do not need to lin against libgcc.

Regards.

Bastien
-- 

"ROUCARIÈS Bastien"
                                            roucaries.bastien+debian@gmail.com
-------------------------------------------------------------------------------
DO NOT WRITE TO roucaries.bastien+blackhole@gmail.com OR BE BLACKLISTED
-- 




Changed Bug title to `-nostdlib linking provoque FTBS' from `libtool in link mode makes the -pthread flags ignored'. Request was from Bastien ROUCARIES <roucaries.bastien+debian@gmail.com> to control@bugs.debian.org. (Sun, 25 Jan 2009 16:18:06 GMT) Full text and rfc822 format available.

Severity set to `serious' from `normal' Request was from Bastien ROUCARIES <roucaries.bastien+debian@gmail.com> to control@bugs.debian.org. (Sun, 25 Jan 2009 16:18:06 GMT) Full text and rfc822 format available.

Severity set to `important' from `serious' Request was from kurt@roeckx.be (Kurt Roeckx) to control@bugs.debian.org. (Sun, 25 Jan 2009 16:33:05 GMT) Full text and rfc822 format available.

Changed Bug title to `linking with g++ uses -nostdlib and does not add -lpthread or -lgcc' from `-nostdlib linking provoque FTBS'. Request was from kurt@roeckx.be (Kurt Roeckx) to control@bugs.debian.org. (Sun, 25 Jan 2009 16:33:06 GMT) Full text and rfc822 format available.

Blocking bugs of 512252 added: 468555 Request was from Bastien ROUCARIES <roucaries.bastien+debian@gmail.com> to control@bugs.debian.org. (Sun, 25 Jan 2009 16:42:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Kurt Roeckx <kurt@roeckx.be>:
Bug#468555; Package libtool. (Wed, 01 Feb 2012 00:36:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Russ Allbery <rra@debian.org>:
Extra info received and forwarded to list. Copy sent to Kurt Roeckx <kurt@roeckx.be>. (Wed, 01 Feb 2012 00:36:03 GMT) Full text and rfc822 format available.

Message #50 received at 468555@bugs.debian.org (full text, mbox):

From: Russ Allbery <rra@debian.org>
To: Debian Bug Tracking System <468555@bugs.debian.org>
Subject: Re: linking with g++ uses -nostdlib and does not add -lpthread or -lgcc
Date: Tue, 31 Jan 2012 16:34:00 -0800
Package: libtool
Version: 2.4.2-1
Followup-For: Bug #468555

I can confirm that the -pthread portion of this bug still persists with
Libtool 2.4.2.  I'm working around it for the C++ libraries that I'm
packaging by adding:

# Force linking with -lpthread, working around a bug in libtool that drops
# the linkage because it uses -nostdlib.  See #468555.
export DEB_LDFLAGS_MAINT_APPEND = -lpthread

to debian/rules.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.1.0-1-686-pae (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libtool depends on:
ii  autotools-dev         20110511.1
ii  cpp                   4:4.6.2-4
ii  file                  5.09-2
ii  gcc [c-compiler]      4:4.6.2-4
ii  gcc-4.4 [c-compiler]  4.4.6-14
ii  gcc-4.5 [c-compiler]  4.5.3-9
ii  gcc-4.6 [c-compiler]  4.6.2-11
ii  libc6-dev [libc-dev]  2.13-24

Versions of packages libtool recommends:
ii  libltdl-dev  2.4.2-1

Versions of packages libtool suggests:
ii  autoconf                       2.68-1
ii  automake [automaken]           1:1.11.2-1
ii  gcj                            <none>
ii  gfortran | fortran95-compiler  <none>
ii  libtool-doc                    2.4.2-1

-- no debconf information




Added tag(s) upstream. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sun, 13 May 2012 21:12:09 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 22:11:48 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.