Dan Harkless wrote:
> Drazen Kacar <[EMAIL PROTECTED]> writes:
> > I think developers tend to use libtool because they would very much
> > like to believe that it solves linking problems. 
> 
> And they believe that because in almost all cases, it's true.

On a number of platforms libtool doesn't link the libraries in the way
that platform documentation recommends.

> > In my experience it just takes control from the user
> 
> What control does it take away?

When linking libraries it ignores LDFLAGS. On SYSV-ish platforms, it picks
the wrong linker by default (this might depend on the compiler you're
using, but since the correct linker is actually the compiler you're using,
I can't find the excuse for this). It takes away the ability to specify
positional linker flags. When compiling libraries it severely limits the
choice of compilers (might be platform dependant, but I doubt it). There
is no sane way to tell it to discard all flags it thinks are correct
(except those which are specified by POSIX.2, as those are the only ones
which are always correct).

> > and offers nothing in return.
> 
> Nothing??  Sorry, but that's pretty massive hyperbole.

Well, I don't remember ever seeing libtool linking libraries in a way I
wanted them to be linked. No matter what I put in LDFLAGS or LIBS. Which
is why I end up linking libraries by hand in spite of libtool. That's not
a massive hyperbole, that's a massive amount of work required to have
libraries linked in a way which platform documentation recommends.

> > The whole screw-up happens because SSL libraries are in /usr/local/lib.
> > Pretty standard place, don't you think?

> Yup.  It's not the default for OpenSSL, though.  It installs in
> /usr/local/ssl/lib by default.  As `configure --help' tells you:

Yes, but it shouldn't produce unusable binary when compiling with gcc.
If I didn't say --with-ssl=/usr/local than it's OK if I don't get SSL
support, but it's not OK if I end up with unusable binary without any
error or warning.

> >   [7]     RPATH       $ORIGIN/../lib
> 
> Sure, just use whatever custom LDFLAGS you would have used without libtool
> in the picture.  It will respect and use them.

I don't know how to use LDFLAGS for this, so I'm using something else
which bypasses libtool entirely. But, if libtool decides it should use
-R/usr/local/lib (or whatever), how do I tell it that it's not a good idea?

> It's just that the average user no longer needs to be a shared library
> expert, as you apparently are.

I'm not. And I don't think one gets "shared library expert" title if one
just reads a little bit of documentation.

-- 
 .-.   .-.    Sarcasm is just one more service we offer.
(_  \ /  _)
     |        [EMAIL PROTECTED]
     |

Reply via email to