* "Lucian Adrian Grijincu" 

|    2. Unices - Linux distros set libapr-1.so to be an (indirect) symlink
|    to the real libapr-1.so.0.2.x and applications link to libapr-1.so (or
|    libapr1.so.0). If someone wants to use the n.{odd} version to test
|    stuff he can always link his app to the libapr-1.so.0.{odd}
|    version.

Except that linking is done with the SONAME in the .so:

: [EMAIL PROTECTED] /tmp/test > cat test.c
int main() {
    return 0;
}
: [EMAIL PROTECTED] /tmp/test > gcc -o test test.c -L. -lfoo
: [EMAIL PROTECTED] /tmp/test > objdump -x test | grep NEEDED
  NEEDED      libapr-1.so.0
  NEEDED      libc.so.6

(libfoo.so in the current directory is just a copy of libapr-1.so.0.2.7)

If you really, really want to avoid people ending up with wrongly
linked binaries, make the SONAME libapr-1.so.$svn-revision and then
make it .0 for releases.  Anybody shipping anything linked with a
snapshot will then have very visible breakage when they try to use the
binary if they don't have all depends installed.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are

Reply via email to