Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e58771955f42960bbe9eb94fc087547926a3659fc4309fc25ead750edef1bb55
Ticket: bf2652aedf42e59076d8f29da8d87b48d83948bb
Tcl 9.1b1 with zipfs support: incorrect value for tcl_library variable
User & Date: anonymous on 2026-10-02 14:10:19
Changes

  1. icomment:
    Let me add more info.
    
    Here is a little C program that creates a Tcl interpreter and tries to run a little script.
    
    #include <stdio.h>
    #include <tcl.h>
    
    int main() {
    
      char TclCommand[2048];
      int retval;
    
      printf("C start\n");
      Tcl_Interp *interp = Tcl_CreateInterp();
      Tcl_Init(interp);
      sprintf(TclCommand,"source setupscript.tcl\n");
      retval = Tcl_Eval(interp,TclCommand);
      if (retval !=TCL_OK) {
        printf("Error %d: %s\n", retval, 
    	   Tcl_GetStringResult(interp));
      }
      Tcl_DeleteInterp(interp);
      printf("C end\n");
      return 0;
    }
    
    Here is the little script needed by the program:
    
    puts "Tcl start"
    puts -nonewline "Tcl version: "
    puts [info tclversion]
    puts [info library]
    puts "Tcl end"
    
    Here is how I compiled it:
    
    #!/bin/sh
    
    export TCLDIR=${HOME}/tcltk9.1
    
    gcc-16 -o tcl_init_test -I${TCLDIR}/include tcl_init_test.c -L${TCLDIR}/lib -ltcl9.1
    
    This is the output I get for Tcl 9.1:
    
    % ./tcl_init_test
    C start
    Tcl start
    Tcl version: 
    9.1
    Error 1: no library has been specified for Tcl
    C end
    
    To compare: this is the output I get for Tcl 9.0, in the same environment:
    
    % ./tcl_init_test
    C start
    Tcl start
    Tcl version: 9.0
    //zipfs:/lib/tcl/tcl_library
    Tcl end
    C end
    
    Note that both Tcl versions have been configured in the same way:
    
    #!/bin/sh
    
    export CC=gcc-16
    
    ./configure --prefix=${HOME}/tcltk9.1
    
    Hope this helps.
    
  2. login: "anonymous"
  3. mimetype: "text/plain"