hoche / cicb

ICB chat client. See www.icb.net
GNU General Public License v3.0
11 stars 4 forks source link

Will not compile with tcl 8.6 - Error: ‘Tcl_Interp’ has no member named ‘result’ #1

Open ghost opened 6 years ago

ghost commented 6 years ago

Attempting to compile on Debian 9.5 / stretch. This is all a little over my head, but there appears to be some sort of deprecation involved. It appears to have to do with my later version of tcl. The earliest version available on this version of Debian is 8.5.

See: https://bugzilla.redhat.com/show_bug.cgi?id=902561

Additional info: Workaround: add "-DUSE_INTERP_RESULT" to CPPFLAGS.

Solution: stop using fields inside Tcl_Interp; they are deprecated and the above workaround will be removed in a future version of Tcl.

I am unclear where or how to add that to CPPFLAGS in the meantime (I am not a developer.)

This is the result:

Making default in icb make[1]: Entering directory '/home/thorpe/cicb/icb' gcc -g -O2 -Wall -I/usr/include/tcl8.6 -I.. -I. -I. -o c_hush.o -c c_hush.c In file included from c_hush.c:5:0: c_hush.c: In function ‘hushadd’: icb.h:93:20: error: ‘Tcl_Interp {aka struct Tcl_Interp}’ has no member named ‘result’

define TRET interp->result

                ^

c_hush.c:18:10: note: in expansion of macro ‘TRET’ strcpy(TRET, "c_hush: can't hush a null nickname"); ^~~~ icb.h:93:20: error: ‘Tcl_Interp {aka struct Tcl_Interp}’ has no member named ‘result’

define TRET interp->result

                ^

c_hush.c:26:10: note: in expansion of macro ‘TRET’ strcpy(TRET, "c_hush: out of memory"); ^~~~ c_hush.c: In function ‘hushdelete’: icb.h:93:20: error: ‘Tcl_Interp {aka struct Tcl_Interp}’ has no member named ‘result’

define TRET interp->result

                ^

c_hush.c:48:11: note: in expansion of macro ‘TRET’ sprintf(TRET, "c_hush: %s is not being hushed", nick); ^~~~ Makefile:113: recipe for target 'c_hush.o' failed make[1]: [c_hush.o] Error 1 make[1]: Leaving directory '/home/thorpe/cicb/icb' Makefile:29: recipe for target 'default' failed make: [default] Error 2

hoche commented 6 years ago

Ok, thanks. I'll take a look at it, but it'll take me a bit to get to it. I think the latest version I have of Debian is Jessie so I'll need to set up a new VM for Stretch.

hoche commented 6 years ago

Ok, I see: cicb's using a deprecated interface to the TCL interpreter that they finally cut off support for. I can make it do the CPPFLAGS thing, but that's just kicking the can down the road. I really need to fix it properly by redoing how it calls the interpreter.