Re: Building all static

2004-11-03 Thread Gary V. Vaughan
Hi Peter! Peter O'Gorman wrote: Hmm, sorry that I am so late into the fray. Indeed the -static flag should not require a .la file. Agreed. This was an arbitrary and strange choice. In my opinion, since libtool knows the library search paths, the extension used for shared objects, the

Re: Building all static

2004-11-03 Thread Bob Friesenhahn
On Wed, 3 Nov 2004, Gary V. Vaughan wrote: Hi Peter! Peter O'Gorman wrote: Hmm, sorry that I am so late into the fray. Indeed the -static flag should not require a .la file. Agreed. This was an arbitrary and strange choice. This is an area where I agree with you. :-) Bob

Re: Building all static

2004-11-03 Thread Bill Moseley
On Tue, Nov 02, 2004 at 12:39:10PM +, Gary V. Vaughan wrote: 2) Is there a standard way to run configure that should build a completely static binary? Assuming libtool is doing all your linking: ./configure LDFLAGS='-all-static' As I posted, that doesn't work. What does work is:

Re: Building all static

2004-11-03 Thread Gary V. Vaughan
Hi Bill, Bill Moseley wrote: On Tue, Nov 02, 2004 at 12:39:10PM +, Gary V. Vaughan wrote: 2) Is there a standard way to run configure that should build a completely static binary? Assuming libtool is doing all your linking: ./configure LDFLAGS='-all-static' As I posted, that doesn't

Re: Building all static

2004-11-03 Thread Peter O'Gorman
Gary V. Vaughan wrote: Considering Bob's posts about how static linking against system libraries gets you a binary that might stop working if you move it to another similar version, or upgrade your system... and considering that we already extract a list of automatically linked libraries for each

Re: Building all static

2004-11-03 Thread Gary V. Vaughan
Hi Peter, Peter O'Gorman wrote: Gary V. Vaughan wrote: Considering Bob's posts about how static linking against system libraries gets you a binary that might stop working if you move it to another similar version, or upgrade your system... and considering that we already extract a list of

Re: Building all static

2004-11-03 Thread Bill Moseley
Libtool, however, is certainly doing the wrong thing wrt -static. We haven't quite figured out what the right thing is though. Yet. I'm not following the details of this discussion, but I'll add my comment as an end-user and a casual developer. As a developer I don't really care about the

Re: Building all static

2004-11-03 Thread Kevin P. Fleming
Bill Moseley wrote: I don't really understand why libxml2 got linked in statically and not libz. I assume that's an issue in my Makefile.am file or how we setup libz and libxml2 in our configure script. It's probably because libxml2 itself is installed using libtool (and thus there is a

Re: Building all static

2004-11-03 Thread Gary V. Vaughan
Kevin P. Fleming wrote: Bill Moseley wrote: I don't really understand why libxml2 got linked in statically and not libz. I assume that's an issue in my Makefile.am file or how we setup libz and libxml2 in our configure script. It's probably because libxml2 itself is installed using libtool (and

Re: Building all static

2004-11-03 Thread Peter O'Gorman
Gary V. Vaughan wrote: I see. Maybe that's the same thing then, albeit a different algorithm. The problem with doing it that way is this: when libtool encounters a native (no .la) shared lib and links it, most modern platforms pull in the deplibs automatically AIUI. This certainly isn't true of

Re: Building all static

2004-11-02 Thread Gary V. Vaughan
Hi Bill, Bill Moseley wrote: Sorry for the cross post, not sure which is the correct list. My project builds a library and then builds a binary and links to that library. Someone has asked how to build a completely static binary. $ libtool --help --mode=link | grep static -all-static

Re: Building all static

2004-11-02 Thread Bill Moseley
On Tue, Nov 02, 2004 at 12:39:10PM +, Gary V. Vaughan wrote: $ libtool --help --mode=link | grep static -all-static do not do any dynamic linking at all -static do not do any dynamic linking of libtool libraries And that seems to work if I place those in my Makefile.am

Re: Building all static

2004-11-02 Thread Bob Friesenhahn
On Tue, 2 Nov 2004, Gary V. Vaughan wrote: Unless someone shouts me down, then according to the principle of least surprise, I'm inclined to change the semantics to: -static do not do any dynamic linking at all -lt-staticdo not do any dynamic linking of libtool libraries (We can keep

Re: Building all static

2004-11-02 Thread Bill Moseley
On Tue, Nov 02, 2004 at 08:35:27AM -0600, Bob Friesenhahn wrote: The main purpose of building a completely static program is to satisfy security or system bootstrap requirements (/usr partition not mounted). It is not always possible to build a completely static program. It is not usually

Re: Building all static

2004-11-02 Thread Bob Friesenhahn
On Tue, 2 Nov 2004, Bill Moseley wrote: On Tue, Nov 02, 2004 at 08:35:27AM -0600, Bob Friesenhahn wrote: The main purpose of building a completely static program is to satisfy security or system bootstrap requirements (/usr partition not mounted). It is not always possible to build a completely

Re: Building all static

2004-11-02 Thread Gary V. Vaughan
Hi Bob! Bob Friesenhahn wrote: On Tue, 2 Nov 2004, Gary V. Vaughan wrote: Unless someone shouts me down, then according to the principle of least surprise, I'm inclined to change the semantics to: -static do not do any dynamic linking at all -lt-staticdo not do any dynamic

Re: Building all static

2004-11-02 Thread Gary V. Vaughan
Hi Bill, Bill Moseley wrote: $ grep -- -static src/Makefile.am libtest_LDFLAGS = -static (which maybe answers your question if anyone is using -static) Not really. See my other post to this thread. I'm not using AC_DISABLE_STATIC in configure -- and using --enable-static

Re: Building all static

2004-11-02 Thread Ralf Wildenhues
* Bill Moseley wrote on Tue, Nov 02, 2004 at 03:33:02PM CET: On Tue, Nov 02, 2004 at 12:39:10PM +, Gary V. Vaughan wrote: $ libtool --help --mode=link | grep static -all-static do not do any dynamic linking at all -static do not do any dynamic linking of libtool

Re: Building all static

2004-11-02 Thread Bill Moseley
On Tue, Nov 02, 2004 at 03:44:20PM +, Gary V. Vaughan wrote: $ ./configure --prefix=$HOME/static LD_FLAGS='-all-static' /dev/null make install /dev/null just LDFLAGS ^^^ It's one of those mornings. $ ./configure --prefix=$HOME/static LDFLAGS='-all-static'

Re: Building all static

2004-11-02 Thread Bob Friesenhahn
On Tue, 2 Nov 2004, Gary V. Vaughan wrote: This seems like a particularly bad idea to me. What is the value of changing existing documented libtool behavior? Consistency, and user expectation. Looking through the archives I see the repeated question of why -static still links shared libraries

Re: Building all static

2004-11-02 Thread Bob Friesenhahn
On Tue, 2 Nov 2004, Ralf Wildenhues wrote: Is that a mail-only typo? You used LD_FLAGS instead of LDFLAGS. But then, configure will most likely fail soon, before libtool is even involved -- the compiler will see -all-static and barf. There's been discussion about this on this list about

Re: Building all static

2004-11-02 Thread Ralf Wildenhues
* Gary V. Vaughan wrote on Tue, Nov 02, 2004 at 04:33:45PM CET: Bob Friesenhahn wrote: On Tue, 2 Nov 2004, Gary V. Vaughan wrote: This seems like a particularly bad idea to me. What is the value of changing existing documented libtool behavior? Consistency, and user expectation.

Re: Building all static

2004-11-02 Thread Gary V. Vaughan
Replying to myself after reading more of the thread... Gary V. Vaughan wrote: Bob Friesenhahn wrote: The main purpose of building a completely static program is to satisfy security or system bootstrap requirements (/usr partition not mounted). It is not always possible to build a

Re: Building all static

2004-11-02 Thread Bruce Korb
Gary V. Vaughan wrote: Are these assumptions good? i) people who specify -static to libtool don't want to link against any dynamic libraries, and are suprised that isn't actually the case. ii) the -static option is not used to mean `link static libtool libraries, and dynamic

Re: Building all static

2004-11-02 Thread Gary V. Vaughan
Hi Bob, Ralf! Bob Friesenhahn wrote: On Tue, 2 Nov 2004, Ralf Wildenhues wrote: Is that a mail-only typo? You used LD_FLAGS instead of LDFLAGS. But then, configure will most likely fail soon, before libtool is even involved -- the compiler will see -all-static and barf. There's been

Re: Building all static

2004-11-02 Thread Gary V. Vaughan
Hi Ralf, Ralf Wildenhues wrote: Besides, it's a clear change of published interface (this doesn't mean I'm for or against the change. Just needs to be marked VERY VERY big. Users of former Libtool-type `-static' will need to use libtool --version in order to differentiate old and new

Re: Building all static

2004-11-02 Thread Bob Friesenhahn
On Tue, 2 Nov 2004, Gary V. Vaughan wrote: Boiling down to: How do we sensibly figure out which libraries need to be linked dynamically in the face of -static? This would normally be the list of libraries that the C compiler provides by default when linking. Unfortunately, GCC 3 has confused

Re: Building all static

2004-11-02 Thread Gary V. Vaughan
Hey Bruce! Bruce Korb wrote: ``-static'' needs to imply the common and ordnary meaning of ``static''. libtool is a less common and ordinary command than either gcc or ld. It is not a directly obvious thing that you would need to add the qualifier all- to it in order to actually get static

Building all static

2004-11-01 Thread Bill Moseley
Sorry for the cross post, not sure which is the correct list. My project builds a library and then builds a binary and links to that library. Someone has asked how to build a completely static binary. I have been through this before. I have a post[1] from May where I discuss building our

Re: Building all static

2004-11-01 Thread Denis Vlasenko
On Tuesday 02 November 2004 06:39, Bill Moseley wrote: Sorry for the cross post, not sure which is the correct list. My project builds a library and then builds a binary and links to that library. Someone has asked how to build a completely static binary. I have been through this before.