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

GDNative lib ignores arm64 macos architecture #48959

Closed
DrMoriarty opened this issue May 22, 2021 · 8 comments
Closed

GDNative lib ignores arm64 macos architecture #48959

DrMoriarty opened this issue May 22, 2021 · 8 comments

Comments

@DrMoriarty
Copy link
Contributor

Godot version:

Godot 3.3.1-stable

OS/device including version:

MacOSX 10.15.7 (19H2)

Issue description:

I have this gdnlib file:

[general]

singleton=true
load_once=true
symbol_prefix="gamecenter_"
reloadable=false

[entry]

OSX.64="res://addons/gamecenter-osx/libgamecenter_universal.dylib"
OSX.arm64="res://addons/gamecenter-osx/libgamecenter_universal.dylib"

[dependencies]

OSX.64=[  ]
OSX.arm64=[  ]

When I open this file in Godot I see:
Снимок экрана 2021-05-22 в 13 37 33

I can add arm64 manually (then arm64 lib appeared in editor):
Снимок экрана 2021-05-22 в 13 38 44

When I exit from Godot and open this project again the arm64 library again disappears.

Steps to reproduce:
Just try to use GDNative library on MacOS with arm64 architecture.

Minimal reproduction project:

@Xrayez
Copy link
Contributor

Xrayez commented May 22, 2021

I think it's a feature which is currently not implemented yet in GDNative (see also #39943).

@DrMoriarty
Copy link
Contributor Author

@naithar @bruvzg Hi! Do you know if anybody is working on this feature? I want to implement it but it may be faster to collaborate with someone.

@bruvzg
Copy link
Member

bruvzg commented May 22, 2021

Single OSX.64 entry with the universal library should work on both Intel and M1 macs.

And adding separate arm64 and x86-64 to the editor UI, should be as easy as changing these lines

platform_osx.entries.push_back("64");
platform_osx.entries.push_back("32");
32 can be removed, and 64 probably can be renamed to universal.

@bruvzg
Copy link
Member

bruvzg commented May 22, 2021

And adding separate arm64 and x86-64 to the editor UI, should be as easy as
32 can be removed, and 64 probably can be renamed to universal.

I have these changes as part of #46866 / #46860 PRs, which also add support for GDNative framework.

@naithar
Copy link
Contributor

naithar commented May 22, 2021

@naithar @bruvzg Hi! Do you know if anybody is working on this feature? I want to implement it but it may be faster to collaborate with someone.

Using a single universal .dylib file in any configuration should probably be enough for most cases, since macOS doesn't use same architecture for different targets, unlike iOS, where both device and simulator use arm64.

@DrMoriarty
Copy link
Contributor Author

Thank you! Using OSX.64 was enough to build fat binary with arm64.

@aaronfranke
Copy link
Member

aaronfranke commented May 24, 2021

@bruvzg Note: It's x86_64 not x86-64. Your PRs are correct though.

@akien-mga
Copy link
Member

akien-mga commented Feb 22, 2023

This was fixed by #46860.

@akien-mga akien-mga modified the milestones: 4.0, 3.4 Feb 22, 2023
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

6 participants