Fix Apple builds and update the docs for them. #1778
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Building from HEAD on an Apple M series laptop, I have two problems:
First, I have a set of undeclared identifiers:
First issue
which is caused by this conditional include here.
OpenCL/opencl.h
isn't available in our downloaded dependencies. Apple, in all its intelligence resolves this to some xcode SDK version of opencl, given the chance, which is incompatible with the version we're using.The
Homebrew
distribution ofocl-headers
gets around this by adding a symlinkOpenCL -> CL
, which I duplicate in our CMake on this patch.Second, I have the following set of undefined symbols:
Second issue
This makes sense, because the version of OpenCL that ships with Macs is 1.2, because Apple have decided to deprecate the use of OpenCL in favour of their Metal / Metal Shaders products :)
We can fix this, by linking against a (built from source) newer version of the OpenCL library. Hence, I've updated the docs to suggest doing this in the case that you're using a Mac.