Distributing Linux Software

Richard Pieri richard.pieri-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Fri Mar 19 12:36:10 EDT 2010


On Mar 19, 2010, at 11:56 AM, Tim Callaghan wrote:
> 
> I'm trying to get a better understanding of how other companies
> distribute their Linux shared libraries.  My company plans on
> supporting as many Linux versions/distros as possible.

The simple answer is: don't use shared libraries.  Three key reasons:

The first reason is portability.  If everything you need is statically linked to your executable then there are no external dependencies.  Your code should run everywhere.

The second reason is support.  If you statically link everything then you don't have the support nightmare of customers either not having the libraries you need or, worse, having outdated libraries that you can't use but that he needs for some other application.

The third reason is security.  If you statically link the libraries you need then you won't (hopefully) have to deal with trojan libraries loaded via LD_LIBRARY_PATH.

Your issues with OS versions is tangential to reason 2.  Code linked to a particular version of the C library (glibc on Linux) will not run against an older version of the C library.  Ubuntu 9.10 has a newer version of glibc than 9.04 or CentOS 5.4; therefore, code linked to 9.10's glibc won't run on 9.04 or CentOS 5.4.

Welcome to the "joys" of release engineering.

--Rich P.







More information about the Discuss mailing list