Coder Social home page Coder Social logo

Comments (4)

jrprice avatar jrprice commented on July 17, 2024

This looks like the submodule hasn't been initialised. You either need to pass the --recursive flag when you clone the repository, or run git submodule update --init in an existing clone.

from opencl-clhpp.

peter197321 avatar peter197321 commented on July 17, 2024

Enabled submodules but end up with issues ..

[  5%] Building CXX object examples/src/CMakeFiles/trivialCL2.dir/trivialCL2.cpp.o
In file included from /home/linaro/Downloads/OpenCL-CLHPP/examples/src/trivialCL2.cpp:6:0:
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:1288:23: error: ‘CL_DEVICE_QUEUE_ON_HOST_PROPERTIES’ was not declared in this scope
     F(cl_device_info, CL_DEVICE_QUEUE_ON_HOST_PROPERTIES, cl_command_queue_properties) \
                       ^
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:1320:36: note: in definition of macro ‘CL_HPP_DECLARE_PARAM_TRAITS_’
 struct param_traits<detail:: token,param_name>       \
                                    ^~~~~~~~~~
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:1334:1: note: in expansion of macro ‘CL_HPP_PARAM_NAME_INFO_2_0_’
 CL_HPP_PARAM_NAME_INFO_2_0_(CL_HPP_DECLARE_PARAM_TRAITS_)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:1320:46: error: template argument 2 is invalid
 struct param_traits<detail:: token,param_name>       \
                                              ^
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:1288:5: note: in expansion of macro ‘CL_HPP_DECLARE_PARAM_TRAITS_’
     F(cl_device_info, CL_DEVICE_QUEUE_ON_HOST_PROPERTIES, cl_command_queue_properties) \
     ^
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:1334:1: note: in expansion of macro ‘CL_HPP_PARAM_NAME_INFO_2_0_’
 CL_HPP_PARAM_NAME_INFO_2_0_(CL_HPP_DECLARE_PARAM_TRAITS_)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:1289:23: error: ‘CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES’ was not declared in this scope
     F(cl_device_info, CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES, cl_command_queue_properties) \
                       ^
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:1320:36: note: in definition of macro ‘CL_HPP_DECLARE_PARAM_TRAITS_’
 struct param_traits<detail:: token,param_name>       \
                                    ^~~~~~~~~~
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:1334:1: note: in expansion of macro ‘CL_HPP_PARAM_NAME_INFO_2_0_’
 CL_HPP_PARAM_NAME_INFO_2_0_(CL_HPP_DECLARE_PARAM_TRAITS_)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:1320:46: error: template argument 2 is invalid
 struct param_traits<detail:: token,param_name>       \
                                              ^
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:1289:5: note: in expansion of macro ‘CL_HPP_DECLARE_PARAM_TRAITS_’
     F(cl_device_info, CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES, cl_command_queue_properties) \
     ^
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:1334:1: note: in expansion of macro ‘CL_HPP_PARAM_NAME_INFO_2_0_’
 CL_HPP_PARAM_NAME_INFO_2_0_(CL_HPP_DECLARE_PARAM_TRAITS_)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:1290:23: error: ‘CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE’ was not declared in this scope
     F(cl_device_info, CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE, cl_uint) \



/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:3472:37: error: ‘getSVMMemFlags’ is not a member of ‘cl::SVMTraitCoarse<>’
             SVMTrait::getSVMMemFlags(),
             ~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:3470:23: error: ‘clSVMAlloc’ was not declared in this scope

             ~~~~~~~~~~^~

             ~~~~~~~~~~~~

             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

             ~~~~~~~~~~~~~~~~
             0);
             ~~
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:3485:39: error: ‘getSVMMemFlags’ is not a member of ‘cl::SVMTraitCoarse<>’
         if (!(SVMTrait::getSVMMemFlags() & CL_MEM_SVM_FINE_GRAIN_BUFFER)) {
               ~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp: In instantiation of ‘void cl::SVMAllocator<T, SVMTrait>::deallocate(cl::SVMAllocator<T, SVMTrait>::pointer, cl::SVMAllocator<T, SVMTrait>::size_type) [with T = int; SVMTrait = cl::SVMTraitCoarse<>; cl::SVMAllocator<T, SVMTrait>::pointer = int*; cl::SVMAllocator<T, SVMTrait>::value_type = int; cl::SVMAllocator<T, SVMTrait>::size_type = unsigned int]’:
/usr/include/c++/6/bits/alloc_traits.h:328:9:   required from ‘static void std::allocator_traits<_Alloc>::deallocate(_Alloc&, std::allocator_traits<_Alloc>::pointer, std::allocator_traits<_Alloc>::size_type) [with _Alloc = cl::SVMAllocator<int, cl::SVMTraitCoarse<> >; std::allocator_traits<_Alloc>::pointer = int*; std::allocator_traits<_Alloc>::size_type = unsigned int]’
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:3617:49:   required from ‘cl::pointer<T, cl::detail::Deleter<Alloc> > cl::allocate_pointer(const Alloc&, Args&& ...) [with T = int; Alloc = cl::SVMAllocator<int, cl::SVMTraitCoarse<> >; Args = {}; cl::pointer<T, cl::detail::Deleter<Alloc> > = std::unique_ptr<int, cl::detail::Deleter<cl::SVMAllocator<int, cl::SVMTraitCoarse<> > > >]’
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:3626:35:   required from ‘cl::pointer<T, cl::detail::Deleter<cl::SVMAllocator<T, SVMTrait> > > cl::allocate_svm(Args ...) [with T = int; SVMTrait = cl::SVMTraitCoarse<>; Args = {}; cl::pointer<T, cl::detail::Deleter<cl::SVMAllocator<T, SVMTrait> > > = std::unique_ptr<int, cl::detail::Deleter<cl::SVMAllocator<int, cl::SVMTraitCoarse<> > > >]’
/home/linaro/Downloads/OpenCL-CLHPP/examples/src/trivialCL2.cpp:153:65:   required from here
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:3499:18: error: ‘clSVMFree’ was not declared in this scope
         clSVMFree(context_(), p);
         ~~~~~~~~~^~~~~~~~~~~~~~~
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp: At global scope:
/home/linaro/Downloads/OpenCL-CLHPP/build/include/CL/cl2.hpp:8687:15: error: ‘cl_int cl::enqueueMapSVM(T*, cl_bool, cl_map_flags, cl::size_type, cl::vector<cl::Event>*, cl::Event*) [with T = main()::Foo; cl_int = int; cl_bool = unsigned int; cl_map_flags = long long unsigned int; cl::size_type = unsigned int; cl::vector<cl::Event> = std::vector<cl::Event, std::allocator<cl::Event> >]’, declared using local type ‘main()::Foo’, is used but never defined [-fpermissive]
 inline cl_int enqueueMapSVM(
               ^~~~~~~~~~~~~
make[2]: *** [examples/src/CMakeFiles/trivialCL2.dir/trivialCL2.cpp.o] Error 1
make[1]: *** [examples/src/CMakeFiles/trivialCL2.dir/all] Error 2
make: *** [all] Error 2

from opencl-clhpp.

jrprice avatar jrprice commented on July 17, 2024

It looks like you're missing the definitions for OpenCL 2.x features. Are you building against the latest OpenCL C headers? The latest headers are always available here:
https://github.com/KhronosGroup/OpenCL-Headers

from opencl-clhpp.

bashbaug avatar bashbaug commented on July 17, 2024

Hello! We found this issue as part of a recent issue scrub and we think this issue is no longer occurring. Please refer to the steps followed by the automated CI testing if you are still (after four years 😄) having issues building. Thanks!

from opencl-clhpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.