-
-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mgba 0.10.0 build failure on apple m1 #2700
Comments
Please give me your CMakeCache.txt. It builds fine on M1 with the right flags. |
It's worth noting that BUILD_GL, the define gating using that function, is forced off if the SDK is 10.14 or newer. Which Includes the M1 SDK. Not really sure how you wound up with it enabled. |
I see the problem. You're relying on libepoxy. You shouldn't do that on macOS; that's only needed on Windows. |
ok, let me give that a try. |
If you want to keep epoxy, please test this patch: diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce8e4d687..a8116d3ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -718,8 +718,13 @@ if (USE_LZMA)
endif()
if(USE_EPOXY)
- list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gl.c ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gles2.c)
- list(APPEND FEATURE_DEFINES BUILD_GL BUILD_GLES2 BUILD_GLES3)
+ if(APPLE AND MACOSX_SDK VERSION_GREATER 10.14)
+ list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gles2.c)
+ list(APPEND FEATURE_DEFINES BUILD_GLES2 BUILD_GLES3)
+ else()
+ list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gl.c ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gles2.c)
+ list(APPEND FEATURE_DEFINES BUILD_GL BUILD_GLES2 BUILD_GLES3)
+ endif()
list(APPEND FEATURES EPOXY)
include_directories(AFTER ${EPOXY_INCLUDE_DIRS})
link_directories(${EPOXY_LIBRARY_DIRS}) which I will commit upstream if it works. |
yeah, that build patch works for me, I also added the lua and libelf dependencies |
I'll commit a variant of it then. Gimme a sec. |
I've cherry-picked the patch into 0.10.1, so it'll be in the next stable release. |
Sounds good, thanks! |
Got some build failure as follows when trying to build on apple m1
relates to Homebrew/homebrew-core#112961
The text was updated successfully, but these errors were encountered: