Adjusting the Makefile to use the shared library
Linus Torvalds
torvalds at linux-foundation.org
Tue Jul 17 09:58:08 PDT 2012
On Tue, Jul 17, 2012 at 5:02 AM, Pierre-Yves Chibon <pingou at pingoured.fr> wrote:
> Hi,
>
> While building the rpm I noticed that subsurface builds against the
> static library of libdivecomputer.
On purpose.
Shared libraries only make sense IF YOU CAN SHARE THEM.
Since I don't know of a single other relevant project that uses
libdivecomputer that subsurface would realistically share with on
Linux, why would you use shared libraries?
Shared libraries are *objectively* inferior to static linking if you
only have one user. They are slower, they use more space, and they add
huge dependencies. They are also a total disaster if the library isn't
carefully versioned for binary compatibility (which libdivecomputer is
not).
Don't blindly use shared libraries just because you think they are
better. They are *not* better.
With a static link, you have a binary that actually works whether
libdivecomputer has been installed or not. That's a good thing.
Linus
More information about the subsurface
mailing list