Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2023-06-13
09:17 • Closed ticket [503c4c6f56]: Compiled code fails to run on older macos plus 6... artifact: f637ac16b4 user: jan.nijtmans
2023-06-08
17:22 • Ticket [503c4c6f56]: 4 changes artifact: ba6336e6c9 user: fvogel
2023-06-07
02:33 • Add attachment 503c4c6f56b5.diff to ticket [503c4c6f56b5a45d|503c4c6f56... artifact: 38783f85f9 user: chrstphrchvz
02:32 • Ticket [503c4c6f56] Compiled code fails to run on older macos status still O... artifact: 00a0bae521 user: chrstphrchvz
2023-05-24
16:48 • Ticket [503c4c6f56]: 3 changes artifact: 6c5e2893c6 user: jal_frezie
16:21 • New ticket [503c4c6f56]. artifact: 6dd9d34059 user: jal_frezie

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: