Apple notarisation process - LC_VERSION_MIN_MACOSX

Adrian Georgescu ag at ag-projects.com
Mon Mar 1 23:16:12 UTC 2021


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:

-mmacosx-version-min=10.11

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.

Regards,
Adrian
 












More information about the macports-users mailing list