| Summary: | Failure to build on arm64-apple-darwin (ARM macOS Big Sur) | ||
|---|---|---|---|
| Product: | SDL | Reporter: | fxcoudert |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.12 | ||
| Hardware: | x86 | ||
| OS: | Other | ||
This is fixed for the 2.0.14 release, thanks! |
SDL 2.0.12 fails to build on macOS Big Sur for ARM (Apple Silicon). When trying to build, I get: In file included from /private/tmp/sdl2-20201108-12176-1btpgc2/SDL2-2.0.12/src/render/opengles/SDL_render_gles.c:27: include/SDL_opengles.h:33:10: fatal error: 'GLES/gl.h' file not found #include <GLES/gl.h> ^~~~~~~~~~~ The reason lies in the configure.ac code, which assumes that arm*-darwin* is the same as iOS. This was true before, but now more specific checks are needed. This happens in two places: # libusb does not support iOS arm*-apple-darwin* | *-ios-* ) skiplibusb=yes ;; and arm*-apple-darwin*|*-ios-*) ARCH=ios which sets ARCH to ios instead of macosx on ARM Big Sur. Removing the arm-darwin part in both cases (and regenerating configure) allows to successful compilation of SDL.