Skip to content

g++ appears to resolve OpenCL/cl.h header but clang does not. #868

Open
@teamiceberg

Description

The compile output of the two files on a simple boost.compute example program (compute/example/list_devices.cpp) on Mac OSX 11.5.2 is listed below:

[files also have the elapsed times of the various compiler and linker stages]

gpp_compile.txt
clang_compile.txt

As you can see the clang compiler appears to have produced a fatal error:

"In file included from /Users/shivamacpro/Desktop/EducationandProjects/boost-compute-library/compute/include/boost/compute/config.hpp:16:
/Users/shivamacpro/Desktop/EducationandProjects/boost-compute-library/compute/include/boost/compute/cl.hpp:17:10: fatal error: 'OpenCL/cl.h' file not found
#include <OpenCL/cl.h>"

The output of list_devices on my Macbook pro when successfully compiled under g++ is:

Platform 'Apple' CPU Device: Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
GPU Device: Intel(R) HD Graphics 630
GPU Device: AMD Radeon Pro 560 Compute Engine

Any idea what might be happening here? Or if this is a bug, should we work toward fixing it?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions