autoconf-patches
[Top][All Lists]
Advanced

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

Re: autoconf 2.50: Libdnet may be linked in unnecessarily with libX11


From: Pavel Roskin
Subject: Re: autoconf 2.50: Libdnet may be linked in unnecessarily with libX11
Date: Mon, 11 Jun 2001 01:18:37 -0400 (EDT)

Hello, Maciej!

>  There is a problem with AC_PATH_XTRA -- it may link in libdnet
> unnecessarily when linking with libX11.  There are two scenarios it can
> happen:

The point of Autoconf is to make it possible to compile and link projects
on your system and make them use the resources present on your system.
Eliminating "unnecessary" links is nice, but it's not a goal of Autoconf.

> 1. Libdnet is available but no DECnet support is built in into X11.

This certainly qualifies as an unnecessary link.

> 2. Libdnet is available and X11 support DECnet but libX11 and other
> relevant libraries are ELF and explicitly linked against libdnet, so they
> include appropriate DT_NEEDED entries in their dynamic sections.

But this probably does not. If you exclude libdnet at this point you won't
be able to link statically.

I wish somebody more experienced with libtool would comment on the issue.
I don't have a certain opinion in this case. This change would be helpful
for package builders trying to simplify dependencies.

On the other hand, developers sometimes want to link statically after
the project has been confiured and compiled. They will have to guess what
is missing when it doesn't link.

I personally believe that autoconf should primarily cater to developers.
Package builders can (and should) build in the controlled environment.
Besides, they know better what the system it's going to be, so they should
tell it to configure instead of expecting configure to guess it.

> In both cases the resulting executable depends on libdnet even though it
> usually has no idea of DECnet and the binary would otherwise run fine
> whether a given system supports DECnet or not.  The libdnet dependency
> prevents it from running on systems missing it.

Yes, it's a problem if you intend to copy the binary.

> No need to link against libdnet explicitly as libX11 already carries an
> appropriate dependency.

Please don't mix two separate cases. It's true only in one of them.

You have my support for the first case - no DECNET in libX11. I cannot
make a certain decision on the second case. I don't like relying on ELF,
but recompiling X to make a package for your friend (i.e. not for the
whole world) would be an overkill.

If you get support for the second case from another maintainer feel free
to apply your patch. Otherwise it should be possible to check for symbols
in libX11.

-- 
Regards,
Pavel Roskin




reply via email to

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