qt run app erros in riscv64
-
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 pluginbut I have copy this so lib to env,can any body help me ,where is the problem?
-
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 pluginbut I have copy this so lib to env,can any body help me ,where is the problem?
-
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.cmakeand 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 ?