Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e5b7e6dfa1791507c8bac0d3e682746afbaa57d8
Ticket: 3587096fffffffffffffffffffffffffffffffff
win vista/7: "can't find init.tcl" when called via junction
User & Date: oehhar on 2012-11-14 10:46:51
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Platform: win vista/win 7
    Tcl Versions: 8.5.13, 8.6.0rc0
    
    The following error message arises, if wish86.exe is called with a path component with a directory junction with no "Directory list" right
    This is the case for German Windows Vista when wish.exe is in the folder c:\programme (which is a juction to "c:\program files").
    
    "Can't find a usable init.tcl in the following directories:
    C:/programme/tcl8.6/lib/tcl8.6 C:/programme/tcl8.6/lib/tcl8.6
    C:/programme/lib/tcl8.6 C:/programme/tcl8.6/library
    C:/programme/library C:/programme/tcl8.6.0/library C:/tcl8.6.0/library"
    
    --------------------------------------------------------------------------------
    Unfortunately, I am not able any more to test this, as I applied the hotfix which changes that:
    http://support.microsoft.com/kb/969986
    I have not found any way to rewind that.
    -------------------------------------------------------------------------------
    The following test does not show this error, but a similar one. The shown error message complains about a not found tk.tcl.
    Do the following steps (translated from german dialogs):
    - you have a tcl installation in a path, say c:\test\tcl860rc0
    - open an administrator dos box
    - enter there:
      cd c:\test
      mklink /j tcl860rc0_junction tcl860rc0
    - use the windows explorer, open the properties of the junctions, tab security:
    - Press the continue button to open the "Rights for tcl860rc0_junction tcl860rc0" dialog box
    - Select "Users" in the listbox "Graup and User names"
    - Select the "Deny" checkbox for "Show folder contents"
      The attached image shows the german version of the dialog
    - Press "Apply"
    - Ceate a batch file with the following contents:
    c:\test\tcl860rc0_junction\bin\wish86.exe
    <EOF>
    Adjust the name of the wish executable, if your name is different.
    - execute the batch file.
    It appears a message box with the following text:
    
    "Can't find a usable tk.tcl in the following directories:
    C:/test/tcl8.6.0/library/tk8.6 C:/test/tcl8.6.0/tcl8.6
    C:/test/tcl860rc0_junction/lib/tk8.6 c:/test/lib/tk8.6
    c:/test/tcl860rc0_junction/library"
    
    ------------------------------------------------------------------------
    IMHO, one should introduce a "[file normalize ]" around the generation
    of the parentDir variable in Line 370 of tclInterp.c:
    
    The current code is:
    set parentDir [file dirname [file dirname [info nameofexecutable]]]
    to avoid this issue, one may use:
    set parentDir [file normalize [file dirname [file dirname [info nameofexecutable]]]]
    At least, this helps in my scripts to get rid of directory junctions related issues.
    
    A sample session with the "c:\Programme" junction:
    C:\test>c:\Programme\tcl8.6\bin\tclsh86t.exe
    % info nameofexecutable
    c:/Programme/tcl8.6/bin/tclsh86t.exe
    % file normalize [info nameofexecutable]
    C:/Program Files/tcl8.6/bin/tclsh86t.exe
    
    ---------------------------------------------------------------------
    Unfortunately, in the upper test case, it fails.
    Example session: (the upper example, but with tclsh86t.exe in the batch file:
    c:\test\tcl860rc0_junction\bin\tclsh86t.exe
    
    C:\test>c:\test\tcl860rc0_junction\bin\tclsh86t.exe
    % info nameofexecutable
    c:/test/tcl860rc0_junction/bin/tclsh86t.exe
    % file normalize [info nameofexecutable]
    C:/test/tcl860rc0_junction//tclsh86t.exe
    
    Remark the double "//" - the path component "bin" disapeared.
    ---------------------------------------------------------------------
    Related core list thread: http://code.activestate.com/lists/tcl-core/12335/
    
  4. foundin changed to: "current: 8.6.0"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "oehhar"
  10. subsystem changed to: "38. Init - Library - Autoload"
  11. title changed to:
    win vista/7: "can't find init.tcl" when called via junction
    
  12. type changed to: "Bug"