Solved Qt5.6.3 examples not being run with LinuxFB and evdev
-
Hi,
I am unable to run a few QtWidget examples by setting the PATH as it throws below error:
export PATH=/home/target/ti-processor-sdk-linux-rt-am335x-evm-05.03.00.07/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/local/Qt-5.6.3/bin:$PATH
qtbase/examples/widgets/animation/animatedtiles:-
root@target:~/widgetapps# ./animatedtiles -platform linuxfb -plugin evdevtouch
./animatedtiles: relocation error: ./animatedtiles: symbol _ZN14QGraphicsSceneC1EffffP7QObject, version Qt_5 not defined in file libQt5Widgets.so.5 with link time referenceqtbase/examples/widgets/scroller/graphicsview:
root@target:~/widgetapps# ./graphicsview -platform linuxfb -plugin evdevtouch
./graphicsview: relocation error: ./graphicsview: symbol _ZN4QPenC1ERK6QBrushfN2Qt8PenStyleENS3_11PenCapStyleENS3_12PenJoinStyleE, version Qt_5 not defined in file libQt5Gui.so.5 with link time referenceqtbase/examples/widgets/gestures/imagegestures:-
root@target:~/widgetapps# ./imagegestures -platform linuxfb -plugin evdevtouch
./imagegestures: relocation error: ./imagegestures: symbol _ZN8QPainter6rotateEf, version Qt_5 not defined in file libQt5Gui.so.5 with link time referencecross compiled Qt gcc version: 7.2.1
Target gcc version: 7.3.0Do I need to set LD_LIBRRAY_PATH explicitly as a few examples are being run successfully without setting the same? Any suggestions are appreciated.
The above examples use evdev configuration by default but not tslib.
Is tslib preferred over evdev for Qt 5.6.3 use? If so, why is that?Best Regards,
Ramakanth -
@Ramakanth said in Qt5.6.3 examples not being run with LinuxFB and evdev:
Do I need to set LD_LIBRRAY_PATH
Yes, there is no need to set PATH. You clearly have more than one Qt version and the wrong one is used.
You can easily check which libs are in use doing:ldd animatedtiles
-
ldd animated tiles throws the output not a dynamic executable. Qt library being used to generate executable of the example program is configured with C++14.
Do we need to add CONFIG+=c++14 and QMAKE_CXXFLAGS += "-fno-sized-deallocation" to resolve the error?
All these relocation symbol errors are anything due to mismatch in Qt versions available on target and example program being compiled against.On the target, Qt 5.6.3 recipe is installed using Yocto meta-qt5 recipes.
On Ubuntu 16.04, Qt 5.6.3 is cross-compiled with TI sdk to generate the needed Qt libs.
Only difference being cross compiled Qt gcc version: 7.2.1 and Target Yocto gcc version: 7.3.0.Is there any scope of ABI-incompatibility for the example program being linked against and run on target? If so, how to resolve the same?
-
@Ramakanth said in Qt5.6.3 examples not being run with LinuxFB and evdev:
On Ubuntu 16.04, Qt 5.6.3 is cross-compiled with TI sdk to generate the needed Qt libs.
You have to use the cross compiled Qt on the target. Deploy your app properly to get a package with cross-compiled Qt libs.
See https://doc.qt.io/qt-5/linux-deployment.html -
@jsulm After resolving the configure options and patches to use the same build on host VM and target, Qt examples could be run on target. Thanks.