Can't compile for any OS other than my own
Closed this issue · 5 comments
System Info
- Godot Version: 3.4
- Operating System: Windows
- Compilation Method: Trying to cross-compile for release; I'm doing
scons platform=osx
andscons platform=linux
Describe the bug
The command manages to run for a while, giving a bunch of warnings:
(osx example)
cl : Command line warning D9002 : ignoring unknown option '-g'
cl : Command line warning D9002 : ignoring unknown option '-O3'
cl : Command line warning D9002 : ignoring unknown option '-arch'
cl : Command line warning D9024 : unrecognized source file type 'x86_64', object file assumed
cl : Command line warning D9027 : source file 'x86_64' ignored
At some point it fails with
link /nologo -arch x86_64 /dll /out:demo\bin\osx-64\libgdsdk.dll /implib:demo\bin\osx-64\libgdsdk.lib /LIBPATH:lib discord_game_sdk.lib src\activities.obj src\core.obj src\discord.obj src\images.obj src\networking.obj src\relationships.obj src\users.obj src\util.obj src\activities\activity.obj src\activities\activity_assets.obj src\activities\activity_party.obj src\activities\activity_secrets.obj src\activities\activity_timestamps.obj src\activities\party_size.obj src\images\image_dimensions.obj src\images\image_handle.obj src\relationships\presence.obj src\relationships\relationship.obj src\users\user.obj
LINK : warning LNK4044: unrecognized option '/arch'; ignored
LINK : fatal error LNK1181: cannot open input file 'x86_64.obj'
scons: *** [demo\bin\osx-64\libgdsdk.dll] Error 1181
scons: building terminated because of errors.
To Reproduce
Use a platform other than the one you're building from in the scons command
Expected behaviour
It should compile binaries for the desired platform
Context
I normally dont build things myself, but the github actions artifacts have expired, so I had to do this, and I keep running into issues
Checklist
- I have checked for duplicate issues.
- I have provided a detailed description of the issue.
- I have provided reproduction steps (if applicable).
Cross compilation is not supported, I would recommend using the GitHub artefacts for releasing on other platforms.
I will rerun the GitHub actions build then make a release so they don't expire.
Oh that was a quick response, thanks!!!
Another question before closing this issue, will you port this to GDExtension once it replaces GDNative?
I will certainly try, however this project is due a rewrite anyway. I'm not sure how long that will take but once GDExtension is stable I'll start experimenting. (Thinking of maybe using C++ next time, should get around some headaches I've experienced)
Here is the release with all the artefacts:
https://github.com/LennyPhoenix/GodotDiscordSDK/releases/tag/gdnative-final
Hope this helps :)