mesonbuild / mesonbuild/mesonwrap

SDL 2 wrap fails to build on Windows / MinGW64

Open
#146 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
26
Forks
7
PR merge metrics
No merged PRs in 30d

Description

It seems SDL2 requires GLES2 and EGL headers, which aren't provided by the MinGW64 toolchain:

```
In file included from ../subprojects/SDL2-2.0.12/src/render/opengles2/SDL_render_gles2.c:27:
..\subprojects\SDL2-2.0.12\include/SDL_opengles2.h:35:10: fatal error: GLES2/gl2platform.h: No such file or directory
#include
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

[...]

[11/175] Compiling C object subprojects/SDL2-2.0.12/libsdl2.dll.p/src_render_direct3d_SDL_render_d3d.c.obj
FAILED: subprojects/SDL2-2.0.12/libsdl2.dll.p/src_render_direct3d_SDL_render_d3d.c.obj
"gcc" "-Isubprojects\SDL2-2.0.12\libsdl2.dll.p" "-Isubprojects\SDL2-2.0.12" "-I..\subprojects\SDL2-2.0.12" "-Isubprojects\SDL2-2.0.12\include" "-I..\subprojects\SDL2-2.0.12\include" "-I..\subprojects\SDL2-2.0.12\src\hidapi\hidapi" "-fdiagnostics-color=always" "-pipe" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-Wextra" "-Wpedantic" "-g" -MD -MQ subprojects/SDL2-2.0.12/libsdl2.dll.p/src_render_direct3d_SDL_render_d3d.c.obj -MF "subprojects\SDL2-2.0.12\libsdl2.dll.p\src_render_direct3d_SDL_render_d3d.c.obj.d" -o subprojects/SDL2-2.0.12/libsdl2.dll.p/src_render_direct3d_SDL_render_d3d.c.obj "-c" ../subprojects/SDL2-2.0.12/src/render/direct3d/SDL_render_d3d.c
In file included from ../subprojects/SDL2-2.0.12/src/render/direct3d/../../video/windows/../SDL_egl_c.h:28,
from ../subprojects/SDL2-2.0.12/src/render/direct3d/../../video/windows/SDL_windowsopengles.h:29,
from ../subprojects/SDL2-2.0.12/src/render/direct3d/../../video/windows/SDL_windowsvideo.h:47,
from ../subprojects/SDL2-2.0.12/src/render/direct3d/SDL_render_d3d.c:37:
..\subprojects\SDL2-2.0.12\include/SDL_egl.h:29:10: fatal error: EGL/egl.h: No such file or directory
#include
^~~~~~~~~~~
compilation terminated.
[12/175] Compiling C object subprojects/SDL2-2.0.12/libsdl2.dll.p/src_render_direct3d_SDL_shaders_d3d.c.obj
ninja: build stopped: subcommand failed.
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the Windows/MinGW64 build and start with the missing-header includes in subprojects/SDL2-2.0.12/include/SDL_opengles2.h and SDL_egl.h. Inspect the SDL2 wrap and its build inputs to determine how the GLES2 and EGL headers are supplied; done means the wrap builds successfully without these fatal errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.