2016-11-14 90 views
0

我使用ROS Indigo與Arch Linux ARM,我試圖安裝包ros-indigo-qt-gui -URP來自AUR。錯誤:沒有匹配的函數調用'sipqt_gui_cpp_RosPluginlibPluginProvider_ForPlugins :: connectNotify(const char *&)'

但這時會彈出以下錯誤:

 

[ 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... 

我一直在使用Google最後4小時,還沒有得到解決,甚至也不是一個線索。所有我發現可能與這個錯誤有關,並沒有太多幫助。

我已經通過qobject.h文件旨在解決這個問題,但沒有成功了(我是C++非常新手,所以我做了我最好的...)

我強烈需要幫助。

如果我沒有提供足夠的信息,請告訴我,然後我會提供任何其他信息或代碼段來幫助解決此問題。

在此先感謝。

回答

1

這個軟件包(與所有ROS Indigo軟件包一樣)都需要Qt4。似乎由sip-dev生成的代碼確實用於Qt4(其中使用了connectNotify(const char * signal)),但是您正在編譯它用於Qt5(其中函數被替換爲connectNotify(const QMetaMethod & signal)) - 因此是錯誤消息。

一個解決方案可能是簡單地刪除Qt5 /降級到Qt4。另請參閱​​關於如何選擇默認Qt版本。

+0

P.S .:如果您對Arch的使用沒有設置(無論出於何種原因),切換到Ubuntu 14.04可能更容易,因爲這裏所有版本對於ROS Indigo來說都「恰到好處」,並且不會改變。 – dseifert

+0

我刪除了包'qt5-base'和'qt4'已安裝。然後,我沒有運行** ** Makepkg再次但現在它呈現出新的錯誤:7:0: sipAPIlibqt_gui_cpp_sip.h:13:21: '在文件從siplibqt_gui_cpp_sipqt_gui_cppRosPluginlibPluginProvider_ForPlugins.cpp包含致命錯誤:QMetaType:沒有這樣的文件或目錄 #include ^'。 –

+0

我確實設置了environmet變量'export QT_SELECT = 4'(如https://wiki.archlinux.org/index.php/Qt所示),但它並沒有消失。它似乎即使做了這些更改,構建沒有意識到它應該使用qt4而不是qt5。我不知道現在該去哪裏。 –

相關問題