BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Distributing Linux Software
- Subject: Distributing Linux Software
- From: gaf-mNDKBlG2WHs at public.gmane.org (Jerry Feldman)
- Date: Fri, 19 Mar 2010 13:17:57 -0400
- In-reply-to: <0F0879E7-618A-4F33-8244-EAA65FC66DB1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
- References: <f9fa6ea91003190856o7de85d43ya3570b7b2a0ec2f9@mail.gmail.com> <0F0879E7-618A-4F33-8244-EAA65FC66DB1@gmail.com>
On my previous post, I mentioned that we bundled everything. We provide a large number of shared libraries, partially because our product dynamically loads its own libraries and would be huge if everything were static. Generally, if code is built on a certain release, it should not be run on an older release, even if it is statically linked. While much of the time, code built on a certain distro and statically linked can run on an older distro, you are looking at trouble. But, you are never guaranteed portability. let's take the kind of extreme case, where one or more system calls were changed. The C runtime library provided as wrapper to a system call, but if you build on the later version, then your code might crash on an older version. Another downside of using statically liked libraries is the size of the executable. In today's huge memory, it is not so much of an issue. Another downside is that your code will not benefit from bugs in dependent libraries. Today, with our package managers help to establish dependencies, such as what versions of glibc or libstdc++ (or all dependent libraries). While I would prefer to build a product using shared objects, that product is subject to the issues you do describe below. On 03/19/2010 12:36 PM, Richard Pieri wrote: > On Mar 19, 2010, at 11:56 AM, Tim Callaghan wrote: > =20 >> 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. >> =20 > 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 y= ou don't have the support nightmare of customers either not having the li= braries 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 loade= d 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 agai= nst an older version of the C library. Ubuntu 9.10 has a newer version o= f glibc than 9.04 or CentOS 5.4; therefore, code linked to 9.10's glibc w= on't run on 9.04 or CentOS 5.4. > > Welcome to the "joys" of release engineering. > > =20 --=20 Jerry Feldman <gaf-mNDKBlG2WHs at public.gmane.org> Boston Linux and Unix PGP key id: 537C5846 PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB CA3B 4607 4319 537C 5846
- References:
- Distributing Linux Software
- From: tmcallaghan-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org (Tim Callaghan)
- Distributing Linux Software
- From: richard.pieri-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org (Richard Pieri)
- Distributing Linux Software
- Prev by Date: Distributing Linux Software
- Next by Date: Distributing Linux Software
- Previous by thread: Distributing Linux Software
- Next by thread: Distributing Linux Software
- Index(es):