我使用ROS Indigo和Arch Linux ARM,我试图从AUR安装 ros-indigo-qt-gui-cpp 软件包。
然后弹出以下错误:
[ 85%] Compiling generated code for qt_gui_cpp_sip Python bindings... /home/hiago/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/build/sip/qt_gui_cpp_sip/siplibqt_gui_cpp_sipqt_gui_cppRosPluginlibPluginProvider_ForPlugins.cpp: In member function ‘void sipqt_gui_cpp_RosPluginlibPluginProvider_ForPlugins::disconnectNotify(const char*)’: /home/hiago/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/build/sip/qt_gui_cpp_sip/siplibqt_gui_cpp_sipqt_gui_cppRosPluginlibPluginProvider_ForPlugins.cpp:183:79: error: no matching function for call to ‘sipqt_gui_cpp_RosPluginlibPluginProvider_ForPlugins::disconnectNotify(const char*&)’ qt_gui_cpp::RosPluginlibPluginProvider_ForPlugins::disconnectNotify(a0); ^ In file included from /usr/include/qt/QtCore/qthread.h:43:0, from /usr/include/qt/QtCore/QThread:1, from sipAPIlibqt_gui_cpp_sip.h:14, from siplibqt_gui_cpp_sipqt_gui_cppRosPluginlibPluginProvider_ForPlugins.cpp:7: /usr/include/qt/QtCore/qobject.h:436:18: note: candidate: virtual void QObject::disconnectNotify(const QMetaMethod&) virtual void disconnectNotify(const QMetaMethod &signal); ^~~~~~~~~~~~~~~~ /usr/include/qt/QtCore/qobject.h:436:18: note: no known conversion for argument 1 from ‘const char*’ to ‘const QMetaMethod&’ /home/hiago/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/build/sip/qt_gui_cpp_sip/siplibqt_gui_cpp_sipqt_gui_cppRosPluginlibPluginProvider_ForPlugins.cpp: In member function ‘void sipqt_gui_cpp_RosPluginlibPluginProvider_ForPlugins::connectNotify(const char*)’: /home/hiago/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/build/sip/qt_gui_cpp_sip/siplibqt_gui_cpp_sipqt_gui_cppRosPluginlibPluginProvider_ForPlugins.cpp:201:76: error: no matching function for call to ‘sipqt_gui_cpp_RosPluginlibPluginProvider_ForPlugins::connectNotify(const char*&)’ qt_gui_cpp::RosPluginlibPluginProvider_ForPlugins::connectNotify(a0); ^ In file included from /usr/include/qt/QtCore/qthread.h:43:0, from /usr/include/qt/QtCore/QThread:1, from sipAPIlibqt_gui_cpp_sip.h:14, from siplibqt_gui_cpp_sipqt_gui_cppRosPluginlibPluginProvider_ForPlugins.cpp:7: /usr/include/qt/QtCore/qobject.h:435:18: note: candidate: virtual void QObject::connectNotify(const QMetaMethod&) virtual void connectNotify(const QMetaMethod &signal); ^~~~~~~~~~~~~ /usr/include/qt/QtCore/qobject.h:435:18: note: no known conversion for argument 1 from ‘const char*’ to ‘const QMetaMethod&’ /home/hiago/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/build/sip/qt_gui_cpp_sip/siplibqt_gui_cpp_sipqt_gui_cppRosPluginlibPluginProvider_ForPlugins.cpp: In member function ‘void sipqt_gui_cpp_RosPluginlibPluginProvider_ForPlugins::sipProtectVirt_connectNotify(bool, const char*)’: /home/hiago/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/build/sip/qt_gui_cpp_sip/siplibqt_gui_cpp_sipqt_gui_cppRosPluginlibPluginProvider_ForPlugins.cpp:432:47: error: no matching function for call to ‘sipqt_gui_cpp_RosPluginlibPluginProvider_ForPlugins::connectNotify(const char*&)’ (sipSelfWasArg ? QObject::connectNotify(a0) : connectNotify(a0)); ^ In file included from /usr/include/qt/QtCore/qthread.h:43:0, from /usr/include/qt/QtCore/QThread:1, from sipAPIlibqt_gui_cpp_sip.h:14, from siplibqt_gui_cpp_sipqt_gui_cppRosPluginlibPluginProvider_ForPlugins.cpp:7: /usr/include/qt/QtCore/qobject.h:435:18: note: candidate: virtual void QObject::connectNotify(const QMetaMethod&) virtual void connectNotify(const QMetaMethod &signal); ^~~~~~~~~~~~~ /usr/include/qt/QtCore/qobject.h:435:18: note: no known conversion for argument 1 from ‘const char*’ to ‘const QMetaMethod&’ /home/hiago/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/build/sip/qt_gui_cpp_sip/siplibqt_gui_cpp_sipqt_gui_cppRosPluginlibPluginProvider_ForPlugins.cpp: In member function ‘void sipqt_gui_cpp_RosPluginlibPluginProvider_ForPlugins::sipProtectVirt_disconnectNotify(bool, const char*)’: /home/hiago/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/build/sip/qt_gui_cpp_sip/siplibqt_gui_cpp_sipqt_gui_cppRosPluginlibPluginProvider_ForPlugins.cpp:437:50: error: no matching function for call to ‘sipqt_gui_cpp_RosPluginlibPluginProvider_ForPlugins::disconnectNotify(const char*&)’ (sipSelfWasArg ? QObject::disconnectNotify(a0) : disconnectNotify(a0)); ^ In file included from /usr/include/qt/QtCore/qthread.h:43:0, from /usr/include/qt/QtCore/QThread:1, from sipAPIlibqt_gui_cpp_sip.h:14, from siplibqt_gui_cpp_sipqt_gui_cppRosPluginlibPluginProvider_ForPlugins.cpp:7: /usr/include/qt/QtCore/qobject.h:436:18: note: candidate: virtual void QObject::disconnectNotify(const QMetaMethod&) virtual void disconnectNotify(const QMetaMethod &signal); ^~~~~~~~~~~~~~~~ /usr/include/qt/QtCore/qobject.h:436:18: note: no known conversion for argument 1 from ‘const char*’ to ‘const QMetaMethod&’ make[3]: *** [Makefile:18: siplibqt_gui_cpp_sipqt_gui_cppRosPluginlibPluginProvider_ForPlugins.o] Error 1 make[2]: *** [src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_sip.dir/build.make:61: devel/lib/python2.7/site-packages/qt_gui_cpp/libqt_gui_cpp_sip.so] Error 2 make[1]: *** [CMakeFiles/Makefile2:375: src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_sip.dir/all] Error 2 make: *** [Makefile:128: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting...
我在过去的4个小时里一直在谷歌搜索,并没有得到解决方案,甚至没有线索。我发现可能与这个错误有关并没有太多帮助。
我已经浏览了 qobject.h 文件,旨在解决问题,但没有成功(我是C ++的新手,所以我做得最好......)
我非常需要帮助。
如果我没有提供足够的信息,请告诉我,然后我将提供帮助解决此问题所需的任何其他信息或代码。
提前致谢。
答案 0 :(得分:1)
包(所有ROS Indigo包)都期望Qt4。似乎sip-dev生成的代码确实用于Qt4(其中使用了connectNotify(const char * signal)
),但是您正在为Qt5编译它(其中函数被connectNotify(const QMetaMethod & signal)
替换) - 因此出现错误消息。 / p>
一种解决方案可能是简单地删除Qt5 /降级到Qt4。或者,请参阅https://wiki.archlinux.org/index.php/Qt,了解如何选择默认的Qt版本。