"applet not found" error when trying to run an application created with QTembedded
Hi,
I am working on a sbc6000x board (at91sam9261 micro and linux 2.6.24) and i am trying to crosscompile application for this board from my pc (ubuntu 14.14).
When i try to run the application (after copying it in /bin and chmod 755 it) i have an error "applet not found". The applicaion is a qt widget application, a push button with a msgbox.
To help understand this error i will explain what i did to have this application.
I am using :
qt-everywhere-opensource-src-4.8.5 ou autre source
gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux
tslib-1.0 (because i need to use the touch screen and when trying to configure qt with -qt-mouse-tslib i need the lib and inclue of tslib).
Configuration and installation of tslib
Code:
cd /home/spi/installQt/tslib-1.0/tslib-1.0/
chmod a+x autogen.sh
./autogen.sh
./configure CC=/home/spi/installQt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-gcc CXX=/home/spi/installQt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-g++ --prefix=/home/spi/installQt/tslib-arm --host=arm-linux-gnueabihf --enable-shared=yes --enable-static=yes
I comment the line #define malloc rpl_malloc in the file config.h or i will have an error in the make
No error at this point.
Configuration and installation fo QTembedded
First i modify the qmake.conf file to respect the path of my compiler and to put the include/lib of tslib :
Code:
#
# qmake configuration for building with arm-none-linux-gnueabi-g++
#
include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
QMAKE_CC = /home/spi/installQt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-gcc
QMAKE_CXX = /home/spi/installQt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-g++
QMAKE_LINK = /home/spi/installQt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-g++
QMAKE_LINK_SHLIB = /home/spi/installQt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-g++
# modifications to linux.conf
QMAKE_AR = /home/spi/installQt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-ar cqs
QMAKE_OBJCOPY = /home/spi/installQt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-objcopy
QMAKE_STRIP = /home/spi/installQt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-strip
QMAKE_INCDIR += /home/spi/installQt/tslib-arm/include
QMAKE_LIBDIR += /home/spi/installQt/tslib-arm/lib
load(qt_config)
Then i configure QT :
Code:
cd /home/spi/installQt/qt-everywhere-opensource-src-4.8.5/
./configure -opensource -confirm-license -prefix /usr/local/Qt-4.8.5-arm-linux -embedded arm -little-endian -no-pch -xplatform qws/linux-arm-gnueabi-g++ -qt-mouse-tslib -no-webkit -no-qt3support -no-cups -no-largefile -optimized-qmake -no-openssl -nomake tools -static
I use -qt-mouse-tslib because i want to use the touch screen and i use -static because i read that (even if the application would be heavier and less "flexible) i would only have to transfert and executable and not "care" about libraries or other dependencies.
Code:
make
sudo make install
Still no error.
Configuration in QT creator
I create a kit with the qmake and the compiler which are in the paths :
Code:
/usr/local/Qt-4.8.5-arm-linux/bin/
and
Code:
/home/spi/installQt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-g++
In my project i add this argument to the make :
Code:
ARCH=arm CROSS_COMPILE=/home/spi/installQt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-
On the target i add this to the environment :
Code:
export QWS_MOUSE_PROTO=tslib:/usr/input/ts
export QWS_DISPLAY=LinuxFB:mmWidth=480:mmHeight=272
I feel i must not be far from having something running but i am now stuck on this.
Thank you for your future answers or advices !
EDIT 1 : After some research i added "CONFIG += static" to my .pro file. It changed nothing.
Re: "applet not found" error when trying to run an application created with QTembedde
Where do you get this error?
Re: "applet not found" error when trying to run an application created with QTembedde
Quote:
Originally Posted by
wysota
Where do you get this error?
I get this error on my board when connecting to it with hyperterminal/putty.
Re: "applet not found" error when trying to run an application created with QTembedde
I don't think this has anything to do with your app.
Re: "applet not found" error when trying to run an application created with QTembedde
Ok.
So maybe it could be something already on the board which make this.
Because when writting a simple .c file with gedit and compiling it with the toolchain (for example a "hello world" print on the terminal) it works.
Re: "applet not found" error when trying to run an application created with QTembedde
Quote:
Originally Posted by
wysota
I don't think this has anything to do with your app.
It seems it was from my compiler, i had a problem with its path so it was not using the new compiler i wanted and it stayed with the old compiler i used but this old compiler was not supported by the version of qt i used so i have to use an older version of qt supporting it. After searching on the forum http://forum.qt.io/ i found a post about someone using the same device and for who it was working with another source so i used the same :
So right now what i am using is :
qt-embedded-linux-opensource-src-4.4.3
my old compiler : arm-linux-gcc-3.4.5-glibc-2.3.6-linux
tslib 1-0
I followed the same steps.
I configured qt like this :
./configure -embedded arm -little-endian -no-armfpa -qt-gfx-transformed -qt-gfx-linuxfb -nomake demos -nomake examples -no-svg -no-phonon -no-qt3support -lrt -no-feature-CURSOR -qt-mouse-tslib -xplatform qws/linux-arm-g++
Still no error at this point.
But when i want to "make" qt i have this error now :
g++ -c -include .pch/release-shared-emb-arm/QtCore -pipe -pipe -pipe -fno-exceptions -O2 -O2 -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fvisibility=hidden -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -Wall -W -Wall -W -D_REENTRANT -D_REENTRANT -D_REENTRANT -fPIC -fPIC -fPIC -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/qws/linux-arm-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared-emb-arm -Iconcurrent -Iglobal -I../3rdparty/harfbuzz/src -I.moc/release-shared-emb-arm -I.uic/release-shared-emb-arm -I/home/spi/installQt/tslib-arm/include -o .obj/release-shared-emb-arm/qfutureinterface.o concurrent/qfutureinterface.cpp
../../include/QtCore/../../src/corelib/arch/qatomic_arm.h: Assembler messages:
../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:111: Error: no such instruction: `swpb %cl,%dl,[%ebp]'
../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:111: Error: no such instruction: `swpb %dl,%sil,[%ebp]'
../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:111: Error: no such instruction: `swpb %sil,%cl,[%ebp]'
../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:111: Error: no such instruction: `swpb %cl,%dl,[%ebp]'
../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:111: Error: no such instruction: `swpb %dl,%dil,[%ebp]'
../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:111: Error: no such instruction: `swpb %cl,%dl,[%ebp]'
../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:111: Error: no such instruction: `swpb %cl,%dl,[%ebp]'
../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:111: Error: no such instruction: `swpb %dl,%sil,[%ebp]'
../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:111: Error: no such instruction: `swpb %sil,%cl,[%ebp]'
../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:111: Error: no such instruction: `swpb %dl,%dil,[%ebp]'
...
repeating more until :
...
../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:111: Error: no such instruction: `swpb %cl,%dl,[%edi]'
../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:111: Error: no such instruction: `swpb %dl,%sil,[%edi]'
../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:111: Error: no such instruction: `swpb %cl,%dl,[%edi]'
make[1]: *** [.obj/release-shared-emb-arm/qfutureinterface.o] Error 1
make[1]: Leaving directory `/home/spi/installQt/qt-embedded-linux-opensource-src-4.4.3/src/corelib'
make: *** [sub-corelib-make_default-ordered] Error 2
Stuck on it since some hours right now.
Re: "applet not found" error when trying to run an application created with QTembedde
Seems that the compiler you are using is incompatible with the architecture you are building for. Could be an arm5 vs armv7 issue.
Re: "applet not found" error when trying to run an application created with QTembedde
Quote:
Originally Posted by
wysota
Seems that the compiler you are using is incompatible with the architecture you are building for. Could be an arm5 vs armv7 issue.
The board i use is an armv5.
I will try to see if i can't find another compiler compatible with my board and qt.
What i know for the moment is :
gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux - qt compatible but not compatible with my board
arm-linux-gcc-3.4.5-glibc-2.3.6-linux - compatible with my board but not with qt it seems
Re: "applet not found" error when trying to run an application created with QTembedde
What is most important is the set of options you build Qt with. I'm sure a decent recent compiler can build for arm5 and newer.
Didn't you get a compiler as part of SDK of your target?
Re: "applet not found" error when trying to run an application created with QTembedde
Quote:
Originally Posted by
wysota
What is most important is the set of options you build Qt with. I'm sure a decent recent compiler can build for arm5 and newer.
Didn't you get a compiler as part of SDK of your target?
The compiler on the CD with the board when we bought it is arm-linux-gcc-3.4.5-glibc-2.3.6-linux.
If i try to compile a .c file like :
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello World\n");
return 0;
}
cd into the directory.
give the path :
export PATH=/usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/bin/:$PATH
then compile it :
arm-linux-gcc -o hello hello.c
It create an executable which is working on my board (it print "Hello world" in the terminal).
In the option to build Qt i must at least have -qt-mouse-tslib because of the touchscreen use.
Re: "applet not found" error when trying to run an application created with QTembedde
So build Qt with the options you need and not those you copied from somewhere.
Re: "applet not found" error when trying to run an application created with QTembedde
Quote:
Originally Posted by
wysota
So build Qt with the options you need and not those you copied from somewhere.
Now when compiling qt4.5.1 with gcc 3.4.5 i have no more error in the configuration, in the make, in the make install. Creating the kit in qt creator don't generate an error, building the app and the qmake seems to work too because i have an executable in the release folder and no error message.
I copied my qt folder and my tslib folder at the exact same place on the board as where it is on the dev platform (my ubuntu pc). Then i change the environement variable as :
export QWS_MOUSE_PROTO=tslib:/dev/input/event0
export QWS_DISPLAY=LinuxFB:mmWidth=480:mmHeight=272
export QTDIR=/usr/local/Qt-4.5.1-arm-linux-CD
export LD_LIBRARY_PATH=/home/spi/installQt/tslib-arm/lib
export TSLIB_PLUGINDIR=/home/spi/installQt/tslib-arm/lib/ts
export TSLIB_TSDEVICE=/home/spi/installQt/tslib-arm/lib/ts
export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_CONFFILE=/home/spi/installQt/tslib-arm/etc/ts.conf
export TSLIB_CONSOLEDEVICE=none
If i try to run the application like this "./app -qws" nothing happen and "SEGV" appear in the terminal.
When running the old ts_test, ts_calibrate they can use the touch screen.