About Monkey 2 › Forums › Monkey 2 Programming Help › Compile problems with itch.io on Windows 10
This topic contains 8 replies, has 4 voices, and was last updated by
Amon
4 months, 1 week ago.
-
AuthorPosts
-
December 1, 2018 at 1:58 am #15642
Anyone any ideas why I can’t compile? This is an error I get after a fresh download from itch.io, just trying to compile a banana:
Monkey1234567891011121314151617181920212223242526272829303132`Mx2cc version 1.1.15***** Making app 'e:/Monkey2/bananas/calculator/calculator.monkey2' (windows debug x86 gcc mx) *****Parsing...Semanting...Translating...Compiling...Build error: System command failed:g++ -c -std=c++11 -D_WIN32_WINNT=0x0603 -m32 -O2 -I"e:/Monkey2/modules/" -I"e:/Monkey2/modules/monkey/native" -I"e:/Monkey2/bananas/calculator/" -I"e:/Monkey2/modules/litehtml/litehtml/include/" -I"e:/Monkey2/modules/freetype/freetype-2.6.3/include/" -I"e:/Monkey2/modules/openal/openal-soft/include/" -I"e:/Monkey2/modules/sdl2/SDL/include/" -I"e:/Monkey2/modules/zlib/zlib-1.2.11/" -DBB_THREADS=1 -I"e:/Monkey2/bananas/calculator/calculator.buildv1.1.15/windows_debug_mx/build/" -MMD -MF"e:/Monkey2/bananas/calculator/calculator.buildv1.1.15/windows_debug_mx/build/r5b58089e.cpp_r.deps" -o "e:/Monkey2/bananas/calculator/calculator.buildv1.1.15/windows_debug_mx/build/r5b58089e.cpp_r.o" "e:/Monkey2/bananas/calculator/calculator.buildv1.1.15/windows_debug_mx/include/_r.cpp"In file included from e:/Monkey2/modules/monkey/native/bbmonkey.h:5:0,from e:/Monkey2/bananas/calculator/calculator.buildv1.1.15/windows_debug_mx/include/_r.cpp:2:e:/Monkey2/modules/monkey/native/bbstd.h:23:0: warning: "__forceinline" redefined#define __forceinline inline __attribute__((always_inline))In file included from e:/Monkey2/devtools/i686-6.2.0-posix-dwarf-rt_v5-rev1/mingw32/i686-w64-mingw32/include/crtdefs.h:10:0,from e:/Monkey2/devtools/i686-6.2.0-posix-dwarf-rt_v5-rev1/mingw32/i686-w64-mingw32/include/stdio.h:9,from e:/Monkey2/devtools/i686-6.2.0-posix-dwarf-rt_v5-rev1/mingw32/lib/gcc/i686-w64-mingw32/6.2.0/include/c++/cstdio:42,from e:/Monkey2/modules/monkey/native/bbstd.h:12,from e:/Monkey2/modules/monkey/native/bbmonkey.h:5,from e:/Monkey2/bananas/calculator/calculator.buildv1.1.15/windows_debug_mx/include/_r.cpp:2:e:/Monkey2/devtools/i686-6.2.0-posix-dwarf-rt_v5-rev1/mingw32/i686-w64-mingw32/include/_mingw.h:257:0: note: this is the location of the previous definition#define __forceinline inline __attribute__((__always_inline__))***** Fatal mx2cc error *****Internal mx2cc build error`I wonder if it’s something to do with a hard drive I had to replace, maybe some old paths or something, but this is a fresh download from itch which I thought was self contained and should just work out of the box?
December 1, 2018 at 3:26 am #15643Did you try deleting all the build folders (including modules) and rebuilding everything? Kinda defeats the point of downloading binaries from itch.io, I know…
December 1, 2018 at 7:06 pm #15647I tried cloning the git repository and downloading mingw (from download page here) and doing a rebuild but the same message.
Also tried installing Visual Studio 2017 but having issues with that as well:
Monkey12345678910111213141516171819202122232425262728293031The system cannot find the path specified.E:\monkey2-git\scripts>echo off***** Rebuilding mx2cc *****Mx2cc version 1.1.09***** Making module 'monkey' (windows release x64 msvc) *****Parsing...Semanting...Translating...Compiling...The system cannot find the path specified.Build error: System command failed:cl -c -EHs -W0 -MT -utf-8 -bigobj -O2 -DNDEBUG -I"E:/monkey2-git/modules/" -I"E:/monkey2-git/modules/monkey/native" -showIncludes -Fo"E:/monkey2-git/modules/monkey/monkey.buildv1.1.09/windows_release_msvc_x64/build/monkey_0monkey.cpp.obj" "E:/monkey2-git/modules/monkey/monkey.buildv1.1.09/windows_release_msvc_x64/src/monkey_monkey.cpp" >tmp/stdout1.txtmonkey_monkey.cppMicrosoft (R) C/C++ Optimizing Compiler Version 19.16.27024.1 for x64Copyright (C) Microsoft Corporation. All rights reserved.***** Fatal mx2cc error *****Internal mx2cc build errorNot entirely sure what the “System cannot find the path specified.” All the version numbers and paths are correct in windows_env, and tmp/stdout doesn’t show any errors. Not sure what to do to fix/diagnose further.
VS is installed in C:\Program Files x86\Microsoft Visual Studio\2017
and Window Kits in C:\Program Files x86\Windows Kits\10
December 1, 2018 at 8:27 pm #15648Hi Peterigz,
This is what the visual studio settings for my env_windows looks like.
Monkey12345MX2_MSVC_DIR=${ProgramFiles(x86)}\Microsoft Visual Studio\2017\Professional\VCMX2_MSVC_TOOLS_DIR=${MX2_MSVC_DIR}\Tools\MSVC\14.16.27023MX2_WINDOWS_KITS_DIR=${ProgramFiles(x86)}\Windows Kits\10The second line is important.
Also, go to C:\Program Files (x86)\Windows Kits\10\bin and note down the latest version which starts with 10.0. My latest is 10.0.17763.0. When you have noted it down replace the existing one in your env_windows file. It looks like this below:
MX2_WINDOWS_KIT=10.0.17763.0
December 1, 2018 at 9:00 pm #15649Thanks Amon, yeah I’ve done all that but no joy. I’m pretty sure I’d either be getting “cl isn’t recognised as a command line” or “can’t find include file”, but it is running cl and stdout is showing that everything is including ok so that all seems ok. Something odd is up seeing as I can’t compile with either mingw or visual c. Here’s my windows_env file, which is pretty much default plus the version changes:
Lua123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187'Hyper experimental thread builds!'MX2_THREADS=1'Use MX2_USE_MSVC=1 to force use of msvc, or MX2_USE_MSVC=0 to force use of mingw. If MX2_USE_MSVC=1, msvc paths'below are used.''If MX2_USE_MSVC is not set (or blank) mx2cc will attempt to autodetect msvc and msvc paths.'MX2_USE_MSVC=1'Build architecture: x86 or x64, x64 only working with msvc.'MX2_ARCH_WINDOWS=x86'Semi-colon separated list of module root dirs, relative to MX2_HOME or absolute.''mx2cc always adds local modules/ dir to start of list.''MX2_MODULE_DIRS=modules;modules_ext'If you change anything below, you should rebuild all!'***** WINDOWS DESKTOP TARGET - MINGW *****'Note: Requires MinGW compilers+build tools, see: http://monkeycoder.co.nz/monkey2-files.''(Note: TDM GCC not recommended, as it uses SJLJ exceptions which are very slow)'PATH=${MX2_HOME}\devtools\i686-6.2.0-posix-dwarf-rt_v5-rev1\mingw32\bin;${PATH}'Need this to override installed mingw.'GCC_EXEC_PREFIX='Linker optionsMX2_LD_OPTS_WINDOWS=-s -static -m32MX2_LD_OPTS_WINDOWS_DEBUG=MX2_LD_OPTS_WINDOWS_RELEASE='C Compiler options. Note: -D_WIN32_WINNT=0x0601 means headers for Windows 7, ie: Windows 7 is min SDK!MX2_CC_OPTS_WINDOWS=-std=gnu99 -D_WIN32_WINNT=0x0603 -m32MX2_CC_OPTS_WINDOWS_DEBUG=-O2MX2_CC_OPTS_WINDOWS_RELEASE=-O3 -DNDEBUG'C++ Compiler optionsMX2_CPP_OPTS_WINDOWS=-std=c++11 -D_WIN32_WINNT=0x0603 -m32MX2_CPP_OPTS_WINDOWS_DEBUG=-O2MX2_CPP_OPTS_WINDOWS_RELEASE=-O3 -DNDEBUG'***** WINDOWS DESKTOP TARGET - MSVC *****'Note: these paths are only used if legacy MX2_USE_MSVC=1''If MX2_USE_MSVC is not set, mx2cc attempts to autodetect latest version of msvc and latest windows kit.'MX2_MSVC_DIR=${ProgramFiles(x86)}\Microsoft Visual Studio\2017\Community\VCMX2_MSVC_TOOLS_DIR=${MX2_MSVC_DIR}\Tools\MSVC\14.16.27023MX2_WINDOWS_KITS_DIR=${ProgramFiles(x86)}\Windows Kits\10MX2_WINDOWS_KIT=10.0.17763.0MX2_MSVC_PATH_X86=${MX2_MSVC_TOOLS_DIR}\bin\Hostx86\x86MX2_MSVC_INCLUDE_X86=${MX2_MSVC_TOOLS_DIR}\include;MX2_MSVC_INCLUDE_X86=${MX2_MSVC_INCLUDE_X86}${MX2_WINDOWS_KITS_DIR}\Include\${MX2_WINDOWS_KIT}\ucrt;MX2_MSVC_INCLUDE_X86=${MX2_MSVC_INCLUDE_X86}${MX2_WINDOWS_KITS_DIR}\Include\${MX2_WINDOWS_KIT}\shared;MX2_MSVC_INCLUDE_X86=${MX2_MSVC_INCLUDE_X86}${MX2_WINDOWS_KITS_DIR}\Include\${MX2_WINDOWS_KIT}\um;MX2_MSVC_LIB_X86=${MX2_MSVC_TOOLS_DIR}\lib\x86;MX2_MSVC_LIB_X86=${MX2_MSVC_LIB_X86}${MX2_WINDOWS_KITS_DIR}\Lib\${MX2_WINDOWS_KIT}\ucrt\x86;MX2_MSVC_LIB_X86=${MX2_MSVC_LIB_X86}${MX2_WINDOWS_KITS_DIR}\Lib\${MX2_WINDOWS_KIT}\um\x86;MX2_MSVC_PATH_X64=${MX2_MSVC_TOOLS_DIR}\bin\Hostx64\x64MX2_MSVC_INCLUDE_X64=${MX2_MSVC_TOOLS_DIR}\include;MX2_MSVC_INCLUDE_X64=${MX2_MSVC_INCLUDE_X64}${MX2_WINDOWS_KITS_DIR}\Include\${MX2_WINDOWS_KIT}\ucrt;MX2_MSVC_INCLUDE_X64=${MX2_MSVC_INCLUDE_X64}${MX2_WINDOWS_KITS_DIR}\Include\${MX2_WINDOWS_KIT}\um;MX2_MSVC_INCLUDE_X64=${MX2_MSVC_INCLUDE_X64}${MX2_WINDOWS_KITS_DIR}\Include\${MX2_WINDOWS_KIT}\shared;MX2_MSVC_LIB_X64=${MX2_MSVC_TOOLS_DIR}\lib\x64;MX2_MSVC_LIB_X64=${MX2_MSVC_LIB_X64}${MX2_WINDOWS_KITS_DIR}\Lib\${MX2_WINDOWS_KIT}\ucrt\x64;MX2_MSVC_LIB_X64=${MX2_MSVC_LIB_X64}${MX2_WINDOWS_KITS_DIR}\Lib\${MX2_WINDOWS_KIT}\um\x64;'***** MSVC COMMAND LINE OPTIONS *****'Linker optionsMX2_LD_OPTS_MSVC=user32.libMX2_LD_OPTS_MSVC_DEBUG=MX2_LD_OPTS_MSVC_RELEASE='C Compiler optionsMX2_CC_OPTS_MSVC=-EHs -W0 -MT -utf-8 -bigobjMX2_CC_OPTS_MSVC_DEBUG=-O1MX2_CC_OPTS_MSVC_RELEASE=-O2 -DNDEBUG'C++ Compiler optionsMX2_CPP_OPTS_MSVC=-EHs -W0 -MT -utf-8 -bigobjMX2_CPP_OPTS_MSVC_DEBUG=-O1MX2_CPP_OPTS_MSVC_RELEASE=-O2 -DNDEBUG'assembler optsMX2_AS_OPTS_MSVC=-DBOOST_CONTEXT_EXPORT='***** EMSCRIPTEN TARGET *****'This is for the emsdk download available at http://monkeycoder.co.nz/monkey2-files/''If you have a different emscripten installation installed that you want to use, comment this lot out.'EMSDK=${MX2_HOME}\devtools\emsdk-1.37.35_64bitEM_CONFIG=${EMSDK}\.emscriptenBINARYEN_ROOT = ${EMSDK}\clang\e1.37.35_64bit\binaryenJAVA_HOME = ${EMSDK}\java\8.152_64bitEMSCRIPTEN = ${EMSDK}\emscripten\1.37.35PATH=${EMSDK};${PATH}PATH=${EMSDK}\clang\e1.37.35_64bit;${PATH}PATH=${EMSDK}\node\8.9.1_64bit\bin;${PATH}PATH=${EMSDK}\python\2.7.5.3_64bit;${PATH}PATH=${EMSDK}\java\8.152_64bit\bin;${PATH}PATH=${EMSDK}\emscripten\1.37.35;${PATH}'Add mserver_winnt emscripten mini-server/launcher.'MX2_MSERVER="${MX2_HOME}\devtools\mserver-v86c\mserver_winnt.exe"'If you have installed the emsdk download from monkeycoder, you can use this one instead...''MX2_MSERVER="${EMSDK}\mserver-v86c\mserver_winnt.exe"'Linker optionsMX2_LD_OPTS_EMSCRIPTEN=-s FETCH=1 -s USE_SDL=2 -s TOTAL_MEMORY=536870912 -s DISABLE_EXCEPTION_CATCHING=1MX2_LD_OPTS_EMSCRIPTEN_WASM=-s BINARYEN=1MX2_LD_OPTS_EMSCRIPTEN_DEBUG=-O2 -s ASSERTIONS=2MX2_LD_OPTS_EMSCRIPTEN_RELEASE=-O3'C Compiler optionsMX2_CC_OPTS_EMSCRIPTEN=-std=gnu99 -s USE_SDL=2 -s TOTAL_MEMORY=536870912 -s DISABLE_EXCEPTION_CATCHING=1MX2_CC_OPTS_EMSCRIPTEN_DEBUG=-O2MX2_CC_OPTS_EMSCRIPTEN_RELEASE=-O3 -DNDEBUG'C++ Compiler optionsMX2_CPP_OPTS_EMSCRIPTEN=-std=c++11 -Wno-all -s USE_SDL=2 -s TOTAL_MEMORY=536870912 -s DISABLE_EXCEPTION_CATCHING=1MX2_CPP_OPTS_EMSCRIPTEN_DEBUG=-O2MX2_CPP_OPTS_EMSCRIPTEN_RELEASE=-O3 -DNDEBUG'***** ANDROID TARGET *****'Note: Requires Android Studio + Android NDK, see: https://developer.android.com/studio/index.html'This is where *my* ndk-bundle is located - yours is probably somewhere else!''For android builds, you need to either set this correctly or make sure 'ndk-build' is available from the command line via you PATH.''PATH=D:\devtools\Android\sdk\ndk-bundle;${PATH}'Application.mk'MX2_ANDROID_APP_CFLAGS=-std=gnu99 -fno-stack-protectorMX2_ANDROID_APP_CPPFLAGS=-std=c++11 -fno-stack-protector -frtti -fexceptionsMX2_ANDROID_APP_PLATFORM=android-14MX2_ANDROID_APP_ABI=armeabi-v7a x86MX2_ANDROID_APP_STL=c++_static'***** RASPBIAN *****MX2_RASPBIAN_TOOLS=${MX2_HOME}\devtools\SysGCC\Raspberry\bin'Linker optionsMX2_LD_OPTS_RASPBIAN=-s -staticMX2_LD_OPTS_RASPBIAN_DEBUG=MX2_LD_OPTS_RASPBIAN_RELEASE='C Compiler optionsMX2_CC_OPTS_RASPBIAN=-std=gnu99MX2_CC_OPTS_RASPBIAN_DEBUG=-OsMX2_CC_OPTS_RASPBIAN_RELEASE=-O3 -DNDEBUG'C++ Compiler optionsMX2_CPP_OPTS_RASPBIAN=-std=c++11MX2_CPP_OPTS_RASPBIAN_DEBUG=-OsMX2_CPP_OPTS_RASPBIAN_RELEASE=-O3 -DNDEBUGDecember 1, 2018 at 9:11 pm #15650Ya, it does seem ok that file. Hmm, I have no idea what to offer as help. It deffo maybe some other settings on your system conflicting but don’t take my word for that.
December 2, 2018 at 6:42 pm #15653For the GCC issue I would try commentings out the line in question (e:/Monkey2/modules/monkey/native/bbstd.h:23) like so:
// #define __forceinline inline __attribute__((always_inline))
It is pretty odd that this is a warning not an error and I would not expect a monkey2 failure.
I suspect the version of mingwm, are you using 6.2.0 as specified here:
http://monkeycoder.co.nz/monkey2-files/
December 3, 2018 at 11:49 pm #15663Yeah it’s the gcc version from this site. I think I’ll just bite the bullet and reinstall Windows. This all started after a hard drive failure, even though the particular drive didn’t actually have any compiler/monkey2 related stuff on it, it won’t hurt to re-install as it’s an old installation now and it won’t hurt to have a refresh
December 8, 2018 at 2:49 am #15676Is your issue sorted now peterigz after your reformat?
-
AuthorPosts
You must be logged in to reply to this topic.