On Sun, Nov 05, 2023 at 07:38:27PM +0200, Eli Zaretskii wrote: > > From: Gavin Smith <[email protected]> > > Date: Sun, 5 Nov 2023 17:04:47 +0000 > > > > > Maybe one day libtexinfo could be a public library, but not for now > > > and libtexinfoxs should probably never ever be a public library. > > > > I agree neither of them should be a public library now. > > Can someone please explain what does "not being a public library" > mean, when we talk about shared libraries? I don't think I'm familiar > with this notion.
So you know what a dynamically loaded library is; this contains a collection of functions and potentially data structures that can be loaded by running code and run as part of a computer program. Usually, when such a library is installed on a system, this is for use generally by any program. For example, if there is a library file libz.so.1, this could be linked by passing the -lz flag to the C compiler when building the program. The program would be able to call functions in the library and so on. The program using this library would likely be written by a different person, and as part of a different project, to the persons and projects responsible for the creation of the library. There is an assumption that the library has a stable interface, and the library and programs using the library are worked on completely independently. The dynamically loaded libraries used by texi2any (XS modules) are completely different. Technically, they are loaded in the same way, by the running Perl interpreter. But they are an integral part of the texi2any program. They are intended for the use of the texi2any program only, not any other. The file was being installed under /usr/local/lib/libtexinfo.so.1, as if to imply that a user could link it against their programs with -ltexinfo, or load it with dlopen, which would be completely inappropriate. It would be no more correct for another program to use this library than for one program to be calling functions or referring to data structures in a different program. It is only the technical implementation that makes this appear to be plausible. So while the same word, "library", may be used in both cases, and there are few technical differences, there are important social differences.
