Mailing List Archive

tcl/tk-8.6 incompatibilities
Hi,

some packages do not build against version 8.6 and show errors like this:

error: 'Tcl_Interp' has no member named 'result'

and

error: 'Tcl_Interp' has no member named 'errorline'

This is due to a removal of an old and deprecated (at least since 2004)
feature.

Here some simple fixes:


Version A (will stop working with tcl/tk-9.0):

append

-DUSE_INTERP_RESULT and/or -DUSE_INTERP_ERRORLINE

to the *FLAGS.



Version B (long lasting and better):

patch code (and send upstream) to use
Tcl_GetResult(), Tcl_GetStringResult(), Tcl_SetResult(),
Tcl_SetStringResult(), Tcl_GetErrorLine()

Examples:

@@ -1980,10 +1980,10 @@ void tcl_run(
trace = (char *)Tcl_GetVar(interp, "errorInfo", 0);

if (trace == NULL)
- trace = interp->result;
+ trace = Tcl_GetStringResult(interp);

fprintf(stderr, "%s: TCL error @ line %d: %s\n",
- script, interp->errorLine, trace);
+ script, Tcl_GetErrorLine(interp), trace);
}

Tcl_DeleteInterp(interp);



Some more little facts:

* Please link against libtcl.so and libtk.so instead of libtcl8.6.so and
libtk8.6.
* Version 8.6 supports pkg-config
* Version 8.6 is subslotted.
* Reference bug https://bugs.gentoo.org/show_bug.cgi?id=451368

Thanks justin
Re: tcl/tk-8.6 incompatibilities [ In reply to ]
One additional note:

application-specific initialization failed: package not known
invalid command name "auto_mkindex_parser::command"


This comes from a broken dev-lang/tcl-8.6.0. Revision 1 is fixed.

Justin