Why Multiple copies of libraries in different locations is bad (was Re: [ale] Enlightenment DR14)

Geoff Harrison mandrake at mandrake.net
Fri Jul 31 10:26:57 EDT 1998


On Fri, Jul 31, 1998 at 10:19:47AM -0400, Dave Brooks wrote:
> Well, I was assuming it was looking in /usr/local/lib because it would
> complain on the compile if they were in /usr/lib.  But, you never know --
> I'll check when I get home tonite.

No, it would merely complain if they were in both places.
Typically if you have things in multiple locations you're only going to
cause yourself grief -- especially when the APIs for most of these
graphics libraries tend to morph themselves.  It's a good idea to make
sure every time you install a new library that you're not installing it
into a different location than the previous version of that lib you had
installed (if you had it installed at all).
Then applications may compile with one lib, libraries with another (isn't this
joy when you suddenly have unreferenced symbols in linking applications just
because of a link mismatch?) and/or you have older libs being loaded
accidentally because they happen to be ahead of the newer libs in your
LD_LIBRARY_PATH.  Also, having multiple header files scattered about your
system can cause the same problems -- incorrect typecasting, prototypes, etc
by having a header file from an older/newer version than that actual library
you're linking to loaded because it came first in the include path (in fact, on
many systems I've looked at people's include and library paths aren't even in
the same order because they hacked something up at some point)

Oh well.  I'm stepping down off my rant-box about multiple versions in multiple
locations of libraries.  :)

-- 
Geoff Harrison (http://mandrake.net)
Senior Systems Engineer
Intellimedia Commerce (http://www.intellimedia.com)
Author, MAW Shell Replacement (http://mandrake.net/MAW)
Co-Author, Enlightenment Window Manager (http://www.enlightenment.org)
phone: (404)262-0001x102






More information about the Ale mailing list