libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[3]: libtool shouldn't switch to creating static library if it can't c


From: Vadim Zeitlin
Subject: Re[3]: libtool shouldn't switch to creating static library if it can't create the shared one under Windows
Date: Fri, 17 Jun 2011 01:34:22 +0200

On Thu, 16 Jun 2011 18:15:01 -0500 (CDT) Bob Friesenhahn <address@hidden> wrote:

BF> On Thu, 16 Jun 2011, Vadim Zeitlin wrote:
BF> > BF>
BF> > BF> In what way was libtool specifically requested to build a DLL?
BF> >
BF> > I'm not sure about the details (please keep in mind that we're speaking
BF> > about libxml2 here and not my own project) but configure[*] is passed
BF> > --disable-static option and AFAIK this is handled by AM_PROG_LIBTOOL as
BF> > meaning that [only] shared libraries should be built, isn't it?
BF> 
BF> It does seem like falling back to building a static library when 
BF> --disable-static has been specified is a bug.

 I didn't think about it from this point of view but now that I do, I can't
help but agree with you ;-)

BF> > IOW I don't think an example when proceeding ahead is a viable solution is
BF> > possible. Do you have anything concrete in mind?
BF> 
BF> As it happens, GCC under MinGW and Cygwin does have an "auto-import" 
BF> facility which magically allows it to work for code built with GCC. 

 Yes, sorry, I keep forgetting about auto-import feature, I guess I'm just
too accustomed to the "traditional" Windows way and have trouble accepting
auto-import magic. It's true that projects using auto-import could live
with falling back to a static library. But consider that auto-importing is
relatively new so there should be proportionally few projects using it,
hence IMHO the risk of breakage remains reasonably small.

 Anyhow, logically I think there are 3 possible behaviours for libtool:

1. Build static library.
2. Try to build shared library but fall back to static if it failed.
3. Build shared library and give an error if it failed.

 As you wrote, --disable-static would seem to imply (3). If (2) is really
wanted (and I'm still sceptical about it as the set of projects using
auto-import and for which building a DLL is expected, for some reason, to
fail should be very small) it seems like another option is needed, e.g.
--prefer-shared, to choose it.

 Regards,
VZ

Attachment: pgppGZJLb57fj.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]