Apple notarisation process - LC_VERSION_MIN_MACOSX
ryandesign at macports.org
Tue Mar 2 10:14:58 UTC 2021
On Mar 1, 2021, at 17:16, Adrian Georgescu wrote:
> I am just a new user so bear with me.
> It seems that now Apple rejects any library part of a notarised application (and Mac App Store) if it does not comply with certain rules.
> One of this rules is that each binary or library must indicate the minimum OS version is suppose to run on.
> This can be checked with otool like in this example:
> otool -l libvpx.dylib |grep -A 2 -B 3 LC_VERSION_MIN_MACOSX
> cmdsize 24
> uuid 1EDC0CF1-9D58-30B4-AF67-A0DEEAF3BAF4
> Load command 8
> cmd LC_VERSION_MIN_MACOSX
> cmdsize 16
> version 10.11
> If your app depends on 3rd party libs you can install them using Mac Ports. But the default built binaries do not always work.
> The only way to obtain this flag set while using port is to install from source using -s parameter
> But for some libraries even this is not enough (libvpx and libsdl are some examples I ran into).
> The option for generating this flag is at linking stage and the option for creating this flag must be passed to the linker for this and this is not always possible by just using port install -s command.
> For example installing libvpx library (and many others) was not possible using -s because the library was not ready to use this flag.
> I have to edit the Makefiles and pass this flag to the linking stage:
> 10.11 or whatever minimum version the lib or app is suppose to run on.
> May I suggest that this must be documented somehow in the port recipes.
I am not aware of Apple's increasingly inconvenient requirements in this regard.
MacPorts adopted the strategy of setting the MACOSX_DEPLOYMENT_TARGET environment variable in all phases. It was our understanding that this was equivalent to setting -mmacosx-version-min, therefore we make no effort to set -mmacosx-version-min and have not had any qualms in removing conflicting -mmacosx-version-min directives when we encounter them.
If this is not longer satisfactory to Apple, then we will need to change how MacPorts works and fix all ports (a huge undertaking, of course).
More information about the macports-users