python - 在 Arch Linux ARM 中编译 ros-indigo-qt-gui-cpp 时出现的问题

标签 python c++ linux qt ros

我在 Arch Linux ARM 上使用 ROS Indigo,我正在尝试从 AUR 安装包 ros-indigo-qt-gui-cpp。

但是出现如下错误:


    ==> Starting build()...
    -- Using CATKIN_DEVEL_PREFIX: /home/hiago/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/build/devel
    -- Using CMAKE_PREFIX_PATH: /opt/ros/indigo
    -- This workspace overlays: /opt/ros/indigo
    -- Found PythonInterp: /usr/bin/python2 (found version "2.7.12") 
    -- Using PYTHON_EXECUTABLE: /usr/bin/python2
    -- Using default Python package layout
    -- Using empy: /usr/lib/python2.7/site-packages/em.pyc
    -- Using CATKIN_ENABLE_TESTING: ON
    -- Skip enable_testing() when building binary package
    -- Using CATKIN_TEST_RESULTS_DIR: /home/hiago/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/build/test_results
    -- Found gtest: gtests will be built
    -- Using Python nosetests: /usr/bin/nosetests-2.7
    -- catkin 0.6.18
    CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
      Imported targets not available for Boost version 106200
    Call Stack (most recent call first):
      /usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
      /usr/share/cmake-3.6/Modules/FindBoost.cmake:1395 (_Boost_MISSING_DEPENDENCIES)
      CMakeLists.txt:5 (find_package)


    CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
      Imported targets not available for Boost version 106200
    Call Stack (most recent call first):
      /usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
      /usr/share/cmake-3.6/Modules/FindBoost.cmake:1395 (_Boost_MISSING_DEPENDENCIES)
      CMakeLists.txt:5 (find_package)


    -- Boost version: 1.62.0
    -- Found the following Boost libraries:
    --   filesystem
    --   system
    CMake Warning at /opt/ros/indigo/share/python_qt_binding/cmake/shiboken_helper.cmake:17 (find_package):
      By not providing "FindShiboken.cmake" in CMAKE_MODULE_PATH this project has
      asked CMake to find a package configuration file provided by "Shiboken",
      but CMake did not find one.

      Could not find a package configuration file provided by "Shiboken" with any
      of the following names:

        ShibokenConfig.cmake
        shiboken-config.cmake

      Add the installation prefix of "Shiboken" to CMAKE_PREFIX_PATH or set
      "Shiboken_DIR" to a directory containing one of the above files.  If
      "Shiboken" provides a separate development package or SDK, be sure it has
      been installed.
    Call Stack (most recent call first):
      src/qt_gui_cpp_shiboken/CMakeLists.txt:41 (include)


    CMake Warning at /opt/ros/indigo/share/python_qt_binding/cmake/shiboken_helper.cmake:21 (find_package):
      By not providing "FindPySide.cmake" in CMAKE_MODULE_PATH this project has
      asked CMake to find a package configuration file provided by "PySide", but
      CMake did not find one.

      Could not find a package configuration file provided by "PySide" with any
      of the following names:

        PySideConfig.cmake
        pyside-config.cmake

      Add the installation prefix of "PySide" to CMAKE_PREFIX_PATH or set
      "PySide_DIR" to a directory containing one of the above files.  If "PySide"
      provides a separate development package or SDK, be sure it has been
      installed.
    Call Stack (most recent call first):
      src/qt_gui_cpp_shiboken/CMakeLists.txt:41 (include)


    CMake Warning at /opt/ros/indigo/share/python_qt_binding/cmake/shiboken_helper.cmake:34 (find_package):
      By not providing "FindGeneratorRunner.cmake" in CMAKE_MODULE_PATH this
      project has asked CMake to find a package configuration file provided by
      "GeneratorRunner", but CMake did not find one.

      Could not find a package configuration file provided by "GeneratorRunner"
      with any of the following names:

        GeneratorRunnerConfig.cmake
        generatorrunner-config.cmake

      Add the installation prefix of "GeneratorRunner" to CMAKE_PREFIX_PATH or
      set "GeneratorRunner_DIR" to a directory containing one of the above files.
      If "GeneratorRunner" provides a separate development package or SDK, be
      sure it has been installed.
    Call Stack (most recent call first):
      src/qt_gui_cpp_shiboken/CMakeLists.txt:41 (include)


    CMake Warning at /opt/ros/indigo/share/python_qt_binding/cmake/shiboken_helper.cmake:41 (message):
      Shiboken binding generator NOT available.
    Call Stack (most recent call first):
      src/qt_gui_cpp_shiboken/CMakeLists.txt:41 (include)


    -- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.12", minimum required is "2.7") 
    -- SIP binding generator available.
    -- Python binding generators: sip
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/hiago/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/build
    [  7%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/recursive_plugin_provider.cpp.o
    [ 14%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/settings.cpp.o
    [ 21%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/__/__/include/qt_gui_cpp/moc_plugin_bridge.cxx.o
    [ 28%] Linking CXX shared library ../../devel/lib/libqt_gui_cpp.so
    [ 78%] Built target qt_gui_cpp
    Scanning dependencies of target libqt_gui_cpp_sip
    [ 85%] Running SIP generator for qt_gui_cpp_sip Python bindings...
    Traceback (most recent call last):
      File "/opt/ros/indigo/share/python_qt_binding/cmake/sip_configure.py", line 50, in 
        config = Configuration()
      File "/opt/ros/indigo/share/python_qt_binding/cmake/sip_configure.py", line 19, in __init__
        ['qmake', '-query'], env=env, universal_newlines=True)
      File "/usr/lib/python2.7/subprocess.py", line 567, in check_output
        process = Popen(stdout=PIPE, *popenargs, **kwargs)
      File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
        errread, errwrite)
      File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
        raise child_exception
    OSError: [Errno 2] No such file or directory
    make[2]: *** [src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_s`enter code here`ip.dir/build.make:90: sip/qt_gui_cpp_sip/Makefile] Error 1
    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...

有什么想法吗?

如果我没有提供足够的信息,请告诉我,以便我提供任何需要帮助解决的问题。

我不知道该去哪里

最佳答案

就像一个战士在一场艰苦而流血的 war 之后回到家,我很高兴地说我能解决它!

在安装软件包 ros-indigo-qt-gui-cpp 之前,您应该安装 qt5-base

这样,当您尝试安装它时,您可能会遇到以下问题:

Getting fatal error: QWidget: No such file or directory

#include <QWidget>

为了解决这个问题,我做了:

vim /yourpath/packages/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/qt_gui_core-release-release-indigo-qt_gui_cpp-0.2.30-0/src/qt_gui_cpp_sip/../../include/qt_gui_cpp/plugin_context.h

然后改变:

#include <QWidget>

通过:

#include <QtGui>

那么这次您可能会遇到另一个问题[1],关于正在运行的qmake 的版本。

which qmake将向您显示哪个 qmake 在您的路径中。

您必须确保您使用的是 qmake for qt4。

所以最后的改变是:

sudo mv /usr/bin/qmake /usr/bin/qmake.bk
sudo ln -s /usr/bin/qmake-qt4 /usr/bin/qmake

请注意,命令可能会根据您的环境设置而改变,例如,如果您使用的是 anaconda

(如果需要,请确保稍后恢复这些更改。)

毕竟一切都应该很好:D

他们不在这里,但也感谢 AUR 用户 :D

[1] error: no matching function for call to ‘sipqt_gui_cpp_RosPluginlibPluginProvider_ForPlugins::connectNotify(const char*&)’

关于python - 在 Arch Linux ARM 中编译 ros-indigo-qt-gui-cpp 时出现的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40593473/

相关文章:

linux - 执行系统库调用的源代码级调试的推荐方法是什么?

linux - 使 Python 文本变绿并使用旋转光标 - 新手问题

python - 用有序相关模型的第一个值注释 QuerySet

python - Django 检查复选框是否被选中

python - 使用 Python 测试非 Python 代码

java - Android JNI - 从 C++ 调用 Android UI 线程上的函数

c++ - 使用 vector 和 pthreads 的不一致计数

python - 在 Python Pandas Dataframe 中转换间隔外连接 SQL

c++ - FFMPEG API Mp4 H264 编码/复用 - 未指定的像素格式

linux - sphinxsearch 2.2.4 wordforms 字典中的重复项仅包含一行