We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5342 - Failure to build on arm64-apple-darwin (ARM macOS Big Sur)
Summary: Failure to build on arm64-apple-darwin (ARM macOS Big Sur)
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: 2.0.12
Hardware: x86 Other
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-08 15:24 UTC by fxcoudert
Modified: 2020-11-12 03:32 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fxcoudert 2020-11-08 15:24:07 UTC
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.
Comment 1 Sam Lantinga 2020-11-12 03:32:59 UTC
This is fixed for the 2.0.14 release, thanks!