However when I run the binary on a lower OS version it gives me the error:
dyld: Symbol not found: ____chkstk_darwin
Expected in: /usr/lib/libSystem.B.dylib
Is there anything I can do to force rust to use a compatibility version of the libSystem ?
These are the dynamic dependencies of my binary
otool -L indexer
indexer:
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1069.11.0)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 59306.41.2)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1673.126.0)
cc: @alexcrichton maybe you could help or point me in some direction ? I have seen other posts by you regarding linking and compiling binaries on OSX so trying my luck here.
I don't have macOS experience myself, but there's some discussion in the release team about this. In theory, we claim to support as low as 10.7, but we don't have CI to actually test that.
I don't personally recognize the ____chkstk_darwin symbol, so it may be pulled in by C code perhaps? Do you have C/C++ somewhere in the build? If so you'll need to pass a similar compile flag to them.
@cuviper this issue was happening on 10.13 which is ~2 years old. I'm guessing there is still CI for that?
@alexcrichton@kornel turns out I do depend on a crate which has a dependency on a sys crate. Setting MACOSX_DEPLOYMENT_TARGET does seem to set the correct LC_VERSION_MIN_MACOSX on the dependent C binary.
Hopefully this should fix the issue.
I will mark this issue as resolved once I have been able to verify this.