Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building mac after new headers : Since Mac still does not have 2.0. #4

Merged
merged 1 commit into from
Apr 15, 2016
Merged

Building mac after new headers : Since Mac still does not have 2.0. #4

merged 1 commit into from
Apr 15, 2016

Conversation

ashishnegi
Copy link
Contributor

@ashishnegi ashishnegi commented Apr 15, 2016

Building mac after new headers : Since Mac still does not have 2.0 headers, JOCL compilation fails with 1.x headers of Mac. Removing references to system headers.

@ashishnegi ashishnegi changed the title Building mac after new headers : Since Mac still does not have 2.0 he… Building mac after new headers : Since Mac still does not have 2.0. Apr 15, 2016
@gpu
Copy link
Owner

gpu commented Apr 15, 2016

The AvailabilityMacros.h are Apple-specific again (they are not contained in the Khronos OpenCL registry. A websearch reveals http://opensource.apple.com//source/CarbonHeaders/CarbonHeaders-18.1/AvailabilityMacros.h , but I'm not sure whether this should be included in the headers directory as well....).

Are they required on Mac? If not, the #include <AvailabilityMacros.h> in cl_ext.h could probably be omitted. If they are required, something like

#include <CL/cl.h>
#ifdef __APPLE__
    #include <AvailabilityMacros.h>
-#endif

would be necessary.

…aders, JOCL compilation fails with 1.x headers of Mac. Removing references to system headers.

#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED CL_EXTENSION_WEAK_LINK
#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am also not sure about the right values of the macros here.

@ashishnegi
Copy link
Contributor Author

ashishnegi commented Apr 15, 2016

Regarding AvailabilityMacros.h : Since this file is already included in CL/cl.h we do not need the include here.. Removed it from the file.

@gpu gpu merged commit 9ccd923 into gpu:master Apr 15, 2016
@gpu
Copy link
Owner

gpu commented Apr 15, 2016

As far as I could test it (on Windows) it worked. Hopefully, it will also work on all relevant versions of MacOS.

Regarding the macro values ... (frankly, whatever AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 means, things seem to be messed up there a bit....) ... I can not say whether they are right or wrong. Maybe I can dig through some of the headers during the weekend, but since it should not be necessary to modify the headers at all, and I can not figure out why it did not compile with the original ones (except for the CL vs. OpenCL path issue), I'm not sure what conclusions I could draw from that...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants