Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. qt run app erros in riscv64
Qt 6.12 LTS is out! See what's new in the release blog

qt run app erros in riscv64

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 995 Views
  • 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.
  • L Offline
    L Offline
    lgkgkfg
    wrote on last edited by
    #1

    I have cross build qt6,get some so files,but I copy this so lib to my board , it erros :
    qt.core.plugin.factoryloader: checking directory path "/qtlib/plugins/platforms" ...
    qt.core.plugin.factoryloader: looking at "/qtlib/plugins/platforms/libqlinuxfb.so"
    qt.core.plugin.loader: Failed to find metadata in lib /qtlib/plugins/platforms/libqlinuxfb.so: '/qtlib/plugins/platforms/libqlinuxfb.so' is not a Qt plugin (metadata not found)
    qt.core.plugin.factoryloader: "Failed to extract plugin meta data from '/qtlib/plugins/platforms/libqlinuxfb.so': '/qtlib/plugins/platforms/libqlinuxfb.so' is not a Qt plugin (metadata not found)"
    not a plugin

    but I have copy this so lib to env,can any body help me ,where is the problem?

    JonBJ 1 Reply Last reply
    0
    • L lgkgkfg

      I have cross build qt6,get some so files,but I copy this so lib to my board , it erros :
      qt.core.plugin.factoryloader: checking directory path "/qtlib/plugins/platforms" ...
      qt.core.plugin.factoryloader: looking at "/qtlib/plugins/platforms/libqlinuxfb.so"
      qt.core.plugin.loader: Failed to find metadata in lib /qtlib/plugins/platforms/libqlinuxfb.so: '/qtlib/plugins/platforms/libqlinuxfb.so' is not a Qt plugin (metadata not found)
      qt.core.plugin.factoryloader: "Failed to extract plugin meta data from '/qtlib/plugins/platforms/libqlinuxfb.so': '/qtlib/plugins/platforms/libqlinuxfb.so' is not a Qt plugin (metadata not found)"
      not a plugin

      but I have copy this so lib to env,can any body help me ,where is the problem?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @lgkgkfg
      Hello and welcome.

      If after your "cross build" you have ended up with the .so for the wrong architecture it might generate "'/qtlib/plugins/platforms/libqlinuxfb.so' is not a Qt plugin (metadata not found)", is that a possibility?

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lgkgkfg
        wrote on last edited by
        #3

        tks, I think cross build for right way,can you help me find out wrong configure ?
        this is my build process

        /root/data/qt6/qt-host/qtbase/configure -release -make examples -no-opengl  \
          -qt-host-path /root/data/qt6/qt-x86                           \
          -extprefix /root/data/qt6/qt-target                        \
          -prefix /root/data/qt6/qt-x86                                  \
          -- -DCMAKE_TOOLCHAIN_FILE=/root/data/qt6/qt-cross/toolchain.cmake
        
        

        and I use this file for cmake list ,below here,

        cmake_minimum_required(VERSION 3.18)
        include_guard(GLOBAL)
        # Qt6HostInfo_DIR=/usr/lib/x86_64-linux-gnu/cmake/ Qt6HostInfo
        # set(Qt6HostInfo_DIR /usr/lib/x86_64-linux-gnu/cmake/)
        # set(Qt6HostInfo /usr/lib/x86_64-linux-gnu/cmake/)
        
        set(CMAKE_SYSTEM_NAME Linux)
        set(CMAKE_SYSTEM_PROCESSOR riscv64)
        
        set(TARGET_SYSROOT /root/data/d1-tina/tina-d1-h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/sysroot)
        set(CROSS_COMPILER /root/data/d1-tina/tina-d1-h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/bin)
        
        set(CMAKE_SYSROOT ${TARGET_SYSROOT})
        
        set(ENV{PKG_CONFIG_PATH} "")
        set(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_SYSROOT}/usr/lib/pkgconfig:${CMAKE_SYSROOT}/usr/share/pkgconfig)
        set(ENV{PKG_CONFIG_SYSROOT_DIR} ${CMAKE_SYSROOT})
        
        set(CMAKE_C_COMPILER ${CROSS_COMPILER}/riscv64-unknown-linux-gnu-gcc)
        set(CMAKE_CXX_COMPILER ${CROSS_COMPILER}/riscv64-unknown-linux-gnu-g++)
        
        # set(QT_COMPILER_FLAGS "-march=armv7-a -mfpu=neon -mfloat-abi=hard")
        # set(QT_COMPILER_FLAGS_RELEASE "-O2 -pipe")
        # set(QT_LINKER_FLAGS "-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed")
        
        set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
        set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
        set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
        set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
        
        include(CMakeInitializeConfigs)
        
        function(cmake_initialize_per_config_variable _PREFIX _DOCSTRING)
          if (_PREFIX MATCHES "CMAKE_(C|CXX|ASM)_FLAGS")
            set(CMAKE_${CMAKE_MATCH_1}_FLAGS_INIT "${QT_COMPILER_FLAGS}")
        
            foreach (config DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
              if (DEFINED QT_COMPILER_FLAGS_${config})
                set(CMAKE_${CMAKE_MATCH_1}_FLAGS_${config}_INIT "${QT_COMPILER_FLAGS_${config}}")
              endif()
            endforeach()
          endif()
        
          if (_PREFIX MATCHES "CMAKE_(SHARED|MODULE|EXE)_LINKER_FLAGS")
            foreach (config SHARED MODULE EXE)
              set(CMAKE_${config}_LINKER_FLAGS_INIT "${QT_LINKER_FLAGS}")
            endforeach()
          endif()
        
          _cmake_initialize_per_config_variable(${ARGV})
        endfunction()
        

        ,could you check about that ?

        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
        • Unsolved