Buildroot for Raspberry pi3 with SDL2 2.0.6 fails

Hi all,

I try to build a Raspberry Pi 3 image with SDL2 2.0.6 and it is fails here:

/home/mrx/buildroot/output/build/sdl2-2.0.6/src/video/raspberry/SDL_rpivideo.c: In function 'RPI_Create':
/home/mrx/buildroot/output/build/sdl2-2.0.6/src/video/raspberry/SDL_rpivideo.c:126:39: error: 'RPI_GLES_DefaultProfileConfig' undeclared (first use in this function)
     device->GL_DefaultProfileConfig = RPI_GLES_DefaultProfileConfig;
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mrx/buildroot/output/build/sdl2-2.0.6/src/video/raspberry/SDL_rpivideo.c:126:39: note: each undeclared identifier is reported only once for each function it appears in
/home/mrx/buildroot/output/build/sdl2-2.0.6/src/video/raspberry/SDL_rpivideo.c: In function 'RPI_CreateWindow':
/home/mrx/buildroot/output/build/sdl2-2.0.6/src/video/raspberry/SDL_rpivideo.c:281:15: error: 'SDL_VideoDevice {aka struct SDL_VideoDevice}' has no member named 'egl_data'; did you mean 'gl_data'?
     if (!_this->egl_data) {
               ^~
/home/mrx/buildroot/output/build/sdl2-2.0.6/src/video/raspberry/SDL_rpivideo.c:286:10: error: 'SDL_WindowData {aka struct SDL_WindowData}' has no member named 'egl_surface'
     wdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) &wdata->dispman_window);
          ^~
/home/mrx/buildroot/output/build/sdl2-2.0.6/src/video/raspberry/SDL_rpivideo.c:286:26: warning: implicit declaration of function 'SDL_EGL_CreateSurface' [-Wimplicit-function-declaration]
     wdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) &wdata->dispman_window);
                          ^~~~~~~~~~~~~~~~~~~~~
/home/mrx/buildroot/output/build/sdl2-2.0.6/src/video/raspberry/SDL_rpivideo.c:288:14: error: 'SDL_WindowData {aka struct SDL_WindowData}' has no member named 'egl_surface'
     if (wdata->egl_surface == EGL_NO_SURFACE) {
              ^~
make[2]: *** [build/SDL_rpivideo.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/mrx/buildroot/output/build/sdl2-2.0.6/.stamp_built] Error 2
make: *** [_all] Error 2

Is there anybody here who has the same issue?
Looking forward to your answers.

I don’t know buildroot and a quick look at the errors kind of means that the configure script didn’t detect the EGL headers. The test only checks in the default paths. You may be able to fix it if you add the broadcom include directory to the default search paths.