Closed Tatsh closed 3 years ago
They are all guarded by @available(macOS 10.16,*)
, see https://github.com/yujitach/MenuMeters/blob/9107aa9ba589d67af5ed18b36bbd1301c044f490/PrefPane/MenuMetersPref.m#L169-L179 and https://github.com/yujitach/MenuMeters/blob/9107aa9ba589d67af5ed18b36bbd1301c044f490/PrefPane/MenuMetersPref.m#L206-L208 .
There are many other @available
clauses for 10.15, 11, etc, so I don't understand why they cause failures on a 10.14 bot.
I think it's because when this builds against an old SDK, the method is non-existent so it makes sense for the compiler to complain. The @available
stuff is for runtime but must be built on an SDK that is at least the highest version specified in all @available
clauses in the project. So now the project requires at least SDK 10.16/11 to build.
Would you consider using compile-time macros instead? e.g.:
#if (__MAC_OS_X_VERSION_MAX_ALLOWED < 101600)
The code already has some of these, such as the #ifdef ELCAPITAN
usages.
The code when compiled on the latest OS is confirmed to run on Sierra (as a certain user wrote to me a couple of days ago.) Could you instead use a bot running a more recent macOS?
The binaries that MacPorts distributes to users get built on bots that mirror the users' own machines: macOS version + matching Xcode version + matching SDK version. Only the 10.14 bots with this set up produce the binaries for 10.14 users.
I see. I'm happy to merge a pull request if you prepare one. I can't guarantee that I always combine @available
and #if (__MAC_OS_X_VERSION_MAX_ALLOWED)
correctly, given my limited time to maintain this.
Okay. I will try to get that to you soon.
https://trac.macports.org/ticket/63969
Are the
@available()
usages correct for these? Full log of build on 10.14: https://build.macports.org/builders/ports-10.14_x86_64-builder/builds/106094/steps/install-port/logs/stdio