Unsolved Qt Raspberry Pi cross compiling
-
Hi everyone
This question may be very common but i couldn't find any answer for it, I'm trying to cross compile qt for raspberry pi but i do make install, there's no qt5pi folder in /usr/local, what should i do, here is my configuration:
./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=$RPI_TOOLCHAIN -sysroot $RPI_SYSROOT -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -
Did you get an error message so far?
I am not sure if and when missing base path' are created. However you can start the make process and will get an error message.
On the other hand you can freely choose that complete path. Therefore, you can use another name or you can create it prior starting the make process. That strategy will prevent from waiting for some time until eventually an error message will pop up. -
I tried another tutorial from here,
https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/
Every thing was done without error but when I tried to compile my first program nothing happened so I added these line as recommended in:
https://medium.com/@amirmann/how-to-cross-compile-qt-for-raspberry-pi-3-on-linux-ubuntu-for-beginners-75acf2a078c
But now I get this error:
/home/pi/test: error while loading shared libraries: libGLESv2.so.2: cannot open shared object file: No such file or directory
22:34:50: Application finished with exit code 127.
When will these error finish, I'm really hopeless. -
Can anyone help me with this, I recompiled every thing again but nothing changed, I added some more steps as was suggested in a forum like this:
mv sysroot/usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0 sysroot/usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0_backup ln -s sysroot/opt/vc/lib/libEGL.so sysroot/usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0 mv sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0_backup ln -s sysroot/opt/vc/lib/libGLESv2.so sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 ln -s sysroot/opt/vc/lib/libEGL.so sysroot/opt/vc/lib/libEGL.so.1 ln -s sysroot/opt/vc/lib/libGLESv2.so sysroot/opt/vc/lib/libGLESv2.so.2
Now the raspberry can find the libs but it gave me this error:
Segmentation Fault
What should I do now?
-
Are you trying to use some arbitrary EGL and GLES libs?
AFAIK you need libraries cross-compiled for the target platform. Therefore, if you intend to use standard libs compiled for your desktop linux, you will have no chance to get them to work.Begin of year I have tried to get an application working on RPI3. There were these libraries available in the RPI OS distro, but apparently they were not compatible and did not work. Attempts with other libs failed.
For the time being I gave up on this, because of different priorities. -
@koahnig So what exactly should I do?
-
@koahnig said in Qt Raspberry Pi cross compiling:
For the time being I gave up on this, because of different priorities.
-
Hello, you can follow my dedicated guide to cross-compile latest QT for any Raspberry Pi Mode or Version: https://github.com/abhiTronix/raspberry-pi-cross-compilers/blob/master/QT_build_instructions.md