Bug#492220: static linking is broken

2008-07-28 Thread Ralf Wildenhues
* Peter Samuelson wrote on Sun, Jul 27, 2008 at 01:16:23AM CEST:
 [Ralf Wildenhues]
  Try using -all-static, libtool defines -static as linking statically
  against uninstalled libtool libraries only.
 
 That works.  But why then does -static cause libtool to pull in all of
 a library's declared dependencies?  It should trust the ld.so, like the
 default --mode=link case.

Since not pulling in all dependencies, direct and indirect, is a feature
currently only enabled in Debian's version of libtool, this sounds like
a limitation of that feature in Debian.

That said, a fix would be interesting for upstream as well.

IOW, I agree with you that there is a bug.  It's not that it should
specifically trust ld.so, just that it should not pull in indirect
dependencies.

Cheers,
Ralf



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#492220: static linking is broken

2008-07-26 Thread Peter Samuelson

[Ralf Wildenhues]
 Try using -all-static, libtool defines -static as linking statically
 against uninstalled libtool libraries only.

That works.  But why then does -static cause libtool to pull in all of
a library's declared dependencies?  It should trust the ld.so, like the
default --mode=link case.
-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/


signature.asc
Description: Digital signature


Bug#492220: static linking is broken

2008-07-24 Thread Ralf Wildenhues
Hello Peter,

* Peter Samuelson wrote on Thu, Jul 24, 2008 at 03:48:19PM CEST:
   $ libtool --mode=link gcc -static -o foo foo.o -lxml2
   gcc -o foo foo.o  /usr/lib/libxml2.so
 
 There are two problems with this:
 (1) gcc never sees the -static flag
 (2) gcc gets libraries as libxml2.so instead of libxml2.a (or indeed -lxml2)

Try using -all-static, libtool defines -static as linking statically
against uninstalled libtool libraries only.

Hope that helps.

Cheers,
Ralf



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#492220: static linking is broken

2008-07-24 Thread Peter Samuelson
Package: libtool
Version: 1.5.26-4
Severity: normal

  $ libtool --mode=link gcc -static -o foo foo.o -lxml2
  gcc -o foo foo.o  /usr/lib/libxml2.so

There are two problems with this:
(1) gcc never sees the -static flag
(2) gcc gets libraries as libxml2.so instead of libxml2.a (or indeed -lxml2)

Not that I'm a big fan of static linking, but that _is_ the reason we
usually give for keeping .la files around at all, since libtool on
Debian works fine without them, for dynamic linking.

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

Kernel: Linux 2.6.20-1-k7 (SMP w/1 CPU core)
Locale: LANG=en_US.ISO-8859-15, LC_CTYPE=en_US.iso885915 (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/dash

Versions of packages libtool depends on:
ii  autotools-dev20080123.1  Update infrastructure for config.{
ii  cpp  4:4.3.1-2   The GNU C preprocessor (cpp)
ii  file 4.24-3  Determines file type using magic
ii  gcc [c-compiler] 4:4.3.1-2   The GNU C compiler
ii  gcc-2.95 [c-compiler]1:2.95.4-27 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-8 The GNU C compiler
ii  gcc-4.0 [c-compiler] 4.0.3-7 The GNU C compiler
ii  gcc-4.1 [c-compiler] 4.1.2-23The GNU C compiler
ii  gcc-4.2 [c-compiler] 4.2.4-2+b1  The GNU C compiler
ii  gcc-4.3 [c-compiler] 4.3.1-3 The GNU C compiler
ii  gcc272 [c-compiler]  2.7.2.3-19  The GNU C compiler.
ii  libc6-dev [libc-dev] 2.7-12  GNU C Library: Development Librari

Versions of packages libtool recommends:
pn  libltdl3-dev  none (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]