godot: Cross compilation for Windows fails OpenSUSE Leap 42.2 64bit
Issue Resolved
If you are running openSUSE leap in any form, download the packages below for 32bit and 64bit compilation.
mingw32-cross-gcc
mingw32-cross-gcc-c++
mingw64-cross-gcc
mingw64-cross-gcc-c++
System and Version Info OS: OpenSUSE Leap 42.2 64 bit Godot version: 19aff15
Issue description: Cross-Compiling Windows binaries on linux fails
Upon using this command scons p=windows bit=64 tools=no
I get the following output and subsequent error(s?).
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
[ 3%] Compiling ==> platform/windows/godot_win.cpp
sh: i686-w64-mingw32-g++: command not found
scons: *** [platform/windows/godot_win.windows.debug.64.o] Error 127
scons: building terminated because of errors.
Upon verifying that my mingw32 and mingw-w64 libs were setup correctly I got the correct error returns,
traindoctor@linux:~/workspace/godot> ${MINGW64_PREFIX}gcc
gcc: fatal error: no input files
compilation terminated.
traindoctor@linux:~/workspace/godot> ${MINGW32_PREFIX}gcc
gcc: fatal error: no input files
compilation terminated.
The specific error I get when binding an env variable to the MINGW32_PREFIX
or MINGW64_PREFIX
looks like this;
sh: /usr/i686-w64-mingw32-g++: No such file or directory
scons: *** [platform/windows/godot_win.windows.debug.64.o] Error 127
scons: building terminated because of errors.
I have downloaded the mingw32 and mingw-w64 packages for openSUSE from these sources: mingw-32 mingw-w64
Steps to reproduce:
Install all required packages on OpenSUSE 42.2 Leap for godot including the packages for mingw32 and mingw-w64.
Build the Linux binaries for the initial build.
Attempt to build the binaries for Windows using the command above.
Reference to documentation.
Note: I will not be available to answer questions tomorrow as I am traveling soon.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 15 (9 by maintainers)
I’m trying to find versions of the compatible with openSUSE leap. Other than this appreciate the help. EDIT: Nevermind I was messing myself up by changing c++ to g++ EDIT 2: IT LIVES HOORAYYY
BTW, no need to mess with the PATH or prefixes; the required binaries should be in
/usr/bin
, which should be in your PATH already (if not, your system will break apart 😉). A “not found” error typically means that a package is missing.Install mingw32-cross-gcc-c++.
The platform validation code should likely check for both -gcc and -g++ before marking the windows platform as buildable.