RPI Tests won't run "compare: command not found: integer expression expected"
I'm trying to run the demos on the Raspberry PI. It's building fine but with NOEGL and NOX11 When I try to run the test.sh I get the following errors:
pi@retropie:~/dev/gl4es $ ./tests/tests.sh
*******************
GLES1.1: glxgears
-------------------
error: unable to open display
./tests/tests.sh: line 71: [: ./tests/tests.sh: line 70: compare: command not found: integer expression expected
*******************
GLES1.1: StuntCarRacer
-------------------
error: unable to open display
./tests/tests.sh: line 71: [: ./tests/tests.sh: line 70: compare: command not found: integer expression expected
Btw, I wasn't able to install sudo apt install apitrace-gl-frontend as it throws not found error, but I installed the sudo apt install apitrace-gl-gui are those interchangeable?
The tests will only work with apitrace-gl. I guess the apitrace-gl-gui is only a front-end, not the real thing (plus, apitrace-gl will need a gl4es built with EGL and X11 to work). Also, without EGL and X11, the use of gl4es will be very limited, as the software/game will be responsible for creating the GLES context (this configuration is only really usefull for Android and Amiga, not sure it can be used on other platform).
Why can't you build it without NOEGL or NOX11?
I do not have X11 dependencies in my distribution. it has no X
pi@retropie:~/dev/gl4es $ sudo apt-get install apitrace-gl
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apitrace-gl
pi@retropie:~/dev/gl4es $ sudo apt-get install apitrace-gl-frontend
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apitrace-gl-frontend
My OS version is Stretch
Also since I probably should go with DispManX I would need to set LIBGL_FB=3. Shall I set it in test.sh or in the commandline ?
I'm still getting error: unable to open display when I set LIBGL_FB=3 in test.sh
test.sh just call apitrace. If it's not here, the script will not run. Without X11, what will work ? SDL games? Does you version of SDL create an GLES context using Dispmanx? Because if gl4es is able to use DispmanX (using LIBGL_FB=1), without EGL it will not be able to create the context. Without context, no 3D. LIBGL_FB=3 will need X11 to work (it create the buffer on an offscreen surface, and then blit it in a X11 window).
I use dispmanx to create a window and egl to create a surface and context like in this example library which works fine on my Xless distribution. https://github.com/cheery/dg/blob/master/src/dg.c
what shall I do to install apitrace? any clues?
Well, I don't think apitrace can be built without X11. But it doesn't mater. You should try to build SDLgears instead. It relies only on libGL so gl4es (I don't think it even use libGLU, unlike glxgears). I never tried this configuration (and I don't have a Pi to try it). You will need to create the context yourself for now. For the swapbuffer, I guess glXSwapBuffer should work.