Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Compiled code fails to run on older macos

Closed / Fixed503c4c6f56b5a45d7e3acc5bef792943bbee8d58Created 4 years agoUpdated 3 years ago
Descriptionplain2023-05-24 16:21:40
If you build TclTk from source on MacOS 12.3 and specify -mmacosx-version-min=10.13" it should produce a framework that can run on older MacOS versions. But trying it on 10.15 I got

dyld: Library not loaded: /System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/UniformTypeIdentifiers

It seems that a workaround might be to hide that framework when compiling TclTk so the build process falls back on something else...
jal_frezieplain2023-05-24 16:48:44
The problem of course being that system integrity protection does not allow you to hide a system framework even as root
chrstphrchvzwiki2023-06-07 02:32:37

Ideally this ticket belongs in the Tk issue tracker, since usage of UniformTypeIdentifiers is entirely in Tk Aqua, not Tcl.

The changes relevant to this issue were part of the monterey_deprecations branch. If I understand https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html#//apple_ref/doc/uid/20002378-107026 correctly, then the problem is because even though any usage of UniformTypeIdentifiers functions was put in if (@available(macOS 11.0, *)) {…} blocks, in https://core.tcl-lang.org/tk/info/9b50c66a1c94 the framework itself was not weakly linked to. The attached patch may fix the issue. “Hiding” the framework during build should not be desirable nor necessary.

fvogelwiki2023-06-08 17:22:29

Committed by Jan here [4094492b].

jan.nijtmanswiki2023-06-13 09:17:04

Now committed. If more is needed to make this fully functional, please re-open this ticket (or - better - create a new Tk ticket). I think it should work as-is now.

Log in (anonymous is fine) to add a comment.

Attachments: