canorus icon indicating copy to clipboard operation
canorus copied to clipboard

call of overloaded rb_define_virtual_variable is ambiguous

Open majioa opened this issue 3 years ago • 2 comments

Hello I've got the many following errors during compilation ruby module:

cd /usr/src/RPM/BUILD/canorus-0.7.3.git45e82ec/x86_64-alt-linux/src && /usr/bin/c++ -DCANORUS_VERSION=\"0.8.0rc1\" -DCanorusRuby_EXPORTS -DDEFAULT_DATA_DIR=\"/usr/share/canorus\" -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DUSE_RUBY -DUSE_SWIG -D__LINUX_ALSA__ -I/usr/src/RPM/BUILD/canorus-0.7.3.git45e82ec/src -I/usr/src/RPM/BUILD/canorus-0.7.3.git45e82ec/src/zlib -I/usr/src/RPM/BUILD/canorus-0.7.3.git45e82ec/src/core -I/usr/src/RPM/BUILD/canorus-0.7.3.git45e82ec/src/ui -I/usr/src/RPM/BUILD/canorus-0.7.3.git45e82ec/src/widgets -I/usr/src/RPM/BUILD/canorus-0.7.3.git45e82ec/src/import -I/usr/src/RPM/BUILD/canorus-0.7.3.git45e82ec/x86_64-alt-linux/src -I/usr/include/x86_64-linux -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/share/qt5/../../lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtPrintSupport -pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -Wno-error=deprecated-declarations -Wno-error=return-type -Wno-error -O2 -Wno-error=deprecated-declarations -Wno-error=return-type -Wno-deprecated-declarations -Wno-return-type -Wno-unused-variable -Wno-error -fPIC -DSWIGCPP -Wno-error=deprecated-declarations -Wno-return-type -fPIC -std=gnu++14 -MD -MT src/CMakeFiles/CanorusRuby.dir/canorusrubyRUBY_wrap.cxx.o -MF CMakeFiles/CanorusRuby.dir/canorusrubyRUBY_wrap.cxx.o.d -o CMakeFiles/CanorusRuby.dir/canorusrubyRUBY_wrap.cxx.o -c /usr/src/RPM/BUILD/canorus-0.7.3.git45e82ec/x86_64-alt-linux/src/canorusrubyRUBY_wrap.cxx
/usr/src/RPM/BUILD/canorus-0.7.3.git45e82ec/x86_64-alt-linux/src/canorusrubyRUBY_wrap.cxx: In function 'void SWIG_RubyInitializeTrackings()':
/usr/src/RPM/BUILD/canorus-0.7.3.git45e82ec/x86_64-alt-linux/src/canorusrubyRUBY_wrap.cxx:1263:29: error: call of overloaded 'rb_define_virtual_variable(const char [21], VALUE (&)(...), NULL)' is ambiguous
 1263 |   rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", swig_ruby_trackings_count, NULL);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/ruby/ruby.h:2863,
                 from /usr/include/ruby.h:33,
                 from /usr/src/RPM/BUILD/canorus-0.7.3.git45e82ec/x86_64-alt-linux/src/canorusrubyRUBY_wrap.cxx:879:
/usr/include/ruby/backward/cxxanyargs.hpp:59:1: note: candidate: 'void ruby::backward::cxxanyargs::rb_define_virtual_variable(const char*, VALUE (*)(...), void (*)(...))'
   59 | rb_define_virtual_variable(const char *q, type *w, void_type *e)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ruby/backward/cxxanyargs.hpp:90:1: note: candidate: 'void ruby::backward::cxxanyargs::rb_define_virtual_variable(const char*, VALUE (*)(...), void (*)(VALUE, ID, VALUE*))'
   90 | rb_define_virtual_variable(const char *q, type *w, rb_gvar_setter_t *e)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [src/CMakeFiles/CanorusRuby.dir/build.make:136: src/CMakeFiles/CanorusRuby.dir/canorusrubyRUBY_wrap.cxx.o] Error 1
gmake[2]: Leaving directory '/usr/src/RPM/BUILD/canorus-0.7.3.git45e82ec/x86_64-alt-linux'
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: Entering directory '/usr/src/RPM/BUILD/canorus-0.7.3.git45e82ec/x86_64-alt-linux'

It seems that some erroneous code for function rb_define_virtual_variable is used. So, how it can be fixed?

majioa avatar Oct 12 '21 17:10 majioa