• tcl9: lib folder not in auto_path

    From Harald Oehlmann@wortkarg3@yahoo.com to comp.lang.tcl on Fri Nov 1 20:30:31 2024
    From Newsgroup: comp.lang.tcl

    Dear TCL team,
    I have build and installed TCL 9.0.0 using the nmake with 32 bit MS-VS
    2015 to folder c:\test\tcl9.0.0\tcl900

    The lib folder containes the bundled packages, like: c:\test\tcl9.0.0\tcl900\lib\tdbc

    % package require TDBC
    1.1.9
    % package files tdbc
    C:/test/tcl9.0.0/tcl900/lib/tdbc1.1.9/pkgIndex.tcl C:/test/tcl9.0.0/tcl900/lib/tdbc1.1.9/tdbc.tcl

    Then, I have installed TCLLIB 2.0 to its lib folder: c:\test\tcl9.0.0\tcl900\lib

    (remark that the installer has proposed to embed it into the zip. I have changed this).

    For example, the package log is in folder
    c:\test\tcl9.0.0\tcl900\lib\log

    But:
    % package require log
    no such package
    % set auto_path
    //zipfs:/lib/tcl/tcl_library //zipfs:/lib/tcl
    C:/test/tcl9.0.0/tcl900/lib //zipfs:/lib/tk/tk_library //zipfs:/lib/tk/tk_library/ttk
    the lib folder is not in the auto path
    % lappend auto_path {C:\test\tcl9.0.0\tcl900\lib}
    % package require log
    1.5

    How is tdbc loaded, if not in the auto path?

    Is it good practice to add the external lib folder to the auto path?

    Thank you all,
    Harald

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Ashok@apnmbx-public@yahoo.com to comp.lang.tcl on Sat Nov 2 12:15:12 2024
    From Newsgroup: comp.lang.tcl

    Harald,

    Not sure why it does not find log but from your output, c:/test/tcl9.0.0/tcl900/lib is in fact already in the path (albeit with forward slashes)

    The external lib folder is present in auto_path in all the Tcl 9
    installations I checked

    /Ashok

    On 11/2/2024 1:00 AM, Harald Oehlmann wrote:
    Dear TCL team,
    I have build and installed TCL 9.0.0 using the nmake with 32 bit MS-VS
    2015 to folder c:\test\tcl9.0.0\tcl900

    The lib folder containes the bundled packages, like: c:\test\tcl9.0.0\tcl900\lib\tdbc

    % package require TDBC
    1.1.9
    % package files tdbc
    C:/test/tcl9.0.0/tcl900/lib/tdbc1.1.9/pkgIndex.tcl C:/test/tcl9.0.0/ tcl900/lib/tdbc1.1.9/tdbc.tcl

    Then, I have installed TCLLIB 2.0 to its lib folder: c:\test\tcl9.0.0\tcl900\lib

    (remark that the installer has proposed to embed it into the zip. I have changed this).

    For example, the package log is in folder
    c:\test\tcl9.0.0\tcl900\lib\log

    But:
    % package require log
    no such package
    % set auto_path
    //zipfs:/lib/tcl/tcl_library //zipfs:/lib/tcl C:/test/tcl9.0.0/tcl900/
    lib //zipfs:/lib/tk/tk_library //zipfs:/lib/tk/tk_library/ttk
    the lib folder is not in the auto path
    % lappend auto_path {C:\test\tcl9.0.0\tcl900\lib}
    % package require log
    1.5

    How is tdbc loaded, if not in the auto path?

    Is it good practice to add the external lib folder to the auto path?

    Thank you all,
    Harald


    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Harald Oehlmann@wortkarg3@yahoo.com to comp.lang.tcl on Sat Nov 2 13:22:05 2024
    From Newsgroup: comp.lang.tcl

    Ashok,
    thanks a lot, I found it. It is "lib".
    But "pwd" gives the current folder, which is "C:/test/tcl9.0.0".
    So, it searches in C:/test/tcl9.0.0/lib (which does not exist).
    It is in "C:/test/tcl9.0.0/tcl900/lib" ("tcl900" subfolder)

    I think, it is a bad idea to have a relative component in the auto path.
    It is IMHO also a security hole.

    Thank you for all,
    Harald

    Am 02.11.2024 um 07:45 schrieb Ashok:
    Harald,

    Not sure why it does not find log but from your output, c:/test/ tcl9.0.0/tcl900/lib is in fact already in the path (albeit with forward slashes)

    The external lib folder is present in auto_path in all the Tcl 9 installations I checked

    /Ashok

    On 11/2/2024 1:00 AM, Harald Oehlmann wrote:
    Dear TCL team,
    I have build and installed TCL 9.0.0 using the nmake with 32 bit MS-VS
    2015 to folder c:\test\tcl9.0.0\tcl900

    The lib folder containes the bundled packages, like:
    c:\test\tcl9.0.0\tcl900\lib\tdbc

    % package require TDBC
    1.1.9
    % package files tdbc
    C:/test/tcl9.0.0/tcl900/lib/tdbc1.1.9/pkgIndex.tcl C:/test/tcl9.0.0/
    tcl900/lib/tdbc1.1.9/tdbc.tcl

    Then, I have installed TCLLIB 2.0 to its lib folder:
    c:\test\tcl9.0.0\tcl900\lib

    (remark that the installer has proposed to embed it into the zip. I
    have changed this).

    For example, the package log is in folder
    c:\test\tcl9.0.0\tcl900\lib\log

    But:
    % package require log
    no such package
    % set auto_path
    //zipfs:/lib/tcl/tcl_library //zipfs:/lib/tcl C:/test/tcl9.0.0/tcl900/
    lib //zipfs:/lib/tk/tk_library //zipfs:/lib/tk/tk_library/ttk
    the lib folder is not in the auto path
    % lappend auto_path {C:\test\tcl9.0.0\tcl900\lib}
    % package require log
    1.5

    How is tdbc loaded, if not in the auto path?

    Is it good practice to add the external lib folder to the auto path?

    Thank you all,
    Harald



    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Harald Oehlmann@wortkarg3@yahoo.com to comp.lang.tcl on Sat Nov 2 13:31:28 2024
    From Newsgroup: comp.lang.tcl

    Ashok,
    the issue is my fault !!!
    I have two copies of tcl9 and I picked the wrong one...
    Sorry,
    Harald


    Am 02.11.2024 um 07:45 schrieb Ashok:
    Harald,

    Not sure why it does not find log but from your output, c:/test/ tcl9.0.0/tcl900/lib is in fact already in the path (albeit with forward slashes)

    The external lib folder is present in auto_path in all the Tcl 9 installations I checked

    /Ashok

    On 11/2/2024 1:00 AM, Harald Oehlmann wrote:
    Dear TCL team,
    I have build and installed TCL 9.0.0 using the nmake with 32 bit MS-VS
    2015 to folder c:\test\tcl9.0.0\tcl900

    The lib folder containes the bundled packages, like:
    c:\test\tcl9.0.0\tcl900\lib\tdbc

    % package require TDBC
    1.1.9
    % package files tdbc
    C:/test/tcl9.0.0/tcl900/lib/tdbc1.1.9/pkgIndex.tcl C:/test/tcl9.0.0/
    tcl900/lib/tdbc1.1.9/tdbc.tcl

    Then, I have installed TCLLIB 2.0 to its lib folder:
    c:\test\tcl9.0.0\tcl900\lib

    (remark that the installer has proposed to embed it into the zip. I
    have changed this).

    For example, the package log is in folder
    c:\test\tcl9.0.0\tcl900\lib\log

    But:
    % package require log
    no such package
    % set auto_path
    //zipfs:/lib/tcl/tcl_library //zipfs:/lib/tcl C:/test/tcl9.0.0/tcl900/
    lib //zipfs:/lib/tk/tk_library //zipfs:/lib/tk/tk_library/ttk
    the lib folder is not in the auto path
    % lappend auto_path {C:\test\tcl9.0.0\tcl900\lib}
    % package require log
    1.5

    How is tdbc loaded, if not in the auto path?

    Is it good practice to add the external lib folder to the auto path?

    Thank you all,
    Harald



    --- Synchronet 3.20a-Linux NewsLink 1.114