Skip to content

macOS: Bonzomatic.app requires Rosetta (2) to be installed? #176

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

Closed
artkiver opened this issue Jul 5, 2023 · 4 comments
Closed

macOS: Bonzomatic.app requires Rosetta (2) to be installed? #176

artkiver opened this issue Jul 5, 2023 · 4 comments

Comments

@artkiver
Copy link

artkiver commented Jul 5, 2023

So the build instructions:

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ../
cmake --build .

Function A-OK for me. So much so that I was thinking, "hey maybe I'll create a MacPort".

However the Bonzomatic.app bundle (whether built from source or using one of the releases) wants Rosetta (2) to be installed (this would only be prompted on an Apple Silicon Mac which did not already have Rosetta [2] installed).

Are there some dependencies which are architecture specific? Perhaps we can improve upon that?

Thank you!

For reference the system with which I was testing:

macOS 13.4.1 22F82 arm64
Xcode 14.3.1 14E300c
@julien
Copy link
Contributor

julien commented Sep 12, 2023

Hey @artkiver,

I had the same issue and haven't taken the time to submit a pull request, but here's a patch you might want to try.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f3209c..d40d4ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,7 +50,12 @@ if (APPLE OR WIN32)
   ############################################################################
   # MacOS
   if (APPLE)
-    set(CMAKE_OSX_ARCHITECTURES x86_64)
+    if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
+      set(CMAKE_OSX_ARCHITECTURES x86_64)
+    elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64")
+      set(CMAKE_OSX_ARCHITECTURES arm64)
+    endif()
+
     set(CMAKE_FIND_FRAMEWORK LAST)
     set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14")
     set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")

@artkiver
Copy link
Author

Hey @artkiver,

I had the same issue and haven't taken the time to submit a pull request, but here's a patch you might want to try.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f3209c..d40d4ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,7 +50,12 @@ if (APPLE OR WIN32)
   ############################################################################
   # MacOS
   if (APPLE)
-    set(CMAKE_OSX_ARCHITECTURES x86_64)
+    if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
+      set(CMAKE_OSX_ARCHITECTURES x86_64)
+    elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64")
+      set(CMAKE_OSX_ARCHITECTURES arm64)
+    endif()
+
     set(CMAKE_FIND_FRAMEWORK LAST)
     set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14")
     set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")

I tested this and it seems to have done the trick! No more prompt for Rosetta(2) to be installed!

I can prep and submit a PR if you prefer?

@artkiver
Copy link
Author

Ah, nevermind! I see you already submitted a PR here!

#177

LGTM!

Thanks!

@artkiver
Copy link
Author

Merge 84ed5e7 closes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants