blitz-research / monkey2

zlib License
133 stars 43 forks source link

Build errors on latest develop (SDL2-specific?) #292

Closed DruggedBunny closed 6 years ago

DruggedBunny commented 6 years ago

Having trouble building latest develop branch, at time of writing, "Latest commit 3445e4f 5 hours ago".

It seems to fail particularly on both EGL and mojo_app_2event.h -- same happened with the prior release, around 20 hours before.

Seems to get through a load of modules, then runs into:

***** Making module 'sdl2' (windows release x86 gcc) *****

Parsing...
Semanting...
Translating...
Compiling...
Build error: System command failed:

gcc -c  -std=gnu99 -D_WIN32_WINNT=0x0603 -m32 -O3 -DNDEBUG -I"I:/SpiderOak/DevTo
ols/Monkey2/mx2builder/monkey2/modules/" -I"I:/SpiderOak/DevTools/Monkey2/mx2bui
lder/monkey2/modules/monkey/native" -I"I:/SpiderOak/DevTools/Monkey2/mx2builder/
monkey2/modules/sdl2/SDL/include/" -o "I:/SpiderOak/DevTools/Monkey2/mx2builder/
monkey2/modules/sdl2/sdl2.buildv1.1.09/windows_release/build/_1_1_1SDL_2src_2vid
eo_2SDL_0egl.c.o" "I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/modules/sdl2
/SDL/src/video/SDL_egl.c"

In file included from I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/modules/s
dl2/SDL/src/video/SDL_egl_c.h:28:0,
                 from I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/modules/s
dl2/SDL/src/video/SDL_egl.c:30:
I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/modules/sdl2/SDL/include/SDL_eg
l.h:29:21: fatal error: EGL/egl.h: No such file or directory
 #include <EGL/egl.h>
                     ^
compilation terminated.

***** Fatal mx2cc error *****

Internal mx2cc build error

... then it happily carries on building, but of course, the end result doesn't actually work!


Mx2cc version 1.1.09

***** Making module 'monkey' (windows debug x86 gcc) *****

... then the same on debug SDL2 and Ted2Go (where the *event.h thing comes up), and while building the launcher, but I suppose it all hinges on SDL2...


***** Making module 'sdl2' (windows debug x86 gcc) *****

Parsing...
Semanting...
Translating...
Compiling...
Build error: System command failed:

gcc -c  -std=gnu99 -D_WIN32_WINNT=0x0603 -m32 -Os -I"I:/SpiderOak/DevTools/Monke
y2/mx2builder/monkey2/modules/" -I"I:/SpiderOak/DevTools/Monkey2/mx2builder/monk
ey2/modules/monkey/native" -I"I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/m
odules/sdl2/SDL/include/" -o "I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/m
odules/sdl2/sdl2.buildv1.1.09/windows_debug/build/_1_1_1SDL_2src_2video_2SDL_0eg
l.c.o" "I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/modules/sdl2/SDL/src/vi
deo/SDL_egl.c"

In file included from I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/modules/s
dl2/SDL/src/video/SDL_egl_c.h:28:0,
                 from I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/modules/s
dl2/SDL/src/video/SDL_egl.c:30:
I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/modules/sdl2/SDL/include/SDL_eg
l.h:29:21: fatal error: EGL/egl.h: No such file or directory
 #include <EGL/egl.h>
                     ^
compilation terminated.

***** Fatal mx2cc error *****

Internal mx2cc build error

***** Rebuilding ted2 *****

Mx2cc version 1.1.09

***** Making app 'I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/src/ted2go/Te
d2.monkey2' (windows release x86 gcc) *****

Parsing...
Semanting...
Translating...
Compiling...
Build error: System command failed:

g++ -c  -std=c++11 -D_WIN32_WINNT=0x0603 -m32 -O3 -DNDEBUG -I"I:/SpiderOak/DevTo
ols/Monkey2/mx2builder/monkey2/modules/" -I"I:/SpiderOak/DevTools/Monkey2/mx2bui
lder/monkey2/modules/monkey/native" -I"I:/SpiderOak/DevTools/Monkey2/mx2builder/
monkey2/src/ted2go/" -I"I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/modules
/assimp/assimp/include/" -I"I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/mod
ules/assimp/assimp/" -I"I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/modules
/assimp/assimp/code/" -I"I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/module
s/assimp/assimp/contrib/" -I"I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/mo
dules/assimp/assimp/contrib/unzip/" -I"I:/SpiderOak/DevTools/Monkey2/mx2builder/
monkey2/modules/assimp/assimp/contrib/irrXML/" -I"I:/SpiderOak/DevTools/Monkey2/
mx2builder/monkey2/modules/assimp/assimp/contrib/rapidjson/include/" -I"I:/Spide
rOak/DevTools/Monkey2/mx2builder/monkey2/modules/assimp/assimp/contrib/openddlpa
rser/include/" -I"I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/modules/liteh
tml/litehtml/include/" -I"I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/modul
es/freetype/freetype-2.6.3/include/" -I"I:/SpiderOak/DevTools/Monkey2/mx2builder
/monkey2/modules/openal/openal-soft/include/" -I"I:/SpiderOak/DevTools/Monkey2/m
x2builder/monkey2/modules/sdl2/SDL/include/" -DBB_NEWREFLECTION -I"I:/SpiderOak/
DevTools/Monkey2/mx2builder/monkey2/src/ted2go/Ted2.buildv1.1.09/windows_release
/build/" -o "I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/src/ted2go/Ted2.bu
ildv1.1.09/windows_release/build/_1include_2_0r.cpp_r.o" "I:/SpiderOak/DevTools/
Monkey2/mx2builder/monkey2/src/ted2go/Ted2.buildv1.1.09/windows_release/include/
_r.cpp"

I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/src/ted2go/Ted2.buildv1.1.09/wi
ndows_release/include/_r.cpp:6:76: fatal error: mojo/mojo.buildv1.1.09/windows_r
elease/include/mojo_app_2event.h: No such file or directory
 #include "mojo/mojo.buildv1.1.09/windows_release/include/mojo_app_2event.h"
                                                                            ^
compilation terminated.

***** Fatal mx2cc error *****

Internal mx2cc build error
File not found - assets
0 File(s) copied
File not found - *.dll
0 File(s) copied
File not found - *.exe
0 File(s) copied

Mx2cc version 1.1.09

***** Making app 'I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/src/launcher/
launcher.monkey2' (windows release x86 gcc) *****

Parsing...
Semanting...
Translating...
Compiling...
Build error: System command failed:

g++ -c  -std=c++11 -D_WIN32_WINNT=0x0603 -m32 -O3 -DNDEBUG -I"I:/SpiderOak/DevTo
ols/Monkey2/mx2builder/monkey2/modules/" -I"I:/SpiderOak/DevTools/Monkey2/mx2bui
lder/monkey2/modules/monkey/native" -I"I:/SpiderOak/DevTools/Monkey2/mx2builder/
monkey2/src/launcher/" -DBB_NEWREFLECTION -I"I:/SpiderOak/DevTools/Monkey2/mx2bu
ilder/monkey2/src/launcher/launcher.buildv1.1.09/windows_release/build/" -MM "I:
/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/modules/std/std.buildv1.1.09/wind
ows_release/include/_r.cpp" >"I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/s
rc/launcher/launcher.buildv1.1.09/windows_release/build/_1_1_1_1_1modules_2std_2
std.buildv1.1.09_2windows_0release_2include_2_0r.cpp_r.deps"

g++: error: I:/SpiderOak/DevTools/Monkey2/mx2builder/monkey2/modules/std/std.bui
ldv1.1.09/windows_release/include/_r.cpp: No such file or directory
g++: fatal error: no input files
compilation terminated.

***** Fatal mx2cc error *****

Internal mx2cc build error
The system cannot find the path specified.

Mx2cc version 1.1.09

***** Doccing module 'monkey' *****
DruggedBunny commented 6 years ago

Er, thought I'd summarised that with "think SDL2 is the problem"...

Also, dunno how much .bat stuff you've done, but it might be worth trying to add some checks for %ERRORLEVEL% after each command is run, as you can just abort, otherwise it just carries on and ends up looking like it's built properly!

Here's my hard-won mx2 + Ted2Go download-n-build batch file, for example -- needs a copy of the devtools folder alongside it, containing MinGW in order to work. Run in its own folder for safety if you try to run it, but only intended for quick how-to reference...

@echo off

REM git clone -b develop https://github.com/blitz-research/monkey2/
REM git clone -b dev https://github.com/engor/Ted2Go/

REM Quick test project:
REM git clone https://github.com/DruggedBunny/Hello-World

rmdir /S /Q monkey2 2>NUL
rmdir /S /Q Ted2Go 2>NUL

echo.
echo Checking out Monkey2...
echo.

git clone -b develop https://github.com/blitz-research/monkey2/

if not %ERRORLEVEL%==0 (
    echo.
    echo Error checking out monkey2: see output above!
    echo.
    pause
    exit /B
) else (
    echo.
    echo Monkey2 downloaded; checking out Ted2Go...
    echo.
)

rmdir /S /Q monkey2\src\ted2go
rmdir /S /Q monkey2\devtools

git clone -b dev https://github.com/engor/Ted2Go/

if not %ERRORLEVEL%==0 (
    echo.
    echo Error checking out Ted2Go: see output above!
    echo.
    pause
    exit /B
)

xcopy Ted2Go monkey2\src\Ted2Go /E /Y /I /Q

echo.
echo Copying devtools...
echo.

xcopy devtools monkey2\devtools /E /Y /I /Q

echo.
echo Building...
echo.

pushd monkey2\scripts
    call rebuildall2go.bat
popd

echo.
echo All done!
echo.

done
pause
blitz-research commented 6 years ago

Seems to be a problem with mingw builds only.

Have you got it set up so you can buoild with msvc? If not, I should have it fixed soon.

On Thu, Dec 14, 2017 at 1:03 PM, DruggedBunny notifications@github.com wrote:

Er, thought I'd summarised that with "think SDL2 is the problem"...

Also, dunno how much .bat stuff you've done, but it might be worth trying to add some checks for %ERRORLEVEL% after each command is run, as you can just abort, otherwise it just carries on and ends up looking like it's built properly!

Here's my hard-won mx2 + Ted2Go download-n-build batch file, for example -- needs a copy of the devtools folder alongside it, containing MinGW in order to work. Run in its own folder for safety if you try to run it, but only intended for quick how-to reference...

@echo off

REM git clone -b develop https://github.com/blitz-research/monkey2/ REM git clone -b dev https://github.com/engor/Ted2Go/

REM Quick test project: REM git clone https://github.com/DruggedBunny/Hello-World

rmdir /S /Q monkey2 2>NUL rmdir /S /Q Ted2Go 2>NUL

echo. echo Checking out Monkey2... echo.

git clone -b develop https://github.com/blitz-research/monkey2/

if not %ERRORLEVEL%==0 ( echo. echo Error checking out monkey2: see output above! echo. pause exit /B ) else ( echo. echo Monkey2 downloaded; checking out Ted2Go... echo. )

rmdir /S /Q monkey2\src\ted2go rmdir /S /Q monkey2\devtools

git clone -b dev https://github.com/engor/Ted2Go/

if not %ERRORLEVEL%==0 ( echo. echo Error checking out Ted2Go: see output above! echo. pause exit /B )

xcopy Ted2Go monkey2\src\Ted2Go /E /Y /I /Q

echo. echo Copying devtools... echo.

xcopy devtools monkey2\devtools /E /Y /I /Q

echo. echo Building... echo.

pushd monkey2\scripts call rebuildall2go.bat popd

echo. echo All done! echo.

done pause

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/blitz-research/monkey2/issues/292#issuecomment-351565222, or mute the thread https://github.com/notifications/unsubscribe-auth/ADU3Qkfp04x5MtxH9zpopotvV_hHsm8Jks5tAGXHgaJpZM4RBWos .

DruggedBunny commented 6 years ago

I was having no joy with MSVC (failed with no clear messages even after updating to right version!), but am currently checking out/building latest dev, see it's just updated... will try get MinGW going again and take it from there...

blitz-research commented 6 years ago

Just pushed a fix for this to develop.

On Thu, Dec 14, 2017 at 1:47 PM, Mark Sibly blitzmunter@gmail.com wrote:

Seems to be a problem with mingw builds only.

Have you got it set up so you can buoild with msvc? If not, I should have it fixed soon.

On Thu, Dec 14, 2017 at 1:03 PM, DruggedBunny notifications@github.com wrote:

Er, thought I'd summarised that with "think SDL2 is the problem"...

Also, dunno how much .bat stuff you've done, but it might be worth trying to add some checks for %ERRORLEVEL% after each command is run, as you can just abort, otherwise it just carries on and ends up looking like it's built properly!

Here's my hard-won mx2 + Ted2Go download-n-build batch file, for example -- needs a copy of the devtools folder alongside it, containing MinGW in order to work. Run in its own folder for safety if you try to run it, but only intended for quick how-to reference...

@echo off

REM git clone -b develop https://github.com/blitz-research/monkey2/ REM git clone -b dev https://github.com/engor/Ted2Go/

REM Quick test project: REM git clone https://github.com/DruggedBunny/Hello-World

rmdir /S /Q monkey2 2>NUL rmdir /S /Q Ted2Go 2>NUL

echo. echo Checking out Monkey2... echo.

git clone -b develop https://github.com/blitz-research/monkey2/

if not %ERRORLEVEL%==0 ( echo. echo Error checking out monkey2: see output above! echo. pause exit /B ) else ( echo. echo Monkey2 downloaded; checking out Ted2Go... echo. )

rmdir /S /Q monkey2\src\ted2go rmdir /S /Q monkey2\devtools

git clone -b dev https://github.com/engor/Ted2Go/

if not %ERRORLEVEL%==0 ( echo. echo Error checking out Ted2Go: see output above! echo. pause exit /B )

xcopy Ted2Go monkey2\src\Ted2Go /E /Y /I /Q

echo. echo Copying devtools... echo.

xcopy devtools monkey2\devtools /E /Y /I /Q

echo. echo Building... echo.

pushd monkey2\scripts call rebuildall2go.bat popd

echo. echo All done! echo.

done pause

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/blitz-research/monkey2/issues/292#issuecomment-351565222, or mute the thread https://github.com/notifications/unsubscribe-auth/ADU3Qkfp04x5MtxH9zpopotvV_hHsm8Jks5tAGXHgaJpZM4RBWos .

blitz-research commented 6 years ago

msvc has been updated to use the vc community edition 2017 so maybe give that a whirl. Post an issue if it doesn't work. MSVC is faster than ever now as I found an option that makes it spits out included files while it compiles, so there's now no extra 'scanning' pass like there is with gcc/mingw.

Also, you need to do the initial mx2cc build with mingw right now. This will change next time I update binaries in the repos, but I hate doing that unless I really have to as it bloats the repos significantly.

On Thu, Dec 14, 2017 at 2:13 PM, Mark Sibly blitzmunter@gmail.com wrote:

Just pushed a fix for this to develop.

On Thu, Dec 14, 2017 at 1:47 PM, Mark Sibly blitzmunter@gmail.com wrote:

Seems to be a problem with mingw builds only.

Have you got it set up so you can buoild with msvc? If not, I should have it fixed soon.

On Thu, Dec 14, 2017 at 1:03 PM, DruggedBunny notifications@github.com wrote:

Er, thought I'd summarised that with "think SDL2 is the problem"...

Also, dunno how much .bat stuff you've done, but it might be worth trying to add some checks for %ERRORLEVEL% after each command is run, as you can just abort, otherwise it just carries on and ends up looking like it's built properly!

Here's my hard-won mx2 + Ted2Go download-n-build batch file, for example -- needs a copy of the devtools folder alongside it, containing MinGW in order to work. Run in its own folder for safety if you try to run it, but only intended for quick how-to reference...

@echo off

REM git clone -b develop https://github.com/blitz-research/monkey2/ REM git clone -b dev https://github.com/engor/Ted2Go/

REM Quick test project: REM git clone https://github.com/DruggedBunny/Hello-World

rmdir /S /Q monkey2 2>NUL rmdir /S /Q Ted2Go 2>NUL

echo. echo Checking out Monkey2... echo.

git clone -b develop https://github.com/blitz-research/monkey2/

if not %ERRORLEVEL%==0 ( echo. echo Error checking out monkey2: see output above! echo. pause exit /B ) else ( echo. echo Monkey2 downloaded; checking out Ted2Go... echo. )

rmdir /S /Q monkey2\src\ted2go rmdir /S /Q monkey2\devtools

git clone -b dev https://github.com/engor/Ted2Go/

if not %ERRORLEVEL%==0 ( echo. echo Error checking out Ted2Go: see output above! echo. pause exit /B )

xcopy Ted2Go monkey2\src\Ted2Go /E /Y /I /Q

echo. echo Copying devtools... echo.

xcopy devtools monkey2\devtools /E /Y /I /Q

echo. echo Building... echo.

pushd monkey2\scripts call rebuildall2go.bat popd

echo. echo All done! echo.

done pause

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/blitz-research/monkey2/issues/292#issuecomment-351565222, or mute the thread https://github.com/notifications/unsubscribe-auth/ADU3Qkfp04x5MtxH9zpopotvV_hHsm8Jks5tAGXHgaJpZM4RBWos .

DruggedBunny commented 6 years ago

OK, SDL/EGL problem's sorted here, so this one can be closed.

MSVC looks to be building modules now, getting somewhere!

[A fair bit of rebuilding later] OH MY GOD, MSVC is so much faster at building projects! And the Comanche demo now runs much faster, too, around 50 fps here -- was nothing like that before!

Looking good!

From my end, it's been:

1) Make sure latest MSVC2017 update is installed; 2) checkout and build develop branch with mingw; 3) switch to MSVC in env_*.txt; 4) build all with MSVC.

blitz-research commented 6 years ago

You should just need to do the initial mx2cc build with mingw, eg; change to mingw in env.txt, rebuildmx2cc, change to msvc in env.txt, rebuildall2go.

On Thu, Dec 14, 2017 at 3:44 PM, DruggedBunny notifications@github.com wrote:

OK, SDL/EGL problem's sorted here, so this one can be closed.

MSVC looks to be building modules now, getting somewhere!

[A fair bit of rebuilding later] OH MY GOD, MSVC is so much faster at building projects! And the Comanche demo now runs much faster, too, around 50 fps here -- was nothing like that before!

Looking good!

From my end, it's been:

  1. Make sure latest MSVC2017 update is installed;
  2. checkout and build develop branch with mingw;
  3. switch to MSVC in env_*.txt;
  4. build all with MSVC.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/blitz-research/monkey2/issues/292#issuecomment-351591943, or mute the thread https://github.com/notifications/unsubscribe-auth/ADU3QlLVIdE-shDqMtYyKROXZ3InaU1oks5tAIt4gaJpZM4RBWos .