1 |
Hi, |
2 |
|
3 |
some packages do not build against version 8.6 and show errors like this: |
4 |
|
5 |
error: 'Tcl_Interp' has no member named 'result' |
6 |
|
7 |
and |
8 |
|
9 |
error: 'Tcl_Interp' has no member named 'errorline' |
10 |
|
11 |
This is due to a removal of an old and deprecated (at least since 2004) |
12 |
feature. |
13 |
|
14 |
Here some simple fixes: |
15 |
|
16 |
|
17 |
Version A (will stop working with tcl/tk-9.0): |
18 |
|
19 |
append |
20 |
|
21 |
-DUSE_INTERP_RESULT and/or -DUSE_INTERP_ERRORLINE |
22 |
|
23 |
to the *FLAGS. |
24 |
|
25 |
|
26 |
|
27 |
Version B (long lasting and better): |
28 |
|
29 |
patch code (and send upstream) to use |
30 |
Tcl_GetResult(), Tcl_GetStringResult(), Tcl_SetResult(), |
31 |
Tcl_SetStringResult(), Tcl_GetErrorLine() |
32 |
|
33 |
Examples: |
34 |
|
35 |
@@ -1980,10 +1980,10 @@ void tcl_run( |
36 |
trace = (char *)Tcl_GetVar(interp, "errorInfo", 0); |
37 |
|
38 |
if (trace == NULL) |
39 |
- trace = interp->result; |
40 |
+ trace = Tcl_GetStringResult(interp); |
41 |
|
42 |
fprintf(stderr, "%s: TCL error @ line %d: %s\n", |
43 |
- script, interp->errorLine, trace); |
44 |
+ script, Tcl_GetErrorLine(interp), trace); |
45 |
} |
46 |
|
47 |
Tcl_DeleteInterp(interp); |
48 |
|
49 |
|
50 |
|
51 |
Some more little facts: |
52 |
|
53 |
* Please link against libtcl.so and libtk.so instead of libtcl8.6.so and |
54 |
libtk8.6. |
55 |
* Version 8.6 supports pkg-config |
56 |
* Version 8.6 is subslotted. |
57 |
* Reference bug https://bugs.gentoo.org/show_bug.cgi?id=451368 |
58 |
|
59 |
Thanks justin |