-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
Build error with MSYS2/mingw64, uses wrong path to windres.exe #40286
Comments
Do you have |
How to print the compiled command information? |
You can run The problem seems to be that MSYS2 installs mingw-w64 binutils binary without a prefix: https://packages.msys2.org/package/mingw-w64-x86_64-binutils
While at least on Linux, mingw64 installs its binaries with a prefix:
The relevant code is here: godot/platform/windows/detect.py Lines 49 to 58 in 2921827
godot/platform/windows/detect.py Lines 81 to 98 in 2921827
If you define But the |
successed. Thanks. |
It's still a bug that it doesn't work out of the box. |
@Atem1995 in #49212 seems to have the same issue #49212 (comment), with this error log:
Apparently a 32-bit version of windres was used to build |
@Atem1995 Can you check if this workaround works for you too #40286 (comment)? For the record, this seems to be a packaging bug in MSYS2: |
|
@akien-mga This is odd because it compiles successed when I don't specify target.But error when I specified the target **b"C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input file `platform\windows\godot_res.windows.opt.tools.64.o' is incompatible with i386:x86-64 output\r\ncollect2.exe: error: ld returned 1 exit status\n"**This error message is also very strange. |
Seems like Scons do not like MSYS "Unix" paths, so that's not going to work (at least without some hacks). And 32-bit windres do not have 64-bit platform support. Also, I can't reproduce the issue, MSYS is always picking the correct executable, unless you are trying to build 64-bit Godot from |
With a few hacks it's possible to get MSYS path, but I'm not sure how useful it is (also needs testing on other MinGW distros) - #58473 |
Godot version:
git master branch。
OS/device including version:
windows 1903; msys2 - mingw64;
Issue description:
build error.
Steps to reproduce:
Minimal reproduction project:
The text was updated successfully, but these errors were encountered: