Closed sl1pkn07 closed 3 years ago
Looks like you are using a version of Xcode that is about 12 months old.
presentedTime
and addPresentedHandler:
were introduced in macOS 10.15.4, about 9 months ago, so your version of Xcode isn't aware of them.
MoltenVK strives to support older versions of macOS at runtime, but we do not attempt to support significantly older versions of Xcode for building MoltenVK.
Please upgrade your version of Xcode.
Thanks. But i think can't. Because the latest version of vscode for mojave is the version i have
im not sure if i can force the installation
Greetings
Ok, i manage to install Xcode 11.7 with a little hacky
now build ok
please add in the readme an advise with the what version is need as minimun to build moltenvk
greetings
please add in the readme an advise with the what version is need as minimun to build moltenvk
The Building MoltenVK section of the README.md
already starts with...
During building, MoltenVK references the latest Apple SDK frameworks. To access these frameworks, and to avoid build errors, be sure to use the latest publicly available version of Xcode.
...which is accurate, since MoltenVK intentionally makes use of the latest production API at build time, specifically to make use of the latest and greatest Metal functionality (with runtime workarounds as mentioned above).
not at all, because this is the list of compatible Xcode by each version of macOS
for example, in the readme, say the minimum macos compatible for moltenvk is
At runtime, MoltenVK requires at least macOS 10.11,
but the xcode compatible with macos 10.11 is Xcode 8.2.1,
so you cant build moltenvk in this version. because the minimum (i test, because i'm in mojave, and fail build with xcode 11.3.1 wich is the latest xcode for my macos version) is Xcode 11.7, wich requres macos 10.15.2+ and cross fingers, because is only installable by hacking
https://izziswift.com/how-to-run-xcode-11-4-on-macos-mojave-10-14-6/ (tested method 3 and 5)
so yes. you need update and add the advise the minimum version of macos and xcode for build moltenvk
greetings
At runtime, MoltenVK requires at least macOS 10.11, but the xcode compatible with macos 10.11 is Xcode 8.2.1, so you cant build moltenvk in this version
There is a difference between run-time requirements and build-time requirements.
A MoltenVK binary will run on macOS 10.11. But that binary can't be built from source code on anything before Xcode 12 now.
The reason for this is that at build-time, Xcode needs to be aware of any symbols that are in the MoltenVK source code (like the addPresentedHandler:
you encountered). If a symbol was introduced in a recent SDK, MoltenVK needs to be built with that SDK (Xcode), or a later SDK, otherwise it produces compile errors like the ones you encountered above. And as mentioned above, to make use of the latest Metal features, MoltenVK does consistently reference symbols in the latest production SDK, hence the instructions in README.md
.
However, at run-time, MoltenVK can test and bypass those symbols when running on a version of macOS that doesn't support them. That's the purpose of code like:
if ([mtlDrawable respondsToSelector: @selector(addPresentedHandler:)]) {
...
}
When running on something like macOS 10.11, which does not support addPresentedHandler:
, this code will cause use of addPresentedHandler:
to be avoided.
is a requirement of apple that i can use it in old systems but you can't build it on it?
is a weird requirement, if you want add or fix things in older systems but you can't build it in them
greetings
@billhollings I'm creating a MoltenVK recipe for conan, and I've encountered this issue since the latest Macos agent in conan-center CI has XCode 11 only. Downloading a binany outside of conan workflow is not an option.
Anyway I would to ask: MoltenVK 1.1.1 requires at least XCode 12 at build time. MoltenVK runtime can run with older Macos versions, but is it possible to link a static MoltenVK 1.1.1 (built with XCode >= 12) with XCode < 12? I guess the answer is no, but I would like a confirmation.
script used (Brew formula)
fails in this step
complete step log
https://gist.github.com/sl1pkn07/b1ccc27c73753a8821b5476a12c7283f
Mojave 10.14.6 in x86_64 environment Xcode 11.3.1 (11C505) MoltenVK 1.1.1. master not tested FS case sensitive
greetings