public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] tcl/tk-8.6 incompatibilities
@ 2013-01-11  8:57 justin
  2013-01-11  9:26 ` justin
  0 siblings, 1 reply; 2+ messages in thread
From: justin @ 2013-01-11  8:57 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-dev] tcl/tk-8.6 incompatibilities
  2013-01-11  8:57 [gentoo-dev] tcl/tk-8.6 incompatibilities justin
@ 2013-01-11  9:26 ` justin
  0 siblings, 0 replies; 2+ messages in thread
From: justin @ 2013-01-11  9:26 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 223 bytes --]

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-11  9:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11  8:57 [gentoo-dev] tcl/tk-8.6 incompatibilities justin
2013-01-11  9:26 ` justin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox