Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2013-07-30
12:01 • Closed ticket [3598299fff]: unix: tcl does not create non-versioned symlinks for... artifact: b186e6bb7b user: jan.nijtmans
2012-12-26
07:39 • Ticket [3598299fff]: 4 changes artifact: 3bbe70217e user: dkf
2012-12-24
15:22 • Ticket [3598299fff]: 4 changes artifact: 12e40a3733 user: roflz
15:20 • Open ticket [3598299fff]. artifact: dbd564274b user: roflz
15:16 • Pending ticket [3598299fff]. artifact: ffb9bddfd2 user: nijtmans
15:15 • Ticket [3598299fff]: 1 change artifact: eda9848e05 user: roflz
08:06 • New ticket [3598299fff]. artifact: ee437c80fa user: roflz

unix: tcl does not create non-versioned symlinks for dso

Closed / Invalid3598299fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 13 years ago
Descriptionplain2012-12-24 08:06:28
the tcl compilation and installation only creates libtcl8.6.so, but not libtcl.so

so it impossible to link against the .so without knowing the exact version.
since the pkgconfig file does omit this entry (bug #3598282), the only way to get the right dll to link against is by either source'ing the proprietary TclConfig.sh or grepping the /lib directory for libtcl*.so
roflz Ticket [3598299fff]: 1 change [History diff]2012-12-24 15:15:28
nijtmansplain2012-12-24 15:16:37
This is by design. Extensions should not link with libtcl8.6.so, only with
libtclstub8.x.a, this way the extension becomes runnable with
whatever (compatible) Tcl version is available. The TEA
(Tcl Extension Architecture) system handles just that.

There is work ongoing to make the stub library unversioned
(tclstub.a), but that work is not complete yet. Expected
(hopefully) in Tcl 9.0
roflzplain2012-12-24 15:20:19
note that even creating libtcl.so.8.6 would be sufficient to link against -ldl

i wonder why tcl does things different than anybody else for no good reason
roflzplain2012-12-24 15:22:44
ah thanks, good to know. my irc chat plugin needs to link against libtcl, and this turned out to be crazy difficult with standard approaches.
dkfplain2012-12-26 07:39:03
The problem is that different platforms have different rules; it's really irritating when one is stuck between one group of loud people insisting that certain features are removed, another group that they work in method A out of the box, and a third group that want things to use method B. The only way to accommodate such things is by putting a horrible chunk of disgusting code in the autoconf-based machinery to adapt to all of these things (note that it's not done just by platform; the requirements of distributors, sysadmins and ordinary users on the same platform in this area are wildly divergent). The adding of the correct extra symlinks in the right places for a particular linux distribution is left to the distro's packaging maintainer.

As it happens, we don't really recommend such relinking as you refer to except within a "minor" version series (one of which has 8.6.0 as the first member) because some functions have changed API/ABI mappings between versions. (Pure API or ABI compatibility is maintained through the use of stubbed linking, but some of the things done by general dynamic linkers are not.)

I imagine that libtcl ought to go on your platform as libtcl8.6.so.0.0 or something like that, but I've not really thought about that. (Also, not that we consider it fine for a single system to have and make available 8.4, 8.5 and 8.6 at the same time; Tcl's designed to support that sort of thing. And commercial uses of Tcl will probably bind to a specific library instance at build time rather than allowing relinking; having a known baseline beats saving disk space.)
jan.nijtmansplain2013-07-30 12:01:14
Ticket moved to "tclconfig"
Log in (anonymous is fine) to add a comment.