#129 Tcl/Tk build errors.

None
closed-works-for-me
nobody
None
5
2014-08-23
2013-01-29
James Tappin
No

When trying to build 5.9.9 from source (or using the Arch AUR PKGBUILD script) The build fails with the following errors:

[ 20%] Building C object bindings/tcl/CMakeFiles/plplottcltkd.dir/__/tk/plframe.c.o
/data/software/plplot-5.9.9/bindings/tk/plframe.c: In function ‘plFrameCmd’:
/data/software/plplot-5.9.9/bindings/tk/plframe.c:487:11: error: ‘Tcl_Interp’ has no member named ‘result’
/data/software/plplot-5.9.9/bindings/tk/plframe.c: In function ‘PlFrameWidgetCmd’:
/data/software/plplot-5.9.9/bindings/tk/plframe.c:619:32: error: ‘Tcl_Interp’ has no member named ‘result’
/data/software/plplot-5.9.9/bindings/tk/plframe.c: In function ‘process_data’:
/data/software/plplot-5.9.9/bindings/tk/plframe.c:2678:43: error: ‘Tcl_Interp’ has no member named ‘result’
/data/software/plplot-5.9.9/bindings/tk/plframe.c:2688:43: error: ‘Tcl_Interp’ has no member named ‘result’
/data/software/plplot-5.9.9/bindings/tk/plframe.c: In function ‘report’:
/data/software/plplot-5.9.9/bindings/tk/plframe.c:3278:15: error: ‘Tcl_Interp’ has no member named ‘result’
/data/software/plplot-5.9.9/bindings/tk/plframe.c:3289:19: error: ‘Tcl_Interp’ has no member named ‘result’
/data/software/plplot-5.9.9/bindings/tk/plframe.c:3303:28: error: ‘Tcl_Interp’ has no member named ‘result’
/data/software/plplot-5.9.9/bindings/tk/plframe.c:3307:15: error: ‘Tcl_Interp’ has no member named ‘result’
/data/software/plplot-5.9.9/bindings/tk/plframe.c:3311:11: error: ‘Tcl_Interp’ has no member named ‘result’
/data/software/plplot-5.9.9/bindings/tk/plframe.c: In function ‘process_bop’:
/data/software/plplot-5.9.9/bindings/tk/plframe.c:3327:51: error: ‘Tcl_Interp’ has no member named ‘result’
/data/software/plplot-5.9.9/bindings/tk/plframe.c: In function ‘process_eop’:
/data/software/plplot-5.9.9/bindings/tk/plframe.c:3342:51: error: ‘Tcl_Interp’ has no member named ‘result’
make[2]: *** [bindings/tcl/CMakeFiles/plplottcltkd.dir/__/tk/plframe.c.o] Error 1
make[1]: *** [bindings/tcl/CMakeFiles/plplottcltkd.dir/all] Error 2
make: *** [all] Error 2

The versions of Tcl & Tk are:
tcl 8.6.0-3
tk 8.6.0-1

I was unable to get the svn version to configure, the final error was:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ITCL_LIBRARY
linked by target "pltcl" in directory /tmp/yaourt-tmp-james/aur-plplot-svn/src/plplot/utils

-- Configuring incomplete, errors occurred!

Discussion

  • Arjen Markus
    Arjen Markus
    2013-01-29

    This has been fixed (mostly) in the source repository. It is a change in the
    public interface for Tcl 8.6 (TIP 330 - http://www.tcl.tk/cgi-bin/tct/tip/330 for the details) so as to discourage the direct use of the result component. (That
    has been deprecated for last ten years).
    You should define the C preprocessor macro USE_INTERP_RESULT if you want to use it, or check out the latest version from SVN.

    Note: there is one use of interp->result left which I have fixed, but I can not
    test it (on Windows the Tk bindings are not built). The fix is almost trivial,
    but still.

     
  • James Tappin
    James Tappin
    2013-01-29

    For the SVN itcl configure problem on Arch & derivatives, there is a simple fix, it is necessary to check for version 4.0.0 of the itcl library (the attached patch makes it work). Not sure of there's a more flexible way to do it.

    However there is still an error in the build:
    [ 19%] Building C object bindings/tcl/CMakeFiles/plplottcltkd.dir/__/tk/tkMain.c.o
    /home/james/Data/Linux/plplot/bindings/tk/tkMain.c:89:12: error: conflicting types for ‘Tcl_Import’
    In file included from /usr/include/tcl.h:2433:0,
    from /home/james/Data/Linux/plplot/bindings/tcl/pltcl.h:15,
    from /home/james/Data/Linux/plplot/bindings/tk/pltk.h:12,
    from /home/james/Data/Linux/plplot/bindings/tk/pltkd.h:16,
    from /home/james/Data/Linux/plplot/bindings/tk/tkMain.c:65:
    /usr/include/tclDecls.h:1472:13: note: previous declaration of ‘Tcl_Import’ was here
    make[2]: *** [bindings/tcl/CMakeFiles/plplottcltkd.dir/__/tk/tkMain.c.o] Error 1
    make[1]: *** [bindings/tcl/CMakeFiles/plplottcltkd.dir/all] Error 2
    make: *** [all] Error 2

    It appears that although Tcl_Import is defined in the tcl system, the Tcl_Import_TCL_DECLARED macro is not getting set.

     
  • James Tappin
    James Tappin
    2013-01-29

    Patch to fix itcl library not found (v4.0.0)

     
    Attachments
  • James Tappin
    James Tappin
    2013-01-30

    A bit of further detective work on the Tcl_import issue.

    It turns out that in tclDecls.h, in version 8.5 (and presumably earlier versions as well) each definition is accompanied by defining a ..._TCL_DEFINED macro, this has been removed in 8.6

    I'm not sure if those two definitions can safely be removed of if there's a better way (a #if TCL_VERSION < 8.6 wrapper was rejected by the C preprocessor).

     
  • Alan W. Irwin
    Alan W. Irwin
    2014-01-15

    • status: open --> closed-works-for-me
    • Group: -->
     
  • Alan W. Irwin
    Alan W. Irwin
    2014-01-15

    I have just completed a lot of work on the Tcl-related parts of our build system. As a result, Tcl8.6/Tcl8.6/Itcl/Itk/Iwidgets work fine for me now so I am changing the status to closed-works for me. Please verifiy that the PLplot svn trunk version also works for you, but if not reopen this bug with additional details.