Opened 4 years ago

Closed 20 months ago

#61253 closed defect (fixed)

configuring base requires working tclsh

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: base Version: 2.6.99
Keywords: Cc:
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

It was a surprise to me to discover that tcllib's configure script, which our configure script runs, requires a working tclsh, and that if ${prefix}/libexec/macports/bin/tclsh8.5 exists, it will choose that one. This is a problem when ${prefix}/libexec/macports/bin/tclsh8.5 exists but is broken, which was the case on my system and was one of the reasons why I was trying to rebuild from source.

The symptom was:

Installing Tcllib 1.18
You have chosen the following configuration ...

Packages:      /Users/rschmidt/macports-base/vendor/vendor-destroot/opt/local/libexec/macports/lib/.
Applications:  Not installed.
Examples:      Not installed.
Documentation: Not installed.
[snip]
chmod: /Users/rschmidt/macports-base/vendor/vendor-destroot/opt/local/libexec/macports/lib/tcllib*: No such file or directory

The packages path is wrong! It should not end with lib/.; it should end with lib/tcllib1.18.

tcllib's configure script replaces placeholder strings @PACKAGE@ and @VERSION@ with values computed by a script called sak.tcl. The version consists of the major version, then a literal dot, then the minor version. Since in my case tclsh did not work, the package, major and minor version strings were empty, leaving only the literal dot.

My workaround was to move the directory ${prefix} to ${prefix}old, then run configure and make, then move ${prefix}old back to ${prefix}, then sudo make install.

Apple has announced that scripting languages like tclsh won't necessarily be included in future versions of macOS. We should modify our build process so that we first build tclsh, and only then do we configure tcllib and point it at the tclsh that we built.

Change History (4)

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

comment:3 Changed 4 years ago by jmroot (Joshua Root)

Yes, this came up when our vendored Tcl was first added, and is why https://www.macports.org/install.php#other still lists Tcl as a build requirement.

comment:4 Changed 20 months ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In 2eeba4da73a93102cac669ea55c1946c401730ec/macports-base (master):

Allow building without an external tclsh

Fixes: #61253

Note: See TracTickets for help on using tickets.