• problem using tclcompiler in BAWT

    From yukyuen leung@21:1/5 to All on Thu Jan 20 21:44:56 2022
    i tried to compile some tcl script into byte code, but it failed to load the generated tbc file.
    #######################
    (bin) 1 % pwd C:/Users/b/Desktop/tools/bawt/BawtBuild/Windows/x86/Release/Distribution/opt/Tcl/bin
    (bin) 2 % parray tcl_platform
    tcl_platform(byteOrder) = littleEndian
    tcl_platform(engine) = Tcl
    tcl_platform(machine) = intel
    tcl_platform(os) = Windows NT
    tcl_platform(osVersion) = 10.0
    tcl_platform(pathSeparator) = ;
    tcl_platform(platform) = windows
    tcl_platform(pointerSize) = 4
    tcl_platform(threaded) = 1
    tcl_platform(user) = b
    tcl_platform(wordSize) = 4
    (bin) 3 % info patchlevel
    8.6.12
    (bin) 4 % cd ../lib/Tcllib1.20/ftpd
    (ftpd) 5 % dir
    Volume in drive C is OS
    Volume Serial Number is E494-AFD0

    Directory of C:\Users\b\Desktop\tools\bawt\BawtBuild\Windows\x86\Release\Distribution\opt\Tcl\lib\Tcllib1.20\ftpd

    01/21/2022 12:09 AM <DIR> .
    01/21/2022 12:09 AM <DIR> ..
    04/10/2019 12:19 PM 60,053 ftpd.tcl
    04/10/2019 12:19 PM 128 pkgIndex.tcl
    01/21/2022 12:07 AM 3,224 test.tcl
    3 File(s) 63,405 bytes
    2 Dir(s) 58,978,316,288 bytes free
    (ftpd) 6 % package require compiler
    1.7.1
    (ftpd) 7 % package require tbcload
    1.7
    (ftpd) 8 % compiler::compile ftpd.tcl
    (ftpd) 9 % dir
    Volume in drive C is OS
    Volume Serial Number is E494-AFD0

    Directory of C:\Users\b\Desktop\tools\bawt\BawtBuild\Windows\x86\Release\Distribution\opt\Tcl\lib\Tcllib1.20\ftpd

    01/21/2022 12:35 AM <DIR> .
    01/21/2022 12:35 AM <DIR> ..
    01/21/2022 12:35 AM 50,565 ftpd.tbc
    04/10/2019 12:19 PM 60,053 ftpd.tcl
    04/10/2019 12:19 PM 128 pkgIndex.tcl
    01/21/2022 12:07 AM 3,224 test.tcl
    4 File(s) 113,970 bytes
    2 Dir(s) 58,978,258,944 bytes free
    (ftpd) 10 % source ftpd.tbc
    expected integer but got "ZgpJ!w|.@!^LE!!" at or near "ZgpJ!w|.@!^LE!!
    53"
    #######################

    but if i define a simple function in a file test.tcl, i can load the tbc file without any error:
    proc a {b} {
    puts "$b"
    }

    (ftpd) 11 % compiler::compile test.tcl
    (ftpd) 12 % source test.tbc
    (ftpd) 13 % a "xyz"
    xyz

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From yukyuen leung@21:1/5 to All on Fri Feb 11 21:23:21 2022
    Looks like it is fixed already. https://groups.google.com/g/comp.lang.tcl/c/3giA0OCXsoI/m/FE_PWbtVCQAJ

    i was able to grab the latest tclcompiler from androwish.org and compiled it in BAWT. The problem is gone.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)