C Programming – Moral Reasons to Avoid Static Linking

cstatic-linking

SDL 2's installation page contains the following comment on static linking:

However, we encourage you to not do this for various technical and
moral reasons

I totally get why they would mention technical reasons, and the document linked in the same paragraph makes some very good points about the advantages of dynamic linking and a "best of both worlds" approach.

However, how can there be moral reasons to avoid static linking? What?

Best Answer

However, how can there be moral reasons to avoid static linking? What?

You (ethically) should be helpful to your user, and make his life easier. If you link dynamically to some free software libraries (like zlib), he could upgrade his system and your software on it would profit of the upgraded library immediately.

If you distribute a statically linked executable against an LGPL library and do not provide means to re-link it to some newer (or improved, or modified) version of that library (typically by releasing object files for your application), you probably are violating the LGPL license (and it might happen that some organization -or some competitors- would sue you, see http://gpl-violations.org/ & https://www.gnu.org/licenses/gpl-violation.html ....).

The http://www.fsf.org/about/what-is-free-software page is mostly about ethics

And some customers might actually care about a software using free software and being unfriendly to it. For that precise reason, I avoid buying Nvidia products.

Also, some potential hires might also be turned off by such behavior.

And using often shared libraries (and avoiding static ones) decrease the total disk space required on the user's computer, and decrease RAM usage (since the code segment of shared libraries used by several processes is mapped only once).