Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Aug 1995 04:17:53 -0700
From:      asami@cs.berkeley.edu (Satoshi Asami)
To:        jkh@time.cdrom.com
Cc:        CVS-commiters@freefall.FreeBSD.org, cvs-ports@freefall.FreeBSD.org
Subject:   Re: cvs commit: ports/lang/tcl74/pkg PLIST
Message-ID:  <199508181117.EAA04848@silvia.HIP.Berkeley.EDU>
In-Reply-To: <25181.808743200@time.cdrom.com> (jkh@time.cdrom.com)

next in thread | previous in thread | raw e-mail | index | archive | help
 * >   Change library names.  This thing is not compatible with tcl-7.3 at
 * >   all, so call it libtcl74.so.1.0.  Same for the static library.

(I asked about this on the ports list...guess you haven't made it back 
 to there yet? ;)

 * Ack?!  Hmmm.  This kind of name mangling leads me to believe that
 * we've got some fundamental problems in the way we look for shared
 * libraries, or at the very least in how we're able to "lock" a given
 * application to a library that it truly requires.  This certainly won't
 * be the last such instance where backwards compatibility isn't
 * maintained?

Yes, I think so too.  Essentially, the problem is this:

Suppose we have libtk.so.3.6 and libtk.so.4.0 in our ld search path.
If we take an application that is already linked to one of them, it
will run fine.  But if we want to link something that requires the
lower-numbered version (3.6 in this case), there is no way to specify
this, because all ld understands is -ltk and it will just use the
highest numbered shared library (4.0 in this case).

This is not a problem for programs in the main source tree, because
they are all updated simultaneously when a system library changes.
But that is not true for the ports tree, and the only way to make it
possible to have both versions selectable is to change the basename of
the library.

And if you think this (change to tcl and tk) is ugly and would make us
incompatible with the rest of the world, don't worry too much, John
Ousterhout has named his new static library "libtk4.0.a" (apparently
so that it can peacefully coexist with the 3.6 static lib).  Thus, the
"standard" tk ports should come with "-ltk4.0", and we should do is to
change it to "-ltk40".  Ditto for tcl.

Satoshi

P.S. Of course, if we could fix ld to allow a dot in the name, so that 
     we can use "libtk4.0.so.1.0" as the shared library name, it would 
     be even more "compatible", but that looks rather ugly, and it
     would surely screw up "ldconfig -r"'s output big time so I don't
     think we should do that.

     Cf. If you don't know what I mean, see how the "tk4.0" will fit
     in here....

     >> ldconfig -r | grep tk
        34:-ltk40.1.0 => /usr/local/lib/libtk40.so.1.0
        62:-ltk.3.6 => /usr/local/lib/libtk.so.3.6



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508181117.EAA04848>