|
From: Marc C. <cul...@gm...> - 2025-11-03 12:59:38
|
It is not clear to me from the TIP what the default search path would be
for macOS. However, macOS is not a single platform in this context. It
can be built two ways:
(1) a framework build, which installs in /Library/Frameworks/Tcl.framework
(and an analogous Library/Frameworks/Tk.framework.
(2) a "prefix" build, which installs in <prefix>/{bin,lib.include,share}
In the past the default search path accommodated both build types.
For a framework build of Tcl X.Y, init.tcl was installed in:
/Library/Frameworks/Tcl.framework/Versions/X.Y/Resources/Scripts/
and that was also a place where third party packages could be installed.
(By the way this is a good way to handle different versions of Tcl and Tk.)
For a prefix build I believe that the install policy was the same as for
other unix systems.
However, other directories were included in the search path on macOS.
These included /Library/Tcl and / or /Library/Tcl/X.Y. In addition there
was a notion that a user might install a Tcl.framework in their personal
Library directory. So another location was
$HOME/Library/Frameworks/Tcl.framework/Versions/X.Y/Resources/Scripts.
Incidentally Apple's (flexible) rules for how files should be arranged in a
framework specify that executable scripts should go in the Resources
directory. However this conflicts with the fact that while some extension
packages contain only scripts, others contain dynamic libraries. However,
there seems to be no problem with installing a package that has a dynamic
library into
/Library/Frameworks/Tcl.framework/Versions/X.Y/Resources/Scriopts.
- Marc
On Mon, Nov 3, 2025 at 4:29 AM Jan Nijtmans <jan...@gm...> wrote:
> Op zo 2 nov 2025 om 08:35 schreef apnmbx-public:
> >
> > TIP 732: Changes to the Tcl script library search path is ready for
> comments.
> ....
> > I’m particularly interested in feedback from Unix and macOS folks that
> build distributions if this impacts them in any way.
>
> Well, I like this TIP, but there is a test failure on MacOS:
> <https://github.com/tcltk/tcl/actions/runs/18965835171/job/54162420957
> >
>
> ==== unixInit-3.2 TclpSetInitialEncodings FAILED
> ==== Contents of test case:
> set env(LANG) japanese
> set env(LC_ALL) japanese
> set f [open "|[list [interpreter]]" w+]
> chan configure $f -buffering none
> puts $f {puts [encoding system]; exit}
> set enc [gets $f]
> close $f
> set enc
> ---- Test generated error; Return code was: 1
> ---- Return code should have been one of: 0 2
> ---- errorInfo: application-specific initialization failed: Cannot
> find a usable init.tcl in the following directories:
> /Users/runner/work/tcl/tcl/lib/tcl9.1
> This probably means that Tcl wasn't installed properly.
> while executing
> "close $f"
> ("uplevel" body line 8)
> invoked from within
> "uplevel 1 $script"
> ---- errorCode: NONE
> ==== unixInit-3.2 FAILED
>
> Hope this helps,
> Jan Nijtmans
>
>
> _______________________________________________
> Tcl-Core mailing list
> Tcl...@li...
> https://lists.sourceforge.net/lists/listinfo/tcl-core
>
|