Skip to content
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

[bug] Missing watchOS arm64 architecture #213

Open
djavan-bertrand opened this issue Aug 12, 2024 · 1 comment
Open

[bug] Missing watchOS arm64 architecture #213

djavan-bertrand opened this issue Aug 12, 2024 · 1 comment
Assignees
Labels

Comments

@djavan-bertrand
Copy link

Describe the bug
When building for watchOS (WATCHOS or WATCHOSCOMBINED) and using the lib in Xcode, the Xcode build fails because architecture arm64 is not found.

To Reproduce
Steps to reproduce the behavior:

  1. Build using WATCHOS platform flag
  2. Embed the dylib in a xcframework
  3. Use this xcframework in a Apple Watch target in Xcode.

=> Xcode fails with undefined symbols and a warning:

ignoring file 'PATH/MY_LIB.dylib': fat file missing arch 'arm64', file has 'armv7k,arm64_32'

Expected behavior
The Xcode build should succeed

Solution found
Even though I am not sure it is the correct way to do so, here is how I fixed this bug:
I replaced line 450 of the ios.toolchain.cmake script with:

set(ARCHS arm64 armv7k arm64_32)

(instead of set(ARCHS armv7k arm64_32))
If it is the correct way, do not hesitate to tell me, I can submit a PR for you.

Environment

  • CMAKE: 3.29.2
@leetal
Copy link
Owner

leetal commented Nov 19, 2024

Thanks for reporting this, albeit a late response from me, but I struggle to find any references if apple have changed/added the arm64 architecture to the platform. At least previously the only available 64 bit arm arch was the 32 bit pointer+64 bit registers variant arm64_32…

Had you any simulator slices added to the xcframework? Because I really think that arm64 is not a strict requirement (I even think it would be bad since full arm64 consumes more RAM than arm64_32… so why would they want to change that?)

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

No branches or pull requests

2 participants