QT not generating libqxcb.so inside platforms
-
Hi,
I want to run a QT application for Xilinx Zynq Ultrascale+ device. I used cross compiler "aarch64-linux-gnu-".
First I updated mkspecs/linux-arm-gnueabi-g++/qmake.conf file to -
#qmake configuration for building with arm-linux-gnueabi-g++ MAKEFILE_GENERATOR = UNIX CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib include(../common/linux.conf) include(../common/gcc-base-unix.conf) include(../common/g++-unix.conf) #modifications to g++.conf QMAKE_CC = aarch64-linux-gnu-gcc QMAKE_CXX = aarch64-linux-gnu-g++ QMAKE_LINK = aarch64-linux-gnu-g++ QMAKE_LINK_SHLIB = aarch64-linux-gnu-g++ #modifications to linux.conf QMAKE_AR = aarch64-linux-gnu-ar cqs QMAKE_OBJCOPY = aarch64-linux-gnu-objcopy QMAKE_NM = aarch64-linux-gnu-nm -P QMAKE_STRIP = aarch64-linux-gnu-strip load(qt_config)
then I used the configure command as-
./configure -device linux-imx6-g++ -device-option CROSS_COMPILE=/opt/gcc-linaro-5.5.0-2017.10-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- -platform linux-g++ -xplatform linux-arm-gnueabi-g++ -nomake examples -no-pch -confirm-license -make libs -prefix /opt/QT_ARM64
Compilation was successful (one patch (https://codereview.qt-project.org/#/c/151326/5/mkspecs/features/default_post.prf) i applied because it was giving error g++: error: unrecognized command line option ‘-std=c++1z’)
Then I used analogclock application and created binary for the board.
Libraries and plugins are copied to the board and when I run application i got this error.
root@zcu102:~# export QT_QPA_PLATFORM_PLUGIN_PATH=/plugins root@zcu102:~# ./analogclock QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed This application failed to start because it could not find or load the Qt platform plugin "xcb" in "/plugins". Available platform plugins are: linuxfb, minimal, offscreen. Reinstalling the application may fix this problem. Aborted root@zcu102:~#
When I check platforms folder inside /plugins there is libqxcb.so file.
Is there anything wrong in the procedure I have done for compiling and running application?
How to get libqxcb.so file inside platforms folder?When I try to configure QT with -qt-xcb I'm getting error as -
./configure -device linux-imx6-g++ -device-option CROSS_COMPILE=/opt/gcc-linaro-5.5.0-2017.10-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- -platform linux-g++ -xplatform linux-arm-gnueabi-g++ -nomake examples -no-pch -qt-xcb -confirm-license -make libs -prefix /opt/QT_ARM64 -pkg-config Which edition of Qt do you want to use ? Type 'c' if you want to use the Commercial Edition. Type 'o' if you want to use the Open Source Edition. o This is the Qt Open Source Edition. You are licensed to use this software under the terms of the Lesser GNU General Public License (LGPL) versions 2.1. You are also licensed to use this software under the terms of the GNU Lesser General Public License (LGPL) versions 3. You have already accepted the terms of the Open Source license. Running configuration tests (phase 1)... Done running configuration tests. Creating qmake... .Done. Running configuration tests (phase 2)... The test for linking against libxcb failed! You might need to install dependency packages for libxcb. See src/plugins/platforms/xcb/README.
Then I checked for the dependency for libxcb. All the packages are installed already. (sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev)
My question is how to solve this issue and run the QT application on Xilinx Zynq Ultrascale+ platform?
-
Hi,
I want to run a QT application for Xilinx Zynq Ultrascale+ device. I used cross compiler "aarch64-linux-gnu-".
First I updated mkspecs/linux-arm-gnueabi-g++/qmake.conf file to -
#qmake configuration for building with arm-linux-gnueabi-g++ MAKEFILE_GENERATOR = UNIX CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib include(../common/linux.conf) include(../common/gcc-base-unix.conf) include(../common/g++-unix.conf) #modifications to g++.conf QMAKE_CC = aarch64-linux-gnu-gcc QMAKE_CXX = aarch64-linux-gnu-g++ QMAKE_LINK = aarch64-linux-gnu-g++ QMAKE_LINK_SHLIB = aarch64-linux-gnu-g++ #modifications to linux.conf QMAKE_AR = aarch64-linux-gnu-ar cqs QMAKE_OBJCOPY = aarch64-linux-gnu-objcopy QMAKE_NM = aarch64-linux-gnu-nm -P QMAKE_STRIP = aarch64-linux-gnu-strip load(qt_config)
then I used the configure command as-
./configure -device linux-imx6-g++ -device-option CROSS_COMPILE=/opt/gcc-linaro-5.5.0-2017.10-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- -platform linux-g++ -xplatform linux-arm-gnueabi-g++ -nomake examples -no-pch -confirm-license -make libs -prefix /opt/QT_ARM64
Compilation was successful (one patch (https://codereview.qt-project.org/#/c/151326/5/mkspecs/features/default_post.prf) i applied because it was giving error g++: error: unrecognized command line option ‘-std=c++1z’)
Then I used analogclock application and created binary for the board.
Libraries and plugins are copied to the board and when I run application i got this error.
root@zcu102:~# export QT_QPA_PLATFORM_PLUGIN_PATH=/plugins root@zcu102:~# ./analogclock QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed This application failed to start because it could not find or load the Qt platform plugin "xcb" in "/plugins". Available platform plugins are: linuxfb, minimal, offscreen. Reinstalling the application may fix this problem. Aborted root@zcu102:~#
When I check platforms folder inside /plugins there is libqxcb.so file.
Is there anything wrong in the procedure I have done for compiling and running application?
How to get libqxcb.so file inside platforms folder?When I try to configure QT with -qt-xcb I'm getting error as -
./configure -device linux-imx6-g++ -device-option CROSS_COMPILE=/opt/gcc-linaro-5.5.0-2017.10-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- -platform linux-g++ -xplatform linux-arm-gnueabi-g++ -nomake examples -no-pch -qt-xcb -confirm-license -make libs -prefix /opt/QT_ARM64 -pkg-config Which edition of Qt do you want to use ? Type 'c' if you want to use the Commercial Edition. Type 'o' if you want to use the Open Source Edition. o This is the Qt Open Source Edition. You are licensed to use this software under the terms of the Lesser GNU General Public License (LGPL) versions 2.1. You are also licensed to use this software under the terms of the GNU Lesser General Public License (LGPL) versions 3. You have already accepted the terms of the Open Source license. Running configuration tests (phase 1)... Done running configuration tests. Creating qmake... .Done. Running configuration tests (phase 2)... The test for linking against libxcb failed! You might need to install dependency packages for libxcb. See src/plugins/platforms/xcb/README.
Then I checked for the dependency for libxcb. All the packages are installed already. (sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev)
My question is how to solve this issue and run the QT application on Xilinx Zynq Ultrascale+ platform?
Hi @sreeji
Try running by setting LD_LIBRARY_PATH and also soft link to plugins folder.
Is your Qt path in cross compiled platform and in booted image same?
Have you tried using "startx analogclock" ?