[MacPorts] #72359: tcl: when port active, script port_binary_distributable fails; dlopen complains about libtdbc1.1.10.dylib
MacPorts
noreply at macports.org
Fri Apr 18 00:03:57 UTC 2025
#72359: tcl: when port active, script port_binary_distributable fails; dlopen
complains about libtdbc1.1.10.dylib
----------------------+----------------------
Reporter: mascguy | Owner: mascguy
Type: defect | Status: reopened
Priority: Normal | Milestone:
Component: ports | Version: 2.10.5
Resolution: | Keywords: sequoia
Port: tcl |
----------------------+----------------------
Comment (by mascguy):
Replying to [comment:11 mascguy]:
> As for the SIP-related error regarding mismatched Team IDs, that is
legit: `port-tclsh` is loading the `libtdbc` dylib from the `tcl` port,
rather than `${prefix}/libexec/macports/lib/...`. And the adhoc-signed
binaries from the port, don't have a Team ID set. Whereas MacPorts base
binaries do.
>
> So... why is the wrong `libtdbc` being loaded...?
Ah, found it: comment:3:ticket:64507:
> [jmroot]:
>
> Yep, Tcl "helpfully" adds `${prefix}/lib` to `auto_path` when the
interpreter is executed as `${prefix}/bin/port-tclsh` (or indeed anything
under `${prefix}/bin`). https://github.com/macports/macports-
base/blob/master/vendor/tcl8.5.19/library/init.tcl#L55-L59
>
> This problem is avoided by port(1) because its interpreter is set to
`${prefix}/libexec/macports/bin/tclsh8.5`.
And the fix, which works: comment:5:ticket:64507:
> [neverpanic]:
>
> I guess we may also want to look into a way to prevent this for all
users of port-tclsh, e.g. by replacing it with a shell script:
>
> {{{
> #!/bin/sh
> exec @prefix@/libexec/macports/bin/tclsh8.5 "$@"
> }}}
To fair, I didn't try replacing `port-tclsh` with a shell script. Rather,
I executed `tclsh8.6` from the `libexec` area:
{{{
$ /opt/local/libexec/macports/bin/tclsh8.6
jobs/port_binary_distributable.tcl -v openjdk17
"openjdk17" is distributable
}}}
--
Ticket URL: <https://trac.macports.org/ticket/72359#comment:12>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list