Unsolved Problem with executing cross-compiled QT application in beaglebone, libstdc++.so.6 correct version not found
-
@SGaist hi
the problem is solved. It is just that the libstdc++ on BBB has a different version from the one on my host pc. I simply copy the correct one to BBB and link to it.But now has another problem. It said it can not find platform plugin "eglfs" in "". And different from what I google, people who has this error has one more message of "The available platform is :......" . But my error doesn't list the available platform. Does it mean that I don't have any platform that can be used?
I looked at the path/to/QT/plugins/platforms/, and there is no something related to eglfs, only libqlinuxfb.so
when configuring the qt, I have the argument ./configure -qt-xcb.
What should I ?
Thanks
-
Well, configure for eglfs then. Pass -qt-xcb means that you are building the xcb backend which requires an Xorg server running on your device.
-
@SGaist hi
I first try 'sudo apt-get install libgles2-mesa-dev libgles2-mesa'.
then I try to reconfigiure with after confclean:
...(the same as previous post).. -no-xcb -opengl es2 -eglfs
But I get the error that said openGL test failed, and 'the eglfs was enabled´, but the pre-condition feature.egl failed'
I realized that it could not find the libglesv2.so. But the thing is, I don't even have libglesv2.so in my sysroot/usr/lib!!
I download the sysroot from https://releases.linaro.org/components/toolchain/binaries/latest/arm-linux-gnueabihf/
How can I get a libglesv2.so?
Or is there any other sysroot that I can use for QT5.8?
Bests
-
Usually the constructor of your device provides the necessary hooks in order to access the GPU on their hardware.
-
@SGaist hi
Ok. So on BBB I found the libqeglfs.so in /usr/lib/arm-linux-guneabihf/qt5/plugins/platforms/. What exactly should I do then?
I guess instead of using the sysroot from linaro website. I mount the / of BBB to my host PC and use that as a sysroot when doing the configuration.
Let's say I mount the / to /mnt/bbb of my host
sudo sshfs debian@192.168.7.2:/ /mnt/BBB
Is it correct then to to modify the qmake.conf
QMAKE_INCDIR_EGL = /mnt/BBB/usr/include
QMAKE_LIBDIR_EGL = /mnt/BBB/usr/libsave qmake.conf.
Then run configure as :
./configure -platform linux-g++ -xplatform linux-arm-gnueabi-g++ -release -device linux-beagleboard-g++ -sysroot /mnt/BBB -prefix /opt/Qt5.8-arm/ -device-option CROSS_COMPILE=/opt/pliARMtoolchain/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -nomake tests -nomake examples -no-xcb -opengl es2 -eglfs
then it gies en error:
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/pli/Downloads/qt-everywhere-opensource-src-5.7.0/qtbase/mkspecs/linux-g++.I can find the libGLESv2.so in /mnt/BBB/usr/lib/arm-linux-gnueabihf/. And I already 'sudo apt-get install libgles2-mesa-dev libgles2-mesa', so please guide me how I should find the OPEN GL es2 header and library, from sysroot or from the host?
Thanks!
-
You should use the verbose mode to get the exact error matching the functionality test for OpenGL ES 2.0.
-
@SGaist said in Problem with executing cross-compiled QT application in beaglebone, libstdc++.so.6 correct version not found:
You should use the verbose mode to get the exact error matching the functionality test for OpenGL ES 2.0.
hi
here is the result
I have been searching the headers, but on BBBI only found /usr/include/GL/gl.h, not gl2.h!
THe BBB image is Debian 8.7 2017-03-19 4GB SD LXQT which is available on beaglebone.org.
I have tried to use the SGX driver by following the instruction here http://elinux.org/BeagleBoardDebian#Debian_8_.28jessie.29 (SGX section)
After that I have the libGLESv2.so, but I don't have the headers!
Best
/Peilang -
THe problem is solved by installing libgles-mesa-dev, then I got the folder of GLES2.
ANd finally the ./configure work very well witout error.
But then there is error when doing make:
I used to use toolchain and sysroot from linaro website. And there is no make error.But that is because the sysroot from linaro doesn't support opengl es2, and that is why I mount the BBB as sysroot instead. And now the configuration with -opengl es2 work, but during make there seems to be some conflict.
/Peilang
-
Can you give more details about the conflicts ?
-
@SGaist hi
I uploaded the pictures but seems it is not loaded.
But anyway, the problem is caused by the toolchain that I used, which has a version of 6.3.1. While the BBB has a gcc version of 4.9. So I download the toolchain with gcc4.9 and I success the run make without error.
However, when I try to run the application on the BBB and show it on a touch screen, there is the error:
"
EGL error: could not create the egl surface : error = 0x300b
Aborted
"But if I unset the LD_LIBRARY_PATH, the application can run, and show in the display. But then it wouldn't find the lib from QT.
I guess it is needed to set LD_LIBRARY_PATH, and thus I need to fix the error above.
Any clue?
And thanks again for the guide, you are very helpful and save me a lot of time on blindly goolging.
/Peilang
-
The upload feature is currently broken. See here for a guide on how to share an image.
IIRC, you have a Mali GPU on that device, did you check that you have the matching libraries installed ?
-
@SGaist said in Problem with executing cross-compiled QT application in beaglebone, libstdc++.so.6 correct version not found:
Mali GPU
hi
Can you give more detail on how I can check the library for Mali? I don't know anything about Mali...
Here is the output of ldd comamnd when LD_LIBRARY_PATH is EXPORTED (the app can NOT run because of the EGL error):
Here is the output of ldd comamnd when LD_LIBRARY_PATH is UNSET (the app can run WITHOUT the EGL error):
But what library am I looking at? Thanks.
This is how it looks with the EGL error:
(Is it because I have not fixed the first two warning yet?)
I also have a second question, I found out that I need to put my source files (.cpp .h and .pro) inside the /qtbase/example on my host PC in order to build and run the app without the EGL error (of cause this is when LD_LIBRARY_PATH is unset). And also need to add:
target.path = $$[QT_INSTALL_EXAMPLES]/mySource/
INSTALLS += targetin the .pro file.
If I put my source file elsewhere outside the /qtbase/examples/, I can build, but the app will have the EGL error.
The output from "qmake -query QT_INSTALL_EXAMPLES" is:
/home/pli/BBB/home/debian/Qt5.8-arm/examples(/home/pli/BBB is where I mount the BBB via sshfs)
I don't find the 'examples' folder under Qt5.8-arm.
So I have no idea what is wrong here that I have to build the code inside the /qtbase/examples.
Thanks.