#43809: port selfupgrade to base v2.3.0 fails on G4 --------------------------+-------------------------------- Reporter: paulccobb@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.3.0 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Comment (by cal@…): Replying to [comment:4 ryandesign@…]:
1. Would it be possible to have the configure script do the search for a tclsh as at present, BUT also do a quick sanity check of whether the Tcl version is appropriate for the Mac OS version? If the check fails, exit with a message explaining that the installation process needs Tcl <major>.<minor> in /usr/bin (or wherever). Ideally the sanity check could also consider architecture, and not try to use a 64-bit Tcl on a 32-bit host (or vice versa).
The problem with this check is that the file that picks up the broken Tcl in this case isn't actually written by MacPorts – it is part of a tarball of Tcllib which we ship unmodified, and we currently have no code to apply patches to these files before configuring. I agree that the code (it's SC_PROG_TCLSH from http://core.tcl.tk/tcllib/artifact/b93d99315ce5f4758a13021bc708a54da766fd94) could be better, e.g. by checking that the detected tclsh actually works, but that's for upstream tcllib to fix, IMO. We could file a bug with the tcllib developers at http://core.tcl.tk/tcllib/reportlist.
But, it might not be unreasonable that we pick not the first tclsh found but the first tclsh that actually works. I'm still not quite clear on why we don't just use `tclsh` or `/usr/bin/tclsh`; not sure why we look for `tclsh*`.
For the same reasons as above: We don't control the file that does that, and we don't have code in place to patch these files before running configure.
2. Could there be a way e.g. a config option to specify the Tcl interpreter for use during the installation, so that if I know I've got a suitable Tcl somewhere on my machine, I can tell the MacPorts installer about it?
We do offer a lot of options like that already; from `./configure --help`:
We do not offer an option for the tclsh used by tcllib for installation, and the tcllib configure script does not have such an option. However, since MacPorts' configure script passes (almost) all its arguments to tcllib's configure script and that has a autoconf cache variable for the path, `./configure ac_cv_path_tclsh=/usr/bin/tclsh` might work. -- Ticket URL: <https://trac.macports.org/ticket/43809#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X