Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2016-08-23
14:07 • Ticket [880855cb09] Tcl C API OO symbols are not exported to libtcl.so statu... artifact: cfe2bd7d51 user: dkf
2016-08-20
16:04 • Ticket [880855cb09]: 3 changes artifact: effef4c36a user: dkf
2015-08-30
20:14 • Open ticket [880855cb09]. artifact: aae68e7fe2 user: dkf
2015-08-27
08:34 • Pending ticket [880855cb09]. artifact: 58dc694c79 user: jan.nijtmans
2015-08-26
23:24 • Ticket [880855cb09]: 3 changes artifact: c42fa6ce67 user: aku
22:50 • New ticket [880855cb09]. artifact: d6c4efcece user: anonymous

Tcl C API OO symbols are not exported to libtcl.so

Open880855cb092f319adb1fa9b87fffc420e0b401f7Created 11 years agoUpdated 10 years ago
Descriptionplain2015-08-26 22:50:14
Building TCL 8.6.4 in a CentOS 6 distribution, gcc 5.2.0 with the following options:

$ cd tcl8.6.4
$ ./configure --prefix=~/tcl8.6.4.bug_report/ --enable-shared --enable-threads --enable-64bit 
$ make install

If I then look for any of the TCL OO API symbols in the generated libtcl8.6.so, I will not find them:

$ nm -g ~/tcl8.6.4.bug_report/lib/libtcl8.6.so | grep Tcl_NewObjectInstance
$
aku Ticket [880855cb09]: 3 changes [History diff]2015-08-26 23:24:11
jan.nijtmanswiki2015-08-27 08:34:52

See: http://core.tcl.tk/tcl/info/3010352

All TclOO symbols in the Tcl shared library are currently MODULE_SCOPE, already for more than 5 years. Reason: don't pollute the symbols table with functions which are not needed for correct operation. It also allows the C-compile to do better optimizations.

If you want to use this symbols from your own extensions, either use the Stubs mechanism, either compile Tcl as static library (there was an issue on this in the past, but that's fixed now). The TDBC extension proves that those symbols can be used just fine, I don't see a bug here.

Unless Donal has something useful to say, I propose to close this ticket. Or - maybe- improve the documentation.

dkfplain2015-08-30 20:14:15
The public TclOO symbols are supposed to have identical linkage to ordinary Tcl symbols.
dkf Ticket [880855cb09]: 3 changes [History diff]2016-08-20 16:04:33
dkf Ticket [880855cb09]: 3 changes [History diff]2016-08-23 14:07:20
Log in (anonymous is fine) to add a comment.