[NTLUG:Discuss] apt-get, rpm and library versioning

Burton Strauss Burton_Strauss at comcast.net
Sat Jun 25 15:25:26 CDT 2005


Yes, but the reality of the gnu tools makes statics very difficult.

Say you have a .a version but also the .so (perhaps even of another
version).  Unless you force the .a into the linkage, the linker will favor
the .so - making a dynamic library when you are SURE it's static.  One that
won't work if the versioning is too different (say libpng 1.2.x vs 1.0.x).

The only way around this is to finagle the linkage commands or create a
clone library with a different name.  The problem with the clone library is
that say there's a security problem with that library - the renamed static
version means you have something that people scanning for insecure versions
won't find.


etc.


"hen you need static linking, you probably need it badly"

In BOTH senses of the word, 'badly' (http://www.answers.com/badly)

-----Burton

-----Original Message-----

<snip />

There is need for both.  I would say dynamic linking should be the norm for
the reason you cite, plus the fewer files reason is nice too.

But there are times when static linking is very desireable, such as when you
(whoever but a commercial program is the most obvious) need to create a
program that will "just work" as long as basic OS requirements are met
(kernel, disk space, RAM, etc.).  Not worrying about what libraries are
installed is a big relief.

Static linking is also good for those programs that are very hard to make
work/compile.  An example of this is Gaim, at least it has been hard for me
to compile from source (and I consider myself reasonably good at building
software, so I have great sympathy for those who don't know much about
compiling software because they have no hope of making a working Gaim).  But
creating a statically linked Gaim is not possible because the Gnome people
(GTK specifically) have not created nor do they support nor will they
support creating static GTK libs.  So if you can't get the right combination
of software on your machine to compile Gaim, you're screwed.  Copying just
the binary from a friend is not an option because there is no statically
linked version of the binary.

So the exceptions may be few, but when you need static linking, you probably
need it badly.

Kevin

_______________________________________________
https://ntlug.org/mailman/listinfo/discuss





More information about the Discuss mailing list