[QGIS-Developer] unable to build MacOS master (OpenCL)

Alessandro Pasotti apasotti at gmail.com
Mon Dec 3 00:18:53 PST 2018


Hi Peter,

the only change that come up to my mind is that we are now supporting also
opencl versions > 1.1,
can you please check what is the opencl version implemented on mac?

It might be necessary to add a ifdef for mac to set


#define CL_HPP_MINIMUM_OPENCL_VERSION 110
#define CL_HPP_TARGET_OPENCL_VERSION 110
#define CL_TARGET_OPENCL_VERSION 110

as it was before the changes.



On Mon, Dec 3, 2018 at 9:02 AM Peter Petrik <
peter.petrik at lutraconsulting.co.uk> wrote:

> Hi,
>
> I am unable to build QGIS master after Friday's changes in opencl header.
> Any idea if I can still use official MACOS CL headers or how to proceed?
>
> Thanks.
> Peter
>
> [ 19%] Building CXX object
> src/core/CMakeFiles/qgis_core.dir/geometry/qgsabstractgeometry.cpp.o
>
> In file included from
> /Users/peter/Projects/qgis1/QGIS/src/core/raster/qgshillshaderenderer.cpp:33:
>
> In file included from
> /Users/peter/Projects/qgis1/QGIS/src/core/qgsopenclutils.h:25:
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier 'CL_DEVICE_QUEUE_ON_HOST_PROPERTIES'
>
> CL_HPP_PARAM_NAME_INFO_2_0_(CL_HPP_DECLARE_PARAM_TRAITS_)
>
> ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1277:23:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_device_info, CL_DEVICE_QUEUE_ON_HOST_PROPERTIES,
> cl_command_queue_properties) \
>
>                       ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier 'CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1278:23:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_device_info, CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES,
> cl_command_queue_properties) \
>
>                       ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier
> 'CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1279:23:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_device_info, CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE, cl_uint) \
>
>                       ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier 'CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1280:23:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_device_info, CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE, cl_uint) \
>
>                       ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier 'CL_DEVICE_MAX_ON_DEVICE_QUEUES'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1281:23:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_device_info, CL_DEVICE_MAX_ON_DEVICE_QUEUES, cl_uint) \
>
>                       ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier 'CL_DEVICE_MAX_ON_DEVICE_EVENTS'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1282:23:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_device_info, CL_DEVICE_MAX_ON_DEVICE_EVENTS, cl_uint) \
>
>                       ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier 'CL_DEVICE_MAX_PIPE_ARGS'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1283:23:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_device_info, CL_DEVICE_MAX_PIPE_ARGS, cl_uint) \
>
>                       ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier 'CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1284:23:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_device_info, CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS, cl_uint) \
>
>                       ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier 'CL_DEVICE_PIPE_MAX_PACKET_SIZE'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1285:23:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_device_info, CL_DEVICE_PIPE_MAX_PACKET_SIZE, cl_uint) \
>
>                       ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier 'CL_DEVICE_SVM_CAPABILITIES'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1286:23:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_device_info, CL_DEVICE_SVM_CAPABILITIES,
> cl_device_svm_capabilities) \
>
>                       ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier
> 'CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1287:23:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_device_info, CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT,
> cl_uint) \
>
>                       ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier
> 'CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1288:23:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_device_info, CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT,
> cl_uint) \
>
>                       ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier
> 'CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1289:23:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_device_info, CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT, cl_uint)
> \
>
>                       ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier 'CL_QUEUE_SIZE'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1290:30:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_command_queue_info, CL_QUEUE_SIZE, cl_uint) \
>
>                              ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier 'CL_MEM_USES_SVM_POINTER'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1291:20:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_mem_info, CL_MEM_USES_SVM_POINTER, cl_bool) \
>
>                    ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier
> 'CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1292:30:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_program_build_info, CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE,
> size_type) \
>
>                              ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier 'CL_PIPE_PACKET_SIZE'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1293:21:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_pipe_info, CL_PIPE_PACKET_SIZE, cl_uint) \
>
>                     ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1323:1:
> error: use of undeclared identifier 'CL_PIPE_MAX_PACKETS'
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:1294:21:
> note: expanded from macro 'CL_HPP_PARAM_NAME_INFO_2_0_'
>
>     F(cl_pipe_info, CL_PIPE_MAX_PACKETS, cl_uint)
>
>                     ^
>
> /Users/peter/Projects/qgis1/QGIS/external/opencl-clhpp/include/CL/cl2.hpp:3293:16:
> error: unknown type name 'cl_svm_mem_flags'; did you mean 'cl_mem_flags'?
>
>         static cl_svm_mem_flags getSVMMemFlags()
>
>                ^
>
> /System/Library/Frameworks/OpenCL.framework/Headers/cl.h:67:29: note:
> 'cl_mem_flags' declared here
>
> typedef cl_bitfield         cl_mem_flags;
>
>                             ^
>
> fatal error: too many errors emitted, stopping now [-ferror-limit=]
>
> 20 errors generated.
>
> make[2]: ***
> [src/core/CMakeFiles/qgis_core.dir/raster/qgshillshaderenderer.cpp.o] Error
> 1
>
> make[2]: *** Waiting for unfinished jobs....
>
> make[1]: *** [src/core/CMakeFiles/qgis_core.dir/all] Error 2
>
> make: *** [all] Error 2
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



-- 
Alessandro Pasotti
w3:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20181203/3c35a64f/attachment-0001.html>


More information about the QGIS-Developer mailing list