Open GitHub2FAblows opened 3 months ago
I may be wrong on this, but after some looking around, I believe this is because of an SDK bug present in Big Sur and newer
Things to note:
_OBJC_CLASS_$_NSLayoutConstraint
present in Foundation.framework - this can be verified by running nm -g
on a copy of the 10.7 Foundation framework_OBJC_CLASS_$_NSLayoutConstraint
present in AppKit.framework$ld$hide$os10.7$_OBJC_CLASS_$_NSLayoutConstraint
was defined in Foundation.tbd in the 10.10-10.15 SDKs, which I believe prevented ld from trying to link the symbol to Foundation when 10.7 is set as the deployment target, this was seemingly moved to CoreAutoLayout.tbd in the Big Sur SDK (CoreAutoLayout.framework was introduced in Big Sur so this wouldn't work by design), but the NSLayoutConstraint definition is still present in Foundation
$ld$add$os10.7$_OBJC_CLASS_$_NSLayoutConstraint
is defined in AppKit.tbd in the 10.10+ SDKs, seemingly to provide the legacy AppKit symbol.
Therefore, I believe readding $ld$hide$os10.7$_OBJC_CLASS_$_NSLayoutConstraint
to Foundation.tbd in the macOS 14 SDK should prevent ld from linking _OBJC_CLASS_$_NSLayoutConstraint
to Foundation (where it is still defined seemingly without the 10.7 safeguard intact) and instead make it link to AppKit, where it is present.
^ The above theory is promising IMO, because we know Bluebox makes SDK edits to compile Chromium Legacy, and if he made new ones since the wiki was written he probably hasn't documented them.
hi,
just curious, did you have to do anything special to compile for 10.7 target?
when i first used lld, i got this issue:
but fixed it using ld64.
now when i build for 10.7, there are no linking errors but there is problems linking coretext (which can be fixed using this link), but also with NSLayout constraint (https://stackoverflow.com/questions/13110529/i-am-getting-this-error-on-using-matplotlib):
credit to @krackers for helping me fix these as much as he possibly could (if it's the same guy haha)