rpm static link [was Re: ESR: Goodbye Fedora]

Tom Horsley tomhorsley at adelphia.net
Thu Feb 22 01:05:15 UTC 2007


On Wed, 21 Feb 2007 19:57:02 -0500
Matthew Miller <mattdm at mattdm.org> wrote:

> On Wed, Feb 21, 2007 at 04:48:22PM -0800, Michael A Peters wrote:
> > I do think rpm should be statically linked.
> 
> At the time, there was a solid technical reason for not doing it. (NPTL
> transition growing pains.) At this point, it might be worth revisiting.
> However, it doesn't necessarily gain you much -- if your system is that
> screwed up, booting the install CD in rescue mode is usually a better
> choice.

And actually there can be other problems as well. Many of the insane
things glibc does have rendered static linking absolutely impossible.
For instance, build an app that uses any of the getpw*() library functions,
static link it, then try to run it.

All the pam stuff down in the bowels winds up dlopening various authentication
libraries which have dependencies on glibc which drag in the libc.so file
which gives you both static and dynamic versions of things like malloc()
trying to run at the same time in the same program. Quickly falls down
and goes boom :-).

(This may not actually be the exact thing I saw, but the idea was like this).




More information about the users mailing list