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

Clpeak build failure observed : Could not find a package configuration file provided by "OpenCLHeaders" #86

Closed
aditikau opened this issue Feb 2, 2022 · 3 comments · Fixed by #87

Comments

@aditikau
Copy link

aditikau commented Feb 2, 2022

Steps followed :

git clone https://github.com/krrishnarraj/clpeak
  cd clpeak
  git submodule update --init --recursive --remote
  mkdir build;cd build
  cmake ..
  cmake --build .

Cmake Error Trace :

cmake ..
-- Setting build type to Release
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

  project(ProjectName)
  near the top of the file, but after cmake_minimum_required().
  CMake is pretending there is a "project(Project)" command on the first
  line.

This warning is for project developers.  Use -Wno-dev to suppress it.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xx/clpeak/build/clhpp/build
[ 12%] Performing update step for 'hpp_headers'
Current branch master is up to date.
[ 25%] Performing configure step for 'hpp_headers'
CMake Error at CMakeLists.txt:43 (find_package):

  By not providing "FindOpenCLHeaders.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "OpenCLHeaders", but CMake did not find one.
  Could not find a package configuration file provided by "OpenCLHeaders"
  with any of the following names:

    OpenCLHeadersConfig.cmake
    openclheaders-config.cmake

 
  Add the installation prefix of "OpenCLHeaders" to CMAKE_PREFIX_PATH or set
  "OpenCLHeaders_DIR" to a directory containing one of the above files.  If
  "OpenCLHeaders" provides a separate development package or SDK, be sure it
  has been installed.

-- Configuring incomplete, errors occurred!
See also "/home/xx/clpeak/build/clhpp/build/hpp/src/hpp_headers-build/CMakeFiles/CMakeOutput.log".
make[2]: *** [CMakeFiles/hpp_headers.dir/build.make:107: hpp/src/hpp_headers-stamp/hpp_headers-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/hpp_headers.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
-- Selected OpenCL includes from /usr/include;/home/xx/clpeak/build/clhpp_install/include
-- Selected OpenCL lib /usr/lib/x86_64-linux-gnu/libOpenCL.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xx/clpeak/build
@aditikau
Copy link
Author

aditikau commented Feb 4, 2022

In the /usr/include dir CL/cl.hpp is present instead of CL/opencl.hpp

Recent commit in hpp_header build https://github.com/krrishnarraj/clpeak (clpeak/cmake/BuildCLHpp.cmake) is cl.hpp is changed to opencl.hpp.

If reverted that commit(db42d30) from clpeak dir and it worked.

git clone https://github.com/krrishnarraj/clpeak
cd clpeak
git submodule update --init --recursive --remote
git revert db42d30028bace27cda3c7d95f122a5c14743246 #this commit is related to cl.hpp to opencl.hpp change
rm -rf build; mkdir build; cd build
cmake ..
cmake --build .

@krrishnarraj
Copy link
Owner

There is a potential fix based on comments in KhronosGroup/OpenCL-CLHPP#173
Check if the current dev branch is working for you. It will be merged to master after further testing

@dilippuri
Copy link

Thanks! @krrishnarraj, dev branch is working fine.

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 a pull request may close this issue.

3 participants