From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1125fa,9f5c1c8d844fc69e X-Google-Attributes: gid1125fa,public X-Google-Thread: 10d0a1,9f5c1c8d844fc69e X-Google-Attributes: gid10d0a1,public X-Google-Thread: fcfb9,9f5c1c8d844fc69e X-Google-Attributes: gidfcfb9,public X-Google-Thread: 111c93,9f5c1c8d844fc69e X-Google-Attributes: gid111c93,public X-Google-Thread: 1025b4,9f5c1c8d844fc69e X-Google-Attributes: gid1025b4,public From: peltz@medusa.nn.com (Steve Peltz) Subject: Re: DLL mess Re: "No-one gets fired for buying Microsoft" Date: 1999/09/14 Message-ID: <7rmm2q$vcc$1@harbinger.nn.com>#1/1 X-Deja-AN: 525191842 References: <37D81FE1.E90C3B1F@winkinc.com> <37ddff0d.347678675@news.shore.net> <7rjl08$efp$1@ben.hks.net> Organization: NovaNET Newsgroups: comp.os.linux.alpha,comp.os.linux.advocacy,comp.os.ms-windows.advocacy,comp.os.ms-windows.nt.advocacy,gnu.misc.discuss In article <7rjl08$efp$1@ben.hks.net>, Doug DeJulio wrote: >Existing programs that specify to use library versions 1 or 1.2 will >switch to using version 1.2.3. I believe that any program that >specified version 1.2.2 specifically at link time (note: doing this >can be tricky) should continue using version 1.2.2. > >I'd say this is exactly the correct behavior. The correct behavior would be to try to load the exact version that was used at link time; if that wasn't available, remove one level of versioning and try again (so if 1.2.2 existed, it would be used; else it would try 1.2 (which would be a symbolic link to 1.2.3); else it would simply try 1). Although there are linkers that do this, the Linux ld.so isn't one of them. There are a lot of different naming schemes combined with symbolic links and sonames that make sense. The one I favor for Linux libraries is to make the soname be completely specific; if you want to upgrade libraries, replace it with a symbolic link to the newer version (e.g. symbolic link from 1.2.2 to 1.2, which is a symbolic link to 1.2.3). That gives you complete control over whether old programs use the old or new version of a library. Unfortunately, that's pretty global. To override the library choice for just one application, you need to wrap it in something that will set the path for the loader so it finds the correct version of the library first.