Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. failed to cross compile opencv with qt5
Forum Updated to NodeBB v4.3 + New Features

failed to cross compile opencv with qt5

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 811 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yy1030
    wrote on last edited by
    #1

    I want to cross compile opencv for aarch64 with qt5. And I add "-DWITH_QT=ON " to cmake.

    `CMake Warning at cmake/OpenCVFindLibsGUI.cmake:18 (find_package):
    By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "Qt5Core", but
    CMake did not find one.

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

    Qt5CoreConfig.cmake
    qt5core-config.cmake
    Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
    "Qt5Core_DIR" to a directory containing one of the above files. If
    "Qt5Core" provides a separate development package or SDK, be sure it has
    been installed.
    Call Stack (most recent call first):
    CMakeLists.txt:791 (include)

    CMake Warning at cmake/OpenCVFindLibsGUI.cmake:19 (find_package):
    By not providing "FindQt5Gui.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "Qt5Gui", but
    CMake did not find one.

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

    Qt5GuiConfig.cmake
    qt5gui-config.cmake
    Add the installation prefix of "Qt5Gui" to CMAKE_PREFIX_PATH or set
    "Qt5Gui_DIR" to a directory containing one of the above files. If "Qt5Gui"
    provides a separate development package or SDK, be sure it has been
    installed.
    Call Stack (most recent call first):
    CMakeLists.txt:791 (include)

    CMake Warning at cmake/OpenCVFindLibsGUI.cmake:20 (find_package):
    By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
    has asked CMake to find a package configuration file provided by
    "Qt5Widgets", but CMake did not find one.

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

    Qt5WidgetsConfig.cmake
    qt5widgets-config.cmake
    Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
    "Qt5Widgets_DIR" to a directory containing one of the above files. If
    "Qt5Widgets" provides a separate development package or SDK, be sure it has
    been installed.
    Call Stack (most recent call first):
    CMakeLists.txt:791 (include)

    CMake Warning at cmake/OpenCVFindLibsGUI.cmake:21 (find_package):
    By not providing "FindQt5Test.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "Qt5Test", but
    CMake did not find one.

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

    Qt5TestConfig.cmake
    qt5test-config.cmake
    Add the installation prefix of "Qt5Test" to CMAKE_PREFIX_PATH or set
    "Qt5Test_DIR" to a directory containing one of the above files. If
    "Qt5Test" provides a separate development package or SDK, be sure it has
    been installed.
    Call Stack (most recent call first):
    CMakeLists.txt:791 (include)

    CMake Warning at cmake/OpenCVFindLibsGUI.cmake:22 (find_package):
    By not providing "FindQt5Concurrent.cmake" in CMAKE_MODULE_PATH this
    project has asked CMake to find a package configuration file provided by
    "Qt5Concurrent", but CMake did not find one.

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

    Qt5ConcurrentConfig.cmake
    qt5concurrent-config.cmake
    Add the installation prefix of "Qt5Concurrent" to CMAKE_PREFIX_PATH or set
    "Qt5Concurrent_DIR" to a directory containing one of the above files. If
    "Qt5Concurrent" provides a separate development package or SDK, be sure it
    has been installed.
    Call Stack (most recent call first):
    CMakeLists.txt:791 (include)

    CMake Error at /usr/share/cmake-3.5/Modules/FindQt4.cmake:1326 (message):
    Found unsuitable Qt version "5.5.1" from /usr/bin/qmake, this code requires
    Qt 4.x
    Call Stack (most recent call first):
    cmake/OpenCVFindLibsGUI.cmake:34 (find_package)
    CMakeLists.txt:791 (include)

    -- Configuring incomplete, errors occurred!
    `

    I know the reason is that my compute does not have the aarch64-linux-gnu/cmake/Qt5Core , Qt5Concurrent and so on.
    My compute has install the qt5 for x86_64. So when I compile opencv for my own linux(x86_64),it is OK. But when I cross compile for aarch64 in my compute(x86_64),it doesn't work.
    Of course when cmake without "-DWITH_QT=ON", it work.While the arm opencv can not use imshow() function.
    what should I do?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      If you can't get one pre-built, then you first have to cross-compile Qt for your target architecture.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved