OCL-dev / ocl-icd

OpenCL ICD Loader (free software)
BSD 2-Clause "Simplified" License
76 stars 23 forks source link

compilation errors under GCC 11 #17

Closed Miezhiko closed 3 years ago

Miezhiko commented 3 years ago
In file included from run_dummy_icd_gen.c:45:
/usr/include/CL/cl_gl_ext.h:18:9: note: ‘#pragma message: All OpenGL-related extensions have been moved into cl_gl.h.  Please include cl_gl.h directly.’
   18 | #pragma message("All OpenGL-related extensions have been moved into cl_gl.h.  Please include cl_gl.h directly.")
      |         ^~~~~~~
run_dummy_icd_gen.c: In function ‘clCreateSubDevicesEXT’:
run_dummy_icd_gen.c:544:51: error: expected declaration specifiers before ‘CL_EXT_SUFFIX__VERSION_1_1’
  544 |                       cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;;
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
run_dummy_icd_gen.c:544:78: error: expected declaration specifiers before ‘;’ token
  544 |                       cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;;
      |                                                                              ^
run_dummy_icd_gen.c:546:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘CL_EXT_SUFFIX__VERSION_1_1’
  546 | clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;;
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~
run_dummy_icd_gen.c:546:73: error: expected declaration specifiers before ‘;’ token
  546 | clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;;
      |                                                                         ^
run_dummy_icd_gen.c:548:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘CL_EXT_SUFFIX__VERSION_1_1’
  548 | clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;;
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
run_dummy_icd_gen.c:548:74: error: expected declaration specifiers before ‘;’ token
  548 | clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;;
      |                                                                          ^
run_dummy_icd_gen.c:552:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘CL_EXT_SUFFIX__VERSION_1_1’
  552 |                            cl_int *             /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1;;
      |                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
run_dummy_icd_gen.c:552:95: error: expected declaration specifiers before ‘;’ token
  552 |                            cl_int *             /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1;;
      |                                                                                               ^
run_dummy_icd_gen.c:558:107: error: expected declaration specifiers before ‘;’ token
  558 |                    cl_uint *                            /* num_devices_ret */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                                                           ^
run_dummy_icd_gen.c:560:70: error: expected declaration specifiers before ‘;’ token
  560 | clRetainDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                      ^
run_dummy_icd_gen.c:562:71: error: expected declaration specifiers before ‘;’ token
  562 | clReleaseDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                       ^
run_dummy_icd_gen.c:569:85: error: expected declaration specifiers before ‘;’ token
  569 |               cl_int *                /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                                     ^
run_dummy_icd_gen.c:575:103: error: expected declaration specifiers before ‘;’ token
  575 |                                   cl_int *              /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                                                       ^
run_dummy_icd_gen.c:585:83: error: expected declaration specifiers before ‘;’ token
  585 |                  void *               /* user_data */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                                   ^
run_dummy_icd_gen.c:595:83: error: expected declaration specifiers before ‘;’ token
  595 |               cl_int *             /* errcode_ret */ ) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                                   ^
run_dummy_icd_gen.c:597:84: error: expected declaration specifiers before ‘;’ token
  597 | clUnloadPlatformCompiler(cl_platform_id /* platform */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                                    ^
run_dummy_icd_gen.c:604:91: error: expected declaration specifiers before ‘;’ token
  604 |                    size_t *        /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                                           ^
run_dummy_icd_gen.c:614:80: error: expected declaration specifiers before ‘;’ token
  614 |                     cl_event *         /* event */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                                ^
run_dummy_icd_gen.c:623:79: error: expected declaration specifiers before ‘;’ token
  623 |                    cl_event *         /* event */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                               ^
run_dummy_icd_gen.c:631:91: error: expected declaration specifiers before ‘;’ token
  631 |                            cl_event *             /* event */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                                           ^
run_dummy_icd_gen.c:636:87: error: expected declaration specifiers before ‘;’ token
  636 |                             cl_event *        /* event */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                                       ^
run_dummy_icd_gen.c:641:88: error: expected declaration specifiers before ‘;’ token
  641 |                              cl_event *        /* event */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                                        ^
run_dummy_icd_gen.c:644:101: error: expected declaration specifiers before ‘;’ token
  644 |                                          const char *   /* func_name */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                                                     ^
run_dummy_icd_gen.c:651:85: error: expected declaration specifiers before ‘;’ token
  651 |                       cl_int *        /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;;
      |                                                                                     ^
run_dummy_icd_gen.c:658:99: error: expected declaration specifiers before ‘;’ token
  658 |                         cl_int *                    /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;;
      |                                                                                                   ^
run_dummy_icd_gen.c:665:88: error: expected declaration specifiers before ‘;’ token
  665 |                               cl_event *       /* event */) CL_API_SUFFIX__VERSION_1_0;;
      |                                                                                        ^
run_dummy_icd_gen.c:672:88: error: expected declaration specifiers before ‘;’ token
  672 |                               cl_event *       /* event */) CL_API_SUFFIX__VERSION_1_0;;
      |                                                                                        ^
run_dummy_icd_gen.c:677:91: error: expected declaration specifiers before ‘;’ token
  677 |                             cl_int *        /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;;
      |                                                                                           ^
run_dummy_icd_gen.c:682:107: error: expected declaration specifiers before ‘;’ token
  682 |                                    cl_int *                 /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;;
      |                                                                                                           ^
run_dummy_icd_gen.c:689:87: error: expected declaration specifiers before ‘;’ token
  689 |              cl_int *                   /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;;
      |                                                                                       ^
run_dummy_icd_gen.c:695:87: error: expected declaration specifiers before ‘;’ token
  695 |               size_t *         /* param_value_size_ret */) CL_API_SUFFIX__VERSION_2_0;;
      |                                                                                       ^
run_dummy_icd_gen.c:700:73: error: expected declaration specifiers before ‘;’ token
  700 |            cl_uint          /* alignment */) CL_API_SUFFIX__VERSION_2_0;;
      |                                                                         ^
run_dummy_icd_gen.c:703:75: error: expected declaration specifiers before ‘;’ token
  703 |           void *            /* svm_pointer */) CL_API_SUFFIX__VERSION_2_0;;
      |                                                                           ^
run_dummy_icd_gen.c:715:76: error: expected declaration specifiers before ‘;’ token
  715 |                  cl_event *        /* event */) CL_API_SUFFIX__VERSION_2_0;;
      |                                                                            ^
run_dummy_icd_gen.c:724:78: error: expected declaration specifiers before ‘;’ token
  724 |                    cl_event *        /* event */) CL_API_SUFFIX__VERSION_2_0;;
      |                                                                              ^
run_dummy_icd_gen.c:733:79: error: expected declaration specifiers before ‘;’ token
  733 |                     cl_event *        /* event */) CL_API_SUFFIX__VERSION_2_0;;
      |                                                                               ^
run_dummy_icd_gen.c:742:75: error: expected declaration specifiers before ‘;’ token
  742 |                 cl_event *        /* event */) CL_API_SUFFIX__VERSION_2_0;;
      |                                                                           ^
run_dummy_icd_gen.c:748:77: error: expected declaration specifiers before ‘;’ token
  748 |                   cl_event *        /* event */) CL_API_SUFFIX__VERSION_2_0;;
      |                                                                             ^
run_dummy_icd_gen.c:752:108: error: expected declaration specifiers before ‘;’ token
  752 |                               cl_int *                       /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;;
      |                                                                                                            ^
run_dummy_icd_gen.c:756:83: error: expected declaration specifiers before ‘;’ token
  756 |                          const void * /* arg_value */) CL_API_SUFFIX__VERSION_2_0;;
      |                                                                                   ^
run_dummy_icd_gen.c:761:88: error: expected declaration specifiers before ‘;’ token
  761 |                     const void *         /* param_value */) CL_API_SUFFIX__VERSION_2_0;;
      |                                                                                        ^
run_dummy_icd_gen.c:770:63: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘CL_EXT_SUFFIX__VERSION_2_0’
  770 |                            size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0;;
      |                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
run_dummy_icd_gen.c:770:90: error: expected declaration specifiers before ‘;’ token
  770 |                            size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0;;
      |                                                                                          ^
run_dummy_icd_gen.c:773:75: error: expected declaration specifiers before ‘;’ token
  773 |               cl_int*       /* errcode_ret */) CL_API_SUFFIX__VERSION_2_1;;
      |                                                                           ^
run_dummy_icd_gen.c:778:84: error: expected declaration specifiers before ‘;’ token
  778 |                       cl_int*        /* errcode_ret */) CL_API_SUFFIX__VERSION_2_1;;
      |                                                                                    ^
run_dummy_icd_gen.c:787:89: error: expected declaration specifiers before ‘;’ token
  787 |                        cl_event *               /* event */) CL_API_SUFFIX__VERSION_2_1;;
      |                                                                                         ^
run_dummy_icd_gen.c:791:90: error: expected declaration specifiers before ‘;’ token
  791 |                         cl_ulong*       /* host_timestamp */) CL_API_SUFFIX__VERSION_2_1;;
      |                                                                                          ^
run_dummy_icd_gen.c:794:79: error: expected declaration specifiers before ‘;’ token
  794 |                cl_ulong *   /* host_timestamp */)  CL_API_SUFFIX__VERSION_2_1;;
      |                                                                               ^
run_dummy_icd_gen.c:803:109: error: expected declaration specifiers before ‘;’ token
  803 |                         size_t*                     /* param_value_size_ret */ ) CL_API_SUFFIX__VERSION_2_1;;
      |                                                                                                             ^
run_dummy_icd_gen.c:807:101: error: expected declaration specifiers before ‘;’ token
  807 |                                cl_command_queue     /* command_queue */) CL_API_SUFFIX__VERSION_2_1;;
      |                                                                                                     ^
run_dummy_icd_gen.c:811:93: error: expected declaration specifiers before ‘;’ token
  811 |                             void *              /* user_data */) CL_API_SUFFIX__VERSION_2_2;;
      |                                                                                             ^
run_dummy_icd_gen.c:816:93: error: expected declaration specifiers before ‘;’ token
  816 |                                    const void* /* spec_value */) CL_API_SUFFIX__VERSION_2_2;;
      |                                                                                             ^
run_dummy_icd_gen.c:823:102: error: expected declaration specifiers before ‘;’ token
  823 |                              cl_int *                  /* errcode_ret */) CL_API_SUFFIX__VERSION_3_0;;
      |                                                                                                      ^
run_dummy_icd_gen.c:831:101: error: expected declaration specifiers before ‘;’ token
  831 |                             cl_int *                  /* errcode_ret */) CL_API_SUFFIX__VERSION_3_0;;
      |                                                                                                     ^
run_dummy_icd_gen.c:835:96: error: expected declaration specifiers before ‘;’ token
  835 |                                void *              /* user_data */) CL_API_SUFFIX__VERSION_3_0;;
      |                                                                                                ^
run_dummy_icd_gen.c:838:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
  838 | void call_all_OpenCL_functions(cl_platform_id chosen_platform) {
      |                                                                ^
In file included from /usr/include/CL/opencl.h:26,
                 from run_dummy_icd_gen.c:40:
/usr/include/CL/cl_ext.h:284:1: error: old-style parameter declarations in prototyped function definition
  284 | clCreateSubDevicesEXT(cl_device_id   in_device,
      | ^~~~~~~~~~~~~~~~~~~~~
Kerilk commented 3 years ago

Thanks for reporting this issue. The tip of master should fix it, could you try it?

Miezhiko commented 3 years ago

Thanks for reporting this issue. The tip of master should fix it, could you try it?

I will try today

Miezhiko commented 3 years ago

Works fine from master! Waiting for a new release ^_^