Tcl Source Code

View Ticket
Login
Ticket UUID: 880855cb092f319adb1fa9b87fffc420e0b401f7
Title: Tcl C API OO symbols are not exported to libtcl.so
Type: Bug Version: 8.6.4
Submitter: anonymous Created on: 2015-08-26 22:50:14
Subsystem: 35. TclOO Package Assigned To: dkf
Priority: 6 Severity: Important
Status: Open Last Modified: 2016-08-23 14:07:20
Resolution: None Closed By: nobody
    Closed on:
Description:
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
$
User Comments: dkf added on 2015-08-30 20:14:15:
The public TclOO symbols are supposed to have identical linkage to ordinary Tcl symbols.

jan.nijtmans added on 2015-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.