Your message dated Sun, 29 Mar 2026 08:33:30 +0000
with message-id <[email protected]>
and subject line Bug#468555: fixed in libtool 2.5.4-10
has caused the Debian Bug report #468555,
regarding linking with g++ uses -nostdlib and does not add -lpthread or -lgcc
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
468555: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
Source: libtool
Source-Version: 2.5.4-10
Done: Alastair McKinstry <[email protected]>
We believe that the bug you reported is fixed in the latest version of
libtool, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Alastair McKinstry <[email protected]> (supplier of updated libtool package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sun, 29 Mar 2026 09:00:38 +0100
Source: libtool
Architecture: source
Version: 2.5.4-10
Distribution: unstable
Urgency: medium
Maintainer: Alastair McKinstry <[email protected]>
Changed-By: Alastair McKinstry <[email protected]>
Closes: 468555 1019725 1124137
Changes:
libtool (2.5.4-10) unstable; urgency=medium
.
* Drop Priority: optional from source in d/control per new policy
* Standards-Version: 4.7.3
* Enable repeated builds
* Move d/watch to v5 syntax
* Build with hardening enabled
* Add support for `<nodoc>` build profile (Closes: #1124137)
* Closing old bug already merged upstream. Closes: #1019725
* Backport by Adrian Bunk of patch to opt out of --nostdlib.
Closes: #468555
Checksums-Sha1:
646506ab207b2f888617261ea6f930ae42a6c161 2291 libtool_2.5.4-10.dsc
5496a65e76feef8f53eeeb93c483e53f0b442dc6 45756 libtool_2.5.4-10.debian.tar.xz
Checksums-Sha256:
2d54fe2202d2c7df6df24244f19aa55cfebe487c2a0ade0af7e4eed656cf9c00 2291
libtool_2.5.4-10.dsc
74dd318b8d502452a575f1fb364bc4ae8e7edff5d2e563a60d4409ec8a598a8a 45756
libtool_2.5.4-10.debian.tar.xz
Files:
a1debe29914e4807f80c9740020da192 2291 devel optional libtool_2.5.4-10.dsc
b3d88838ab39d22bd1e6fb6b244dc81b 45756 devel optional
libtool_2.5.4-10.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEgjg86RZbNHx4cIGiy+a7Tl2a06UFAmnI3OsACgkQy+a7Tl2a
06UroRAAiniC/3RZY1zFmQ9H/4DwlpuS9lZWilDquqzbP3k2DlLQ/EDQISpUTvfw
l57BoBP5/Qr4U0I86PHjeNCZ0uMLLj4KAZL3KyUZGpaAd+3sXxRdJaZCCvjsxzvf
mYhw7bg3wzdm3H93s1Qt0WxhIAUNNgIc27AycYF1eaXf6waEaNHcZS/pAVCMMqQf
hMujNz9U2EpH0/+usYpX/Ax5JIPHgsGmgvLh3VaonIAlFH6NDxT/m1jrPJhmnx0U
jFKvcV5TKhQxAOKCNyq+GCQrNF3q4eQaDkCT1lOO/M09Wbjki3/r8LtArk3wWOuM
I+2BvtOKER1yYoZuAc/gdsFIhQJWVU5q3Uj0nPwywCy+YyPINBDU0baNGdn6JnHh
sMOb27exVgMhEyBJ2+nVEDl7L4C12wcHm5w0UVqPuP4V7iZg9HIUXFiixJRrih21
MGD/Nq9FQ2o330mQ5gtdyAxtSEwWk1FyQDQFlY/CjexloHEe6S+61Sm9dM8rbJI7
o5vCupy0mW5vPV8v810wPTDogZKwysAlbwpZLQMISPt4h8Xslu0vnOdxU+ejDmJy
F+iCnubqknFvPyvU5nRagcWK6okMj5EhWUxYBG36z28zzpT9xNujjInW1z+E+n4q
w6w1rmpxVhS0ARWA61bf0tRs2ZrETx7SV15icAuiAS4Pxrr2A8k=
=SWUR
-----END PGP SIGNATURE-----
pgpJWFyAilfZt.pgp
Description: PGP signature
--- End Message ---