Robert Connolly wrote: > In fairness, we should also consider the advantages of static libraries. > > They perform better, especially on x86. This is the primary advantage. > > Unneeded functions are stripped from the program, making the program smaller > and use less memory. The exception to this is when you have two programs > using the same library function at the same time, because in this case shared > memory, and shared libraries, can be taken advantage of. > > So, from what I can see, static libraries are only ideal when it's a private > library only used by one program, with some exceptions. > > Shadow's libshadow is only used by the Shadow utilities. No other package > links to it. We almost never run two of Shadow's utilities at the same time, > so despite multiple programs using the same library functions, in the case > with Shadow, there is virtually no advantage in using a shared libshadow > library.
In some cases, an application can be very sensitive to a specific library and you would not want to change the underlying library without changing the application. In that case, a static library will prevent a broken program. I believe ssh linking to a static libssl.a is preferred to libssl.so.0. Of course that means rebuilding openssh every time openssl is updated. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page