openAVproductions / openAV-ArtyFX

A repository for the ArtyFX plugin bundle
GNU General Public License v2.0
81 stars 19 forks source link

Compilation error using typedef-name 'LV2UI_Descriptor' after 'struct' as well as invalid conversion from 'void* #43

Closed simonvanderveldt closed 4 years ago

simonvanderveldt commented 4 years ago

Hi Harry,

Commit 8c542627d936a01b1d97825e7f26a8e95633f7aa introduced the following compilation errors for me:

/var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/ui/lv2_ui.cxx:36:53: error: using typedef-name 'LV2UI_Descriptor' after 'struct'

   36 | static LV2UI_Handle artyfx_instantiate(const struct LV2UI_Descriptor * descriptor,

      |                                                     ^~~~~~~~~~~~~~~~

In file included from /var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/avtk/avtk/../avtk/ui.hxx:20,

                 from /var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/avtk/avtk/../avtk/avtk.hxx:9,

                 from /var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/ui/lv2_ui.cxx:2:

/usr/lib64/lv2/ui.lv2/ui.h:217:3: note: 'LV2UI_Descriptor' has a previous declaration here

  217 | } LV2UI_Descriptor;

      |   ^~~~~~~~~~~~~~~~

/var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/ui/lv2_ui.cxx:139:3: error: invalid conversion from 'void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} to 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} [-fpermissive]

  139 |   artyfx_instantiate,

      |   ^~~~~~~~~~~~~~~~~~

      |   |

      |   void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*) {aka void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)}

/var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/ui/lv2_ui.cxx:146:3: error: invalid conversion from 'void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} to 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} [-fpermissive]

  146 |   artyfx_instantiate,

      |   ^~~~~~~~~~~~~~~~~~

      |   |

      |   void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*) {aka void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)}

/var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/ui/lv2_ui.cxx:153:3: error: invalid conversion from 'void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} to 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} [-fpermissive]

  153 |   artyfx_instantiate,

      |   ^~~~~~~~~~~~~~~~~~

      |   |

      |   void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*) {aka void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)}

/var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/ui/lv2_ui.cxx:160:3: error: invalid conversion from 'void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} to 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} [-fpermissive]

  160 |   artyfx_instantiate,

      |   ^~~~~~~~~~~~~~~~~~

      |   |

      |   void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*) {aka void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)}

/var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/ui/lv2_ui.cxx:167:3: error: invalid conversion from 'void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} to 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} [-fpermissive]

  167 |   artyfx_instantiate,

      |   ^~~~~~~~~~~~~~~~~~

      |   |

      |   void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*) {aka void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)}

/var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/ui/lv2_ui.cxx:174:3: error: invalid conversion from 'void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} to 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} [-fpermissive]

  174 |   artyfx_instantiate,

      |   ^~~~~~~~~~~~~~~~~~

      |   |

      |   void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*) {aka void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)}

/var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/ui/lv2_ui.cxx:181:3: error: invalid conversion from 'void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} to 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} [-fpermissive]

  181 |   artyfx_instantiate,

      |   ^~~~~~~~~~~~~~~~~~

      |   |

      |   void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*) {aka void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)}

/var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/ui/lv2_ui.cxx:188:3: error: invalid conversion from 'void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} to 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} [-fpermissive]

  188 |   artyfx_instantiate,

      |   ^~~~~~~~~~~~~~~~~~

      |   |

      |   void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*) {aka void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)}

/var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/ui/lv2_ui.cxx:195:3: error: invalid conversion from 'void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} to 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} [-fpermissive]

  195 |   artyfx_instantiate,

      |   ^~~~~~~~~~~~~~~~~~

      |   |

      |   void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*) {aka void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)}

/var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/ui/lv2_ui.cxx:202:3: error: invalid conversion from 'void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} to 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} [-fpermissive]

  202 |   artyfx_instantiate,

      |   ^~~~~~~~~~~~~~~~~~

      |   |

      |   void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*) {aka void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)}

/var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/ui/lv2_ui.cxx:209:3: error: invalid conversion from 'void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} to 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} [-fpermissive]

  209 |   artyfx_instantiate,

      |   ^~~~~~~~~~~~~~~~~~

      |   |

      |   void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*) {aka void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)}

/var/tmp/portage/media-plugins/artyfx-9999/work/artyfx-9999/src/ui/lv2_ui.cxx:216:3: error: invalid conversion from 'void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} to 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*)' {aka 'void* (*)(const _LV2UI_Descriptor*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)'} [-fpermissive]

  216 |   artyfx_instantiate,

      |   ^~~~~~~~~~~~~~~~~~

      |   |

      |   void* (*)(const int*, const char*, const char*, LV2UI_Write_Function, LV2UI_Controller, void**, const LV2_Feature* const*) {aka void* (*)(const int*, const char*, const char*, void (*)(void*, unsigned int, unsigned int, unsigned int, const void*), void*, void**, const _LV2_Feature* const*)}

make[2]: *** [CMakeFiles/artyfx_ui.dir/build.make:297: CMakeFiles/artyfx_ui.dir/src/ui/lv2_ui.cxx.o] Error 1

Is ArtyFX only compatible with lv2 1.18.0 after this change? There is no version check in the build script. I'm on 1.16 at the moment.

harryhaaren commented 4 years ago

Thanks @simonvanderveldt - somehow my (meson) local build didn't catch this, and the PR wasn't flagged either. Fixed now.