How to add qt libraries to embedded board.
-
Hi,
I am new to work on building file system(Linux), adding new libraries to fs and Qt also.I am trying to add Qt to my embedded board(DRA7xx board)
I have downloaded qt-everywhere-opensource-src-4.8.4.tar.gz from Qt downloads website and extracted in my /home/medha/Qt4.8.4/ folder. I have changed the cross compiler in the file** /home/medha/Qt4.8.4/qt-everywhere-opensource-src-4.8.4/mkspecs/qws/linux-arm-g++/qmake.conf** from "arm-linux-" to "arm-linux-gnueabihf-" as per the compiler present on my host. I exported ARCH as arm, CROSS_COMPILE and PATH variables and done the qt configuration with following command.(I hardly know 2 or 3 options in the command line. Took it from web. I do not know what to give input for option -prefix)
./configure -embedded arm -prefix /home/medha/Qt4.8.4 -platform linux-g++ -little-endian -xplatform qws/linux-arm-g++ -qt-gfx-linuxfb -qt-gfx-vnc -qt-gfx-multiscreen -qt-mouse-pc -release -shared -no-fast -depths all -D QT_NO_QWS_CURSOR -no-pch -confirm-license
It has got configured and then I gave "make". It has got build successfully. I have checked the library files created in the lib folder of PWD. If I give
file libQtSvg.so.4.8.4 on my host PC, the output is
libQtSvg.so.4.8.4: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x3b68d163b6656cd766132978298496534a37b819, not stripped.
Now I am worried, how these can be used for my DRA7xx board. When I run some app which is cross compiled for arm, on my embedded board I am getting the following error.
root@dra7xx-evm:~# ./Oct18
./Oct18: error while loading shared libraries: libQtGuiE.so.4: cannot open shared object file: No such file or directy
root@dra7xx-evm:~#Am I supposed to copy those libraries on dra7xx filesystem manually? If so, Where to copy them and how. I tried copying the libraries in lib folder to /usr/local/lib folder and /lib folder and /usr/lib folder of rootfs(sd card). But it did not work.
Please help me in adding the Qt libraries to my embedded board(DRA7xx) and running qt application.
Thanks and regards,
Vijay
-
The -prefix option tells your compiled applications where to find Qt.
A good place to start is to "make install." This will populate the folder, that you passed in with -prefix, on your dev machine. You then take the dev folder and copy it to the embedded device, ensuring that you place it in the same full path.
As an example, I usually pass /usr/local/qt-5.x to the -prefix option. On my x86 Ubuntu machine, when I run 'make install', I get a /usr/local/qt-5.x folder that contains binaries for the embedded target (they are not valid x86 binaries). I then tar and copy them to the embedded target (Beaglebone) and place them under the /usr/local/qt-5.x folder.
I then make Qt Creator aware of my new Qt library and compile my app. When I deploy to the embedded target, everything works as expected.
Running 'ldd <app_name>' might help you track down some library issues.
Hope that helps
-
Hi and welcome to devnet,
Just copy the folder where your cross-compiled Qt can be found on your desktop machine in the same place on your device root filesystem e.g. something like /usr/local/Trolltech/Qt-4.8.6-Embedded
-
Did you try "export LD_LIBRARY_PATH=/yourQTlibpath/" ?
-
Hi,
Thank you for the support. I have cross compiled Qt4.8.4 and its working on my board.
Now I am trying to cross compile Qt 5.2. I need few other options to get enabled so I am working on Qt 5.2. But Im getting the following error.
My qmake.conf file isqmake configuration for building with linux-omap5-g++
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
QMAKE_INCREMENTAL_STYLE = sublibinclude(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)cross compiler
CROSS_COMPILE = arm-linux-gnueabihf-
directory search
QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include
QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include/libxml2
QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include/freetype2
QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include/drm
QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include/gbmQMAKE_LIBDIR += $$[QT_SYSROOT]/lib
QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/libQMAKE_INCDIR_OPENGL_ES2 = $$[QT_SYSROOT]/usr/include/GLES2
QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/usr/include/EGL
QMAKE_LIBDIR_OPENGL_ES2 = $$[QT_SYSROOT]/usr/lib
QMAKE_LIBDIR_EGL = $$[QT_SYSROOT]/usr/liblibraries
#QMAKE_LIBS = -lxml2 -lz -lfreetype -lexpat -lrt -ldl -lfontconfig -lpng -lpthread
QMAKE_LIBS = -lz -lfreetype -lexpat -lrt -ldl -lfontconfig -lpng -lpthread
QMAKE_LIBS_OPENGL_ES2 = -lsrv_um -lGLESv2 -lusc
QMAKE_LIBS_EGL = -lEGL -lIMGegl
QMAKE_LIBS_THREAD = -lpthreadDISTRO_OPTS += hard-float
compiler flags
QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard -fPIC -mword-relocations -fpermissive
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASEcompiler tools
QMAKE_CC = $${CROSS_COMPILE}gcc
QMAKE_CXX = $${CROSS_COMPILE}g++
QMAKE_LINK = $${QMAKE_CXX}
QMAKE_LINK_SHLIB = $${QMAKE_CXX}QMAKE_AR = $${CROSS_COMPILE}ar cqs
QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
QMAKE_STRIP = $${CROSS_COMPILE}stripload(qt_config)
And the error log is as follows.
medha@C528:~/Qt5.2/qt-everywhere-opensource-src-5.2.0$ export ARCH=arm
medha@C528:~/Qt5.2/qt-everywhere-opensource-src-5.2.0$ export PATH=$PATH:/home/medha/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin
medha@C528:~/Qt5.2/qt-everywhere-opensource-src-5.2.0$ export CROSS_COMPILE=arm-linux-gnueabihf-
medha@C528:~/Qt5.2/qt-everywhere-opensource-src-5.2.0$
medha@C528:~/Qt5.2/qt-everywhere-opensource-src-5.2.0$ ls
configure qtandroidextras qtmultimedia qttranslations
configure.bat qtbase qt.pro qtwebkit
gnuwin32 qtconnectivity qtquick1 qtwebkit-examples
LGPL_EXCEPTION.txt qtdeclarative qtquickcontrols qtwinextras
LICENSE.FDL qtdoc qtscript qtx11extras
LICENSE.GPL qtgraphicaleffects qtsensors qtxmlpatterns
LICENSE.LGPL qtimageformats qtserialport README
LICENSE.PREVIEW.COMMERCIAL qtlocation qtsvg
qtactiveqt qtmacextras qttools
medha@C528:~/Qt5.2/qt-everywhere-opensource-src-5.2.0$
medha@C528:~/Qt5.2/qt-everywhere-opensource-src-5.2.0$ ./configure -prefix /usr/qte5.2 -release -make libs -make examples -nomake tools -xplatform linux-omap5-g++ -opengl es2 -confirm-license -opensource -no-xcb -no-pch -verbose -kms -sysroot /home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs -v -no-icu- cd qtbase
- /home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtbase/configure -top-level -prefix /usr/qte5.2 -release -make libs -make examples -nomake tools -xplatform linux-omap5-g++ -opengl es2 -confirm-license -opensource -no-xcb -no-pch -verbose -kms -sysroot /home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs -v -no-icu
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 have already accepted the terms of the license.
arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c
Symbol visibility control enabled.
arm-linux-gnueabihf-g++ --sysroot=/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
Symbolic function binding enabled.
DEFAULT_INCDIRS="/home/medha/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf/include/c++/4.7.3
/home/medha/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf/include/c++/4.7.3/arm-linux-gnueabihf
/home/medha/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf/include/c++/4.7.3/backward
/home/medha/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf/4.7.3/include
/home/medha/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf/4.7.3/include-fixed
/home/medha/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf/include
/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include
"
DEFAULT_LIBDIRS="/home/medha/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf/lib
/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/lib
/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/lib
/home/medha/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf/4.7.3
/home/medha/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc
/home/medha/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf
"
Creating qmake...
make: Nothing to be done for `first'.
Running configuration tests...
Note: PKG_CONFIG_LIBDIR automatically set to /home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/lib/pkgconfig:/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/share/pkgconfig:/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/lib/arm-linux-gnueabihf/pkgconfig
Note: PKG_CONFIG_SYSROOT_DIR automatically set to /home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs
Determining architecture... ()
arm-linux-gnueabihf-g++ -c -pipe --sysroot=/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs -g -Wall -W -fPIE -I../../mkspecs/linux-omap5-g++ -I. -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/libxml2 -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/freetype2 -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/drm -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/gbm -o arch.o arch.cpp
arm-linux-gnueabihf-g++ -o arch arch.o -L/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/lib -L/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/lib -lz -lfreetype -lexpat -lrt -ldl -lfontconfig -lpng -lpthread --sysroot=/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs
/home/medha/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lpng
collect2: error: ld returned 1 exit status
make: *** [arch] Error 1
Unable to determine architecture!Could not determine the target architecture!
Turn on verbose messaging (-v) to see the final report.
Determining architecture... ()
g++ -c -pipe -g -Wall -W -fPIE -I../../mkspecs/linux-g++ -I. -o arch.o arch.cpp
g++ -o arch arch.o
{ test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9][^0-9]([0-9]).([0-9]).,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'arch' && test -f arch.gdb-index && objcopy --add-section '.gdb_index=arch.gdb-index' --set-section-flags '.gdb_index=readonly' 'arch' 'arch' && rm -f arch.gdb-index || true
Found architecture in binary
CFG_HOST_ARCH="i386"
CFG_HOST_CPUFEATURES=""
System architecture: 'unknown'
Host architecture: 'i386'
C++11 auto-detection... ()
arm-linux-gnueabihf-g++ -c -pipe --sysroot=/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs -O3 -march=armv7-a -mtune=cortex-a15 -mfpu=neon-vfpv4 compilation terminated.
make: *** [pulseaudio.o] Error 1
PulseAudio disabled.
OpenGL ES 2.x auto-detection... ()
arm-linux-gnueabihf-g++ -c -pipe --sysroot=/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs -O3 -march=armv7-a -mtune=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard -fPIC -mword-relocations -fpermissive -Wall -W -fPIE -I../../../mkspecs/linux-omap5-g++ -I. -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/GLES2 -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/libxml2 -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/freetype2 -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/drm -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/gbm -o opengles2.o opengles2.cpp
arm-linux-gnueabihf-g++ -Wl,-O1 -o opengles2 opengles2.o -L/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/lib -L/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/lib -lz -lfreetype -lexpat -lrt -ldl -lfontconfig -lpng -lpthread --sysroot=/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs -lsrv_um -lGLESv2 -lusc
/home/medha/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lpng
collect2: error: ld returned 1 exit status
make: *** [opengles2] Error 1
OpenGL ES 2.x disabled.
The OpenGL ES 2.0 functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
/home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtbase/mkspecs/linux-omap5-g++.
medha@C528:~/Qt5.2/qt-everywhere-opensource-src-5.2.0$Please help me in this regard.
Regards,
Vijay -
Do you have libpng for ARM ?
-
Hi SGaist ,
Thanks for the reply. As you said I have installed libpng and zlib for arm (in my toolchain folder). Now I am able to do configure, make and make install on Qt5.2. But I am still facing problems.
I have copied all the installed libraries on to my board and when I tried to run application I am facing the following problem.
**root@dra7xx-evm:~# ./Wid1
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
QIconvCodec::convertToUnicode: 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".Available platform plugins are: eglfs, kms, linuxfb, minimal, minimalegl, offscreen.
Reinstalling the application may fix this problem.
Aborted
root@dra7xx-evm:~# ./Wid1 -platform kms
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
QSocketNotifier: Can only be used with threads started with QThread
QSocketNotifier: Can only be used with threads started with QThread
QSocketNotifier: Can only be used with threads started with QThread
root@dra7xx-evm:~# **And I observed that when I gave make install in qt5.2 the log contains some errors as followed(sample of Log).
cd qmldbg_inspector/ && ( test -e Makefile || /home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtbase/bin/qmake /home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtquick1/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro -o Makefile ) && make -f Makefile install
make[5]: Entering directory/home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtquick1/src/plugins/qmltooling/qmldbg_inspector' install -m 755 -p "../../../../plugins/qml1tooling/libqmldbg_inspector.so" "/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/plugins/qml1tooling/libqmldbg_inspector.so" arm-linux-gnueabihf-strip --strip-unneeded "/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/plugins/qml1tooling/libqmldbg_inspector.so" /bin/sh: 1: arm-linux-gnueabihf-strip: not found make[5]: [install_target] Error 127 (ignored) make[5]: Leaving directory
/home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtquick1/src/plugins/qmltooling/qmldbg_inspector'
cd qmldbg_tcp_qtquick1/ && ( test -e Makefile || /home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtbase/bin/qmake /home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtquick1/src/plugins/qmltooling/qmldbg_tcp_qtquick1/qmldbg_tcp_qtquick1.pro -o Makefile ) && make -f Makefile install
make[5]: Entering directory/home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtquick1/src/plugins/qmltooling/qmldbg_tcp_qtquick1' install -m 755 -p "../../../../plugins/qml1tooling/libqmldbg_tcp_qtdeclarative.so" "/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/plugins/qml1tooling/libqmldbg_tcp_qtdeclarative.so" arm-linux-gnueabihf-strip --strip-unneeded "/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/plugins/qml1tooling/libqmldbg_tcp_qtdeclarative.so" /bin/sh: 1: arm-linux-gnueabihf-strip: not found make[5]: [install_target] Error 127 (ignored) make[5]: Leaving directory
/home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtquick1/src/plugins/qmltooling/qmldbg_tcp_qtquick1'
make[4]: Leaving directory/home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtquick1/src/plugins/qmltooling' make[3]: Leaving directory
/home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtquick1/src/plugins'
make[2]: Leaving directory/home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtquick1/src' cd tools/ && ( test -e Makefile || /home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtbase/bin/qmake /home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtquick1/tools/tools.pro -o Makefile ) && make -f Makefile install make[2]: Entering directory
/home/medha/Qt5.2/qt-everywhere-opensource-src-5.2.0/qtquick1/tools'
make[2]: Nothing to be done for `install'.And I did not find the fonts folder in the installed path..
Please Help me in this regard.
Regards,
Vijay -
Missing arm-linux-gnueabihf-strip in your PATH ?
-
Hi SGaist ,
No. Its not missing.
medha@C528:~/CC/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin$ ls
arm-linux-gnueabihf-addr2line* arm-linux-gnueabihf-gfortran*
arm-linux-gnueabihf-ar* arm-linux-gnueabihf-gprof*
arm-linux-gnueabihf-as* arm-linux-gnueabihf-ld@
arm-linux-gnueabihf-c++@ arm-linux-gnueabihf-ld.bfd*
arm-linux-gnueabihf-c++filt* arm-linux-gnueabihf-ldd*
arm-linux-gnueabihf-cpp* arm-linux-gnueabihf-ld.gold*
arm-linux-gnueabihf-ct-ng.config arm-linux-gnueabihf-nm*
arm-linux-gnueabihf-elfedit* arm-linux-gnueabihf-objcopy*
arm-linux-gnueabihf-g++* arm-linux-gnueabihf-objdump*
arm-linux-gnueabihf-gcc@ arm-linux-gnueabihf-pkg-config*
arm-linux-gnueabihf-gcc-4.7.3* arm-linux-gnueabihf-pkg-config-real*
arm-linux-gnueabihf-gcc-ar* arm-linux-gnueabihf-ranlib*
arm-linux-gnueabihf-gcc-nm* arm-linux-gnueabihf-readelf*
arm-linux-gnueabihf-gcc-ranlib* arm-linux-gnueabihf-size*
arm-linux-gnueabihf-gcov* arm-linux-gnueabihf-strings*
arm-linux-gnueabihf-gdb* arm-linux-gnueabihf-strip*Rgds,
Vijay -
I didn't doubt that you had them (otherwise you wouldn't have been able to cross-compile at all) However can you confirm that "~/CC/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin" is in your PATH environment variable ?
-
Vijaykumar Ponugotireplied to SGaist on 5 May 2015, 05:01 last edited by Vijaykumar Ponugoti 5 May 2015, 05:02
medha@C528:~$ export PATH=$PATH:/home/medha/CC/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin
medha@C528:~$ echo $PATH
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/medha/CC/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/binActually, If something went wrong how the libraries are being created.? And when I gave "file" command on any of the created library file, it informs that the library is cross compiled for arm.
And I tried copying the created libraries onto the filesystem and run some Qt application as follows, after setting the LD_LIBRARY_PATH variable.
But I am getting problem.
On the targetroot@dra7xx-evm:~# ./Wid1
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
QIconvCodec::convertToUnicode: 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".Available platform plugins are: eglfs, kms, linuxfb, minimal, minimalegl, offscreen.
Reinstalling the application may fix this problem.
Aborted
root@dra7xx-evm:~# ./Wid1 -platform kms
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
QSocketNotifier: Can only be used with threads started with QThread
QSocketNotifier: Can only be used with threads started with QThread
QSocketNotifier: Can only be used with threads started with QThread
root@dra7xx-evm:~#What could be the problem? Am I running the application properly?
Please help me. -
Hi Gaist,
Did you get any idea? what could be the probelm?
Plz help me.
Regards,
Vijay -
Are you sure that you are using the same Qt on your target than the one you cross-compiled ?
-
@SGaist
Yeah, Im sure. I created the make file for application using qmake of the qt5.2 crosscompiled.
medha@C528:~/Qtwokspace/Wid1$ ls
main.cpp mainwindow.cpp mainwindow.h mainwindow.ui Wid1.pro Wid1.pro.user
medha@C528:~/Qtwokspace/Wid1$ /usr/qte5.2/bin/qmake Wid1.pro
medha@C528:~/Qtwokspace/Wid1$ ls
main.cpp mainwindow.h Makefile Wid1.pro.user
mainwindow.cpp mainwindow.ui Wid1.pro
medha@C528:~/Qtwokspace/Wid1$ make
/usr/qte5.2/bin/uic mainwindow.ui -o ui_mainwindow.h
arm-linux-gnueabihf-g++ -c -pipe --sysroot=/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs -O3 -march=armv7-a -mtune=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard -fPIC -mword-relocations -marm -fpermissive -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/qte5.2/mkspecs/linux-omap5-g++ -I. -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include/QtWidgets -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include/QtGui -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include/QtCore -I. -I. -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/libxml2 -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/freetype2 -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/drm -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/gbm -o main.o main.cpp
arm-linux-gnueabihf-g++ -c -pipe --sysroot=/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs -O3 -march=armv7-a -mtune=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard -fPIC -mword-relocations -marm -fpermissive -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/qte5.2/mkspecs/linux-omap5-g++ -I. -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include/QtWidgets -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include/QtGui -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include/QtCore -I. -I. -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/libxml2 -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/freetype2 -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/drm -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/gbm -o mainwindow.o mainwindow.cpp
/usr/qte5.2/bin/moc -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/qte5.2/mkspecs/linux-omap5-g++ -I. -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include/QtWidgets -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include/QtGui -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include/QtCore -I. -I. -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/libxml2 -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/freetype2 -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/drm -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/gbm -I/home/medha/CC/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf/include/c++/4.7.3 -I/home/medha/CC/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf/include/c++/4.7.3/arm-linux-gnueabihf -I/home/medha/CC/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf/include/c++/4.7.3/backward -I/home/medha/CC/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf/4.7.3/include -I/home/medha/CC/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf/4.7.3/include-fixed -I/home/medha/CC/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/lib/gcc/arm-linux-gnueabihf/include -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include mainwindow.h -o moc_mainwindow.cpp
arm-linux-gnueabihf-g++ -c -pipe --sysroot=/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs -O3 -march=armv7-a -mtune=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard -fPIC -mword-relocations -marm -fpermissive -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/qte5.2/mkspecs/linux-omap5-g++ -I. -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include/QtWidgets -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include/QtGui -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/include/QtCore -I. -I. -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include -I/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/libxml2 -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/freetype2 -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/drm -I../../ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/include/gbm -o moc_mainwindow.o moc_mainwindow.cpp
arm-linux-gnueabihf-g++ --sysroot=/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs -Wl,-O1 -Wl,-rpath,/usr/qte5.2/lib -o Wid1 main.o mainwindow.o moc_mainwindow.o -L/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/lib -L/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/lib -L/home/medha/ti-glsdk_dra7xx-evm_7_00_00_04/targetfs/usr/qte5.2/lib -lQt5Widgets -L/usr/qte5.2/lib -lQt5Gui -lQt5Core -lz -lfreetype -lexpat -lrt -ldl -lfontconfig -lpng -lsrv_um -lGLESv2 -lusc -lpthread
medha@C528:~/Qtwokspace/Wid1$ ls
main.cpp mainwindow.o moc_mainwindow.o Wid1.pro.user
main.o mainwindow.ui ui_mainwindow.h
mainwindow.cpp Makefile Wid1
mainwindow.h moc_mainwindow.cpp Wid1.pro
medha@C528:~/Qtwokspace/Wid1$ file Wid1
Wid1: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.31, BuildID[sha1]=0x00c92425a3333130034b285d1b15cbc3954c740b, not stripped
medha@C528:~/Qtwokspace/Wid1$ -
Cross-compiling is one thing, how did you install Qt on your board ?