On 10/30/18, Hans Malissa <[email protected]> wrote:
> Thanks for the explanation. So is it generally a good practice to search for
> any *.a and *.la files that might have gotten installed while building &
> installing a package, and to delete them manually?

It really depends on your goals.  Some distributions concentrate on
trying to only use statically linked libraries or give preference to
statically linked libraries while many other distributions prefer the
shared libraries.  As Ken mentioned, for security reasons, it's easier
to update one shared library then to go through and rebuild everything
linked to a static library.  There are advantages to static libraries
though.  Systems like Bedrock Linux would not work without the basic
parts of the system being statically linked.  Rescue systems tend to
use static linking.  There was a project called sta.li at suckless.org
a while back.  They offered several reasons why they preferred
creating a statically linked Linux distribution.  Some of the smaller
Linux distributions using musl as their C library are typically
statically linked for similar reasons.  In many cases, it also makes
it easier to share a program you built with someone else who may not
have the same dependencies on his/her system.  There are pros and cons
to each approach and one approach may work better for certain
situations than the other.

I tend to build my packages in a separate directory using DESTDIR when
available.  I add commands to delete .la or other files as needed to
my build scripts so it's done automatically.  Then I install the
finished tarball on my system.  I don't typically delete the .a files
because I sometimes prefer to use them over the shared files
(depending on the circumstances).  I keep track of dependencies in my
build scripts.  So, if I need to rebuild a bunch of packages that
share a dependency, it's not a real hardship.  Most of the process can
be automated.  I do delete the .la files on a regular basis because
they're created/used by GNU autotools and may not play nice with other
build tools brought into the mix.  I also have no personal use for
them.

Sincerely,
Laura
http://www.distasis.com/cpp
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to