[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: don't install .la do install .so
From: |
Paul Elliott |
Subject: |
Re: don't install .la do install .so |
Date: |
Mon, 21 Mar 2011 14:13:24 -0500 |
User-agent: |
KMail/1.13.5 (Linux/2.6.35-28-generic; KDE/4.5.1; i686; ; ) |
On Monday, March 21, 2011 12:51:11 pm Nick Bowler wrote:
> On 2011-03-21 10:52 -0500, Paul Elliott wrote:
> > According to the Fedora Packaging:Guidelines
> > http://fedoraproject.org/wiki/Packaging/Guidelines
>
> > .la files should not be installed:
> This is a task for the Fedora packagers, and not for developers to bake
> into their makefiles. See below.
>
> > How do I create a Makefile.am for a shared library so that make install
> > will not install the .la file but will install the .so?
>
> Please do not do this. The .la files are necessary except for very
> special situations. Since Fedora has complete control over how packages
> are configured and installed, they can afford to make the necessary
> arrangements rendering the .la files unnecessary. But when your
> package is configured by a user, you have no way of knowing a priori
> whether or not they need the .la files.
>
> See the autotools FAQ entry on this:
>
>
> http://www.gnu.org/software/automake/faq/autotools-faq.html#What-are-these
> -_002ela-files-for-and-can-I-safely-remove-them_003f
>
> In particular,
>
> Removing usually only works OK if done in directories which the
> runtime linker searches by default anyway (otherwise you might need
> to set LD_LIBRARY_PATH or an equivalent variable) and only on systems
> where the runtime linker loads indirect library dependencies
> automatically (includes GNU/Linux, GNU, Solaris).
Well, the openSUSE:Shared library packaging policy
http://en.opensuse.org/openSUSE:Packaging_guidelines#Libraries
says the same thing. They seem to have copied the fedora document verbatim on
this.
Also the debian policy Manual
http://www.debian.org/doc/debian-policy/ch-files.html
says the same thing for most cases:
> Packages that use libtool to create and install their shared libraries
> install a file containing additional metadata (ending in .la) alongside
> the library. For public libraries intended for use by other packages,
> these files normally should not be included in the Debian package, since
> the information they include is not necessary to link with the shared
> library on Debian and can add unnecessary additional dependencies to other
> programs or libraries.[71] If the .la file is required for that library
> (if, for instance, it's loaded via libltdl in a way that requires that
> meta-information), the dependency_libs setting in the .la file should
> normally be set to the empty string. If the shared library development
> package has historically included the .la, it must be retained in the
> development package (with dependency_libs emptied) until all libraries
> that depend on it have removed or emptied dependency_libs in their .la
> files to prevent linking with those other libraries using libtool from
> failing.
All the distros do say that if you are not installing the library in one of
the standard places, like, /lib /usr/lib, then you should leave the .la file
there. But all the distros seem to basicly agree that in the default case
where your library is going to be linked by other programs and you are
installing in the usual places, the la file should be removed.
It seems dumb to have make install install a file only to have the distro
remove it, is there anyway to tell make install not to install it?
--
Paul Elliott 1(512)837-1096
address@hidden PMB 181, 11900 Metric Blvd Suite J
http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117
signature.asc
Description: This is a digitally signed message part.