Re: Shared & Static Libraries and Libtool Files
Hans Malissa <[email protected]> Tue, 30 Oct 2018 21:06:47 GMT
| Newsgroups | gmane.linux.lfs.general |
|---|---|
| Message-ID | <[email protected]> |
On Oct 30, 2018, at 02:16 PM, Ken Moffat <[email protected]> wrote: On Tue, Oct 30, 2018 at 07:26:54PM +0000, Hans Malissa wrote: Hi all, I'm reading BLFS (8.3 systemd), Chapter 2, the sections about libraries (*.so vs. *.a) and libtool files (*.la). (Also in LFS 8.3 systemd, section 6.79.) Not sure if I understand this correctly: (1) the static (*.a) libraries get built sometimes, they aren't needed, but they're not going to do any harm if I don't remove them; (2) the libtool (*.la) files also get built, and it's better to remove those because they might interfere with other build processes. Is that about right? And the 'remove-la-files.sh' script is supposed to clean up the *.la files. So is the best strategy to run the script every time I build some package? Or just from time to time? Or just for specific packages? Greetings, Hans The point about static libs (in general) is that they may be silently linked into another package. In itself that is not a problem, except when a vulnerability comes to light. For a shared lib you can see what links to it, for static libs you can only find out by digging through all your build logs. That is why in BLFS we attempt to avoid them. But for LFS, some of them (particularly, those from the toolchain packages) are used when running testsuites. For LFS itself, it is also possible to do something wrong, particularly when moving the shared libs. In those cases, the static library WILL get linked in if the shared library is not found. ĸen 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? Hans -- http://lists.linuxfromscratch.org/listinfo/lfs-chat FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page