-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Fix osx m1 target path for .gdextension files #238
Conversation
Herm... ok so in #208 their compiliation
mine is:
Why this is the case... I'm not sure. I'm very unfamiliar with rust compilation. I do have rosetta installed, but I'm not sure if that changes things. Per this s/o answer, my default build target looks to be My knowledge is very limited here, so I don't know what system configuration would change the default target path, maybe the easiest thing here would be to wait until another M1 user comes along and breaks the tie 😅 or if there are other current M1 users that haven't run into this issue, then I guess my configuration is non-default. As far a checking for the system configuration so both paths could work successfully, I'm unsure how to go about that.. |
Ok, I believe the output dir path changes based on whether or not you specify the
So I believe this PR includes the correct (default) path. Unfortunately #208 did not post their full cargo build command - just the verbose output. This should be testable real quick on a different OS/architecture as well to confirm whether the path changes with the --target flag. |
3c2d611
to
416b1db
Compare
I don't think the original author explicitly called What do you get if you run |
For godot and dodge-the-creeps crate,
so no My architecture is arm64 (aarch64-apple-darwin), though I may be misunderstanding the question about "precise" |
Here is the output from
|
@mareksubocz in case you see this: As you encountered the original issue #208, could you maybe comment on your architecture as well? |
If I'm not mistaken, wasn't 208 largely caused by the lack of
because just having
didn't work. As opposed to an incorrect path? In any case the path doesn't appear to be consistent depending on build environment/command, and it would seem odd to me if the default path for arm64 was different than other architectures, apart from the fact that it's Tier 2 my googling hasn't yielded any hints as to why it would be different. I am curious if this is it's possible to get the longer path on other machines e.g. |
If you set the default target inisde the |
Any more ideas on how to proceed here? We need a way to support both setups. Changing it back will likely just break things again for other users. |
@Bromeon include the target triplet in all paths and add a README that instructs people to always build with a target specified. Either via |
It may be hard to set a definitive target triplet in the configuration file though because I don't think the rust target triples map 1:1 with the gdext "xxx.release =" configurations. At least, there are much more potential hosts than godot configuration options - but I'm not full aware of how this is handled on the gdext side. Using default path without the target triple specified seems fine here imo. Could add something to the readme if needed. I believe we have confirmed here that this is not a mac specific issue though - it's just that the fix that came from the #208 mac issue was from a user with a non-default configuration. So at a minimum here the m1 path should be made consistent with other architectures. |
Makes sense 👍 @jrockett6 could you add a note/comment in the ReadMe that mentions the aarch64 config, so that this information is not lost? The macos.debug.arm64 = "res://../../target/aarch64-apple-darwin/debug/libitest.dylib"
macos.release.arm64 = "res://../../target/aarch64-apple-darwin/release/libitest.dylib" |
416b1db
to
f1a7376
Compare
Ok I updated the readme, but now I realize that the change may be redundant with the paragraph above:
So let me know what you think, I can revert the readme change and just add a code block example to the |
Should be good as-is. Thanks! bors r+ |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page.
|
My dylib path for M1 is different. This may be something specific to my system configuration, but I wanted to open this just in case something has changed since the example was made. Feel free to ignore.