[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: clue on sparky

Jack Howarth <howarth@bromo.msbb.uc.edu> writes:

>     I believe I may have a clue as to why sparky is segfaulting in
> when run as a python extension. The upstream maintainer is using
> python 2.1.1 and tcl 8.3.4 so I built against our python 2.1.3 and
> tck 8.3.3. However I just noticed that sid's python2.1 is in
> fact built against tcl-8.4 now. Could this case problems if one
> builds a python2.1 module against tcl8.3 instead and try to import it?

Yes, I believe it could.  I got the same problem when I tried to use
python-opengl linked against tk8.3, in my tk8.4 system.

> I tried building sparky against tcl8.4 but got errors of the form...
> g++-2.95 -O2 -fPIC -I/usr/include/tcl8.4 -c /usr/local/src/sparky/c++/winsystem-unix.cc
> In file included from /usr/local/src/sparky/c++/winsystem-unix.cc:9:
> /usr/local/src/sparky/c++/winsystem-all.cc: In function `void update_argv(WinSysP *, int *, char **)':
> /usr/local/src/sparky/c++/winsystem-all.cc:354: initialization to `char *' from `const char *' discards qualifiers
> /usr/local/src/sparky/c++/winsystem-all.cc:360: passing `char ***' as argument 4 of `Tcl_SplitList(Tcl_Interp *, const char *, int *, const char ***)' adds cv-quals without intervening `const'
> /usr/local/src/sparky/c++/winsystem-all.cc: In method `Command_Callback::Command_Callback(WinSysP *, void *, void (*)(void *, void *, void *), void *, bool = true)':
> /usr/local/src/sparky/c++/winsystem-all.cc:1717: passing `int (*)(void *, Tcl_Interp *, int, char **)' as argument 3 of `add_tcl_command(WinSysP *, const Stringy &, int (*)(void *, Tcl_Interp *, int, const char **), void *)'
> ..etc. Anyone have any idea how to properly handle those?

Maybe some variables have been declared constant in tcl8.4 that were
previously non-const?  Then the variables in your code needs to be
const as well.


Reply to: