From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 1125fa,9f5c1c8d844fc69e X-Google-Attributes: gid1125fa,public X-Google-Thread: 1025b4,9f5c1c8d844fc69e X-Google-Attributes: gid1025b4,public X-Google-Thread: 10d0a1,9f5c1c8d844fc69e X-Google-Attributes: gid10d0a1,public X-Google-Thread: 111c93,9f5c1c8d844fc69e X-Google-Attributes: gid111c93,public X-Google-Thread: fcfb9,9f5c1c8d844fc69e X-Google-Attributes: gidfcfb9,public From: Raymond Wiker Subject: Re: DLL mess Re: "No-one gets fired for buying Microsoft" Date: 1999/09/13 Message-ID: <87d7vmlr0w.fsf@foobar.orion.no> X-Deja-AN: 524514841 Sender: raymond@foobar.orion.no References: <37D81FE1.E90C3B1F@winkinc.com> <37d93940.34897269@news.shore.net> <7ra5gg$cm1@dfw-ixnews15.ix.netcom.com> <37dc0c92.88995578@news.shore.net> <37ddff0d.347678675@news.shore.net> <87hfkylxa5.fsf@foobar.orion.no> <37e10e48.351577842@news.shore.net> X-Complaints-To: abuse@tele2.no X-Trace: juliett.dax.net 937239906 212.20.215.229 (Mon, 13 Sep 1999 18:25:06 MET DST) Organization: Fast Com Norway Access NNTP-Posting-Date: Mon, 13 Sep 1999 18:25:06 MET DST Newsgroups: comp.os.linux.alpha,comp.os.linux.advocacy,comp.os.ms-windows.advocacy,comp.os.ms-windows.nt.advocacy,gnu.misc.discuss sean@forget.about.it (Se�n � Donnchadha) writes: > Raymond Wiker wrote: > > >> > >> That's great, but it's a totally unrelated issue. Here's the real > >> question: What is the installer to do when a new program requires > >> libfoo-1.2.3, and libfoo-1.2.2 is already installed and in use by > >> dozens of other programs? > > > > Simple. You copy libfoo-1.2.3 to the appropriate place, where > >it will peacefully coexist with libfoo-1.2.2. The file names are not > >identical, so they *can* be in the same directory. > > > > It doesn't matter whether the files can coexist. As long as apps use > only one of them, the other one may as well not be there. > > > > > The installation will (probably(???)) also update a symlink for > >libfoo-1.2, so that it points to libfoo-1.2.3 instead of > >libfoo-1.2.2. *No* programs should break from this, as there should be > >no visible differences between 1.2.2 and 1.2.3 - if there were, the > >new version would be called 1.3.0, or something. > > > > You're not seeing the real problem, Raymond. What you're saying (that > library authors simply bump the major version number if the library > introduces incompatible changes) is only true when the authors > actually realize that they've made such changes. Shared library > conflicts happen when the authors *DON'T* realize it, usually because > they didn't have the ability to test their updated library against > every app that uses it. Because they don't realize that a > compatibility glitch exists, they issue a minor update instead of a > major one, and things blow up. I've seen / heard of that happening only once or twice across all the Unix versions I've worked, including Linux, NetBSD and FreeBSD. On the other hand it *has* happened that the major version number has been bumped when it shouldn't have. Better safe than sorry, I guess :-) > And this isn't even always the library authors' fault. No matter how > well-written the documentation, there is always room for > interpretation when it comes to software behavior. A library update > may actually be 100% back-compatible in terms of the authors' own > understanding of the required behavior, while app authors may have > their own ideas - ones that lead to their apps depending on behavior > that the library author would consider incorrect or unspecified. If the documentation is incomplete, shame on the vendor. If you expect undocumented behaviour to work in the future, shame on you. (While I'm on the subject: Microsoft's help system has some good points, but it's woefully incomplete in some areas. An example: try finding what files must be included to define the macro AFX_EXT_CLASS.) > >I suspect that an > >application would also be able to request a particular minor version, > >as well. > > > > No. This would eliminate the field-ugradability of shared libraries. But it *would* mean that you could guarantee that a particular software package would continue working (modulo changes at lower levels, e.g, syscall numbers). > > Compare this with DLLs. There are several versions of > >MFC42.DLL, and they all expect to reside in the same directory, with > >the same name. There is *no* major/minor version information > >available, although you can kludge this by using different file names > >for different major numbers. > > > > Incorrect. In Windows, the major version number is in the filename, > and the minor version number is in the VERSIONINFO resource embedded > into the file. That's true for MFC42, VBRUN50 and a few others. Most Microsoft DLLs do *not* have a version number, and some have different information that may look like a version number (e.g, WINSOCK32). > At app installation time, this resource is compared > against the one in the file already installed to determine whether an > update should occur. But instead of installing multiple files and > using a link to select one of them, Windows simply installs only one. > The end result is the same - apps use the latest version installed. > The Unix approach has the advantage that a library update is easy to > back out - you just revert the link instead of having to reinstall the > original library from the distribution media. But this is something > the average user wouldn't have the ability to take advantage of, and > it has the (minor) disadvantage of wasting disk space in the general > case. > > > > >In practice, this is seldom > >done. MFC42.DLL may appear to have a major version encoded in the > >filename, but that is not the case - there have been versions of this > >DLL that has been incompatible with programs written for earlier > >versions. There are other cases like this. > > > > Right, but this is precisely what I was talking about before. The > library authors (Microsoft in this case) believed that their MFC42 > update was 100% back-compatible, so they didn't change the major > version number (by renaming the library to MFC43 or something). Had > they realized that compatibility glitches existed, they would have > renamed the library and everything would have been peachy keen. As I > hope I've convinced you, the Unix approach wouldn't have helped at > all. No, you haven't... and the reason is that Microsoft does not *really* encode a major number in the libraries, and when they do, they do not change major numbers as often as necessary, or work hard enough to ensure backward compatibility. The reason that I mentioned MFC42 was not that it is the only DLL that has broken backwards compatibility - there have been numerous others (including VBRUN50, I believe). > >> You must not have been around in the early days when HJ Lu included a > >> list of known broken programs with each libc revision. > > > > So? The state of the art in Linux libraries is improving, > >which is *not* something you can say about Microsoft libraries. > > > > Huh? Would you care to elaborate? What I mean is that the Linux people are getting better at avoiding library goofups, as well as other distribution problems. I have not seen any indication that there is a limitation to Redmond silliness. > >> This problem really has little to do with versioning. The whole point > >> of shared libraries (aside from disk/memory usage) is independent > >> field-ugradability, which results in the runtime coupling of two > >> binary components that may not have been lab-tested in combination. In > >> this particular case, there's no way to eliminate the risk without > >> also eliminating the benefit. > > > > You *can* get around this, as long as it is possible for the > >application to request a particular version (major version, minor > >version, directory...) > > > > Again, what you're suggesting would sacrifice the major advantage of > shared libraries - field-upgradability. Yes, but this sort of thing is *necessary* if you want to make sure that the application is running with a version of the library that is "known good". -- Raymond Wiker, Orion Systems AS +47 370 61150