On Sun, Aug 22, 2010 at 10:39:32PM -0500, Steve M. Robbins wrote: > > Why is this a problem? > > > > The fact that boost_filesystem depends upon boost_system is an > > internal implementation detail that is exposed in the public headers-- > > I'm not making direct use of it myself. > > Let me see if I can paraphrase this. > > 1. Library A depends on Library B for some implementation details. > Today -- at least with shared libs -- that detail is hidden by the > shared library's dependency, a well known mechanism used for this > purpose for ages. > > 2. The linker has been "improved" such that the above mechanism is > broken.
Yes, this is what it looks like, and I too don't consider this to be a great "improvement" at all! There is some logic to it, but I don't personally agree with it; maybe there's a reason for it I'm not aware of or don't fully understand. The shared library dependency appears to only satisfy dependencies /within/ the shared library having the dependency. Additional dependencies in your program code (or another library) may no longer may use of this indirectly. If you look at the test.o file with "nm -C", you'll see that inline functions in the headers do result in code in the object which has external dependencies on libboost_system in addition to libboost_filesystem, and it's this that "needs" the explicit linking. > 3. You now want a new mechanism to capture this dependency. Well, "want" is perhaps going too far! In a sense, this dependency information is something that has always been needed in certain cases (e.g. static linking), and tools such as pkg-config were created to satisfy this need (personally I hate the entire concept and think it should be entirely unnecessary for tools such as pkg-config to exist, but this is not a problem specific to Boost, since a lot of the GTK/GNOME libraries also have similar issues). > I can't say I'm very much impressed by the improvements ... > > (The above is, of course, slightly tongue-in-cheek and I don't > intend it as an attack on you, Roger ... unless you're also > responsible for the linker "improvements" ... :-)) No, I was quite surprised by the "improvement" to be honest. I just thought I'd check my code was still building correctly with GCC 4.5 and found this change breaking my code. I just thought you'd want to know since it's going to affect all other library users, and it might not have been noticed given that GCC 4.5 is still only in experimental. Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
signature.asc
Description: Digital signature

