Closed satyajitghana closed 3 years ago
Are you trying to use the GPUDelegate ? Unfortunately, GPUDelegate requires OpenGLES 3.1 or higher, but RPi3 doesn't support it.
Could you retry without GPUDelegate:
make -j4 TARGET_ENV=raspi
Are you trying to use the GPUDelegate ? Unfortunately, GPUDelegate requires OpenGLES 3.1 or higher, but RPi3 doesn't support it.
Could you retry without GPUDelegate:
make -j4 TARGET_ENV=raspi
yeah I tried to compile "without" GPUDelegate, but it didn't work.
make -j4 TARGET_ENV=raspi
is the command that gave me linker errors at the end.
something to note: if I use TARGET_ENV=raspi4 then I am able to successfully link everything and I get the target executable, but the application doesn't work, black screen, with errors that JPEG is not supported for raspi camera.
I'm not sure your RPi3's OpenGLES environment but if your RPi3 doesn't have OpenGL driver with full KMS, please enable it.
please refer: https://raspberrypi.stackexchange.com/questions/75071/running-modern-opengl-on-raspberry-pi
I've enabled full KMS, not sure if it was disabled before. i followed this: https://raspberrypi.stackexchange.com/questions/75071/running-modern-opengl-on-raspberry-pi , glxgears
works.
with make -j4 TARGET_ENV=raspi
i still get the linking error.
with make -j4 TARGET_ENV=raspi4
the linking error is gone but i get: ERR: camera_capture.c(87): pixformat(JPEG) is not supported
hmm, could you try to launch the app with -x
option like below ?
$ make -j4 TARGET_ENV=raspi4
$ ./gl2handpose -x
yep, ./gl2handpose -x
works ! i tried other examples as well, they work too !
so this is to do something with the camera ?
OK.
-x
option just disables the camera.
next, could you try blow?
$ sudo apt-get install v4l-utils
$ v4l2-ctl --set-fmt-video=width=640,height=480,pixelformat=YUYV --set-parm=30
$ ./gl2handpose
yup, that's working now !
great. Does the problem solved ?
Just in case, please tell me which libraries does your app link to. Could you copy and paste the result of below command ?
$ ldd gl2handpose
yes, problem is solved
pi@raspberrypi:~/work/tflite_gles_app/gl2handpose $ ldd gl2handpose
linux-vdso.so.1 (0x7ed57000)
/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0x76f9b000)
libEGL.so.1 => /usr/lib/arm-linux-gnueabihf/libEGL.so.1 (0x76f63000)
libGLESv2.so.2 => /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 (0x76f44000)
libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0x76e22000)
libdrm.so.2 => /usr/lib/arm-linux-gnueabihf/libdrm.so.2 (0x76e03000)
libtensorflowlite.so => /home/pi/lib/libtensorflowlite.so (0x76b30000)
libtensorflowlite_gpu_delegate.so => /home/pi/lib/libtensorflowlite_gpu_delegate.so (0x767c3000)
libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x7667c000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x765fa000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x765cd000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x765a3000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76455000)
libGLdispatch.so.0 => /usr/lib/arm-linux-gnueabihf/libGLdispatch.so.0 (0x763d6000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x763c3000)
/lib/ld-linux-armhf.so.3 (0x76fb0000)
libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0x76394000)
librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x7637d000)
libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0x7636a000)
libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0x76355000)
libbsd.so.0 => /usr/lib/arm-linux-gnueabihf/libbsd.so.0 (0x7632d000)
Thanks. it looks fine.
I was trying to build the examples in my raspberry pi 3, but i got this error:
I can confirm that i've installed all the required libraries, followed the guide from here: https://github.com/terryky/tflite_gles_app#23-build-for-armv7l-linux-raspberry-pi
also installed:
sudo apt install libgles2-mesa-dev libegl1-mesa-dev xorg-dev mesa-common-dev