Serious-Engine icon indicating copy to clipboard operation
Serious-Engine copied to clipboard

Building on Linux fails

Open ghost opened this issue 8 years ago • 12 comments

Compilation fails at 71%

/usr/include/SDL2/SDL_assert.h:145:19: note: in definition of macro ‘SDL_enabled_assert’
         while ( !(condition) ) { \
                   ^~~~~~~~~
/home/ralf/Serious-Engine/Sources/./Engine/Base/Assert.h:104:26: note: in expansion of macro ‘SDL_assert’
     #define ASSERT(expr) SDL_assert(expr)
                          ^~~~~~~~~~
/home/ralf/Serious-Engine/Sources/./Engine/Templates/StaticArray.cpp:129:3: note: in expansion of macro ‘ASSERT’
   ASSERT(&arOriginal!=NULL);
   ^~~~~~
[ 51%] Linking CXX shared library Debug/libEntitiesMPD.so
[ 71%] Built target EntitiesMPD
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Tried both 32 and 64 bit

ghost avatar Mar 21 '17 17:03 ghost

Hi,

The actual error message is not shown in the text you quoted. Please scroll up to find the text "error 1" and "error:". You probably have this problem:

/build/Serious-Engine/Sources/Engine/Engine.cpp:131:0: error: unterminated #else #if (defined USE_PORTABLE_C) // rcg10072001

which could be fixed by either https://github.com/rcgordon/Serious-Engine/pull/68/commits/a68ec8e5410a6809efac1f9cbbf316e5f43c77d5 or https://github.com/rcgordon/Serious-Engine/pull/69/commits/1984179657b4f38dcefdba43145bb23b4b7084df

stevenc99 avatar Mar 22 '17 13:03 stevenc99

Hi,

It appears to be a different issue.

makelog.txt

ghost avatar Mar 24 '17 15:03 ghost

Hi RalfVB,

Your log file seems incomplete. Perhaps you created it with " > makelog.txt" (which only captures stdout) but you would also need to append " 2>&1" if you want stderr (warnings/errors) to be recorded there too.

stevenc99 avatar Mar 24 '17 15:03 stevenc99

Hi,

You were right, it's indeed this error:

/build/Serious-Engine/Sources/Engine/Engine.cpp:131:0: error: unterminated #else
#if (defined USE_PORTABLE_C) // rcg10072001

I have tried both fixes separately, and together, doing a make clean inbetween, but I'm still unable to compile it

Here's the full log :makelog.txt

Thanks for your help

ghost avatar Mar 24 '17 18:03 ghost

It may be easier to just clone ptitSeb's fork from https://github.com/ptitSeb/Serious-Engine which seems to fix all the compile issues for me.

stevenc99 avatar Mar 24 '17 18:03 stevenc99

Yes, that one worked for me as well, I've got both tfe and tse up and running. Thanks!

ghost avatar Mar 24 '17 21:03 ghost

This was for ssam-tfe, not tried it on ssam tse

I did get it to compile by gutting that part of Engine.cpp and cleaned up the other two errors but still crashed. Thanks for the link to ptitSeb but it still fails with error: expected ‘;’ before ‘:’ token on WorldCollisionGrid.cpp

I gutted pitSeb's changes for arm and Pandora and it's compiled. It crashes when the game engine tries to display flames afaikt. So a sludge of a step forward.

doggodanubus avatar May 15 '17 09:05 doggodanubus

You have a crash on linux with some flames? In TFE or TSE and on what level (on 32bits build right?)

ptitSeb avatar May 23 '17 16:05 ptitSeb

makelog.txt Crashes on Arch x64

cmake version 3.18.2 GNU Make 4.3 Built for x86_64-pc-linux-gnu gcc (GCC) 10.2.0

nesper8 avatar Aug 25 '20 08:08 nesper8

What sources are you using @nesper8 ? because your log show

/home/nep/Projects/Serious-Engine/Sources/Engine/Engine.cpp:131: error: unterminated #else
  131 | #if (defined USE_PORTABLE_C)  // rcg10072001

~~But that line 131 is not like that in this repo.~~

Also, I assume you have a build issue, as your ticket is very minimal.

EDIT: Ah, I didn't noticed this was created in rcgordon repo. Try my fork: https://github.com/ptitSeb/Serious-Engine it should work.

ptitSeb avatar Aug 25 '20 08:08 ptitSeb

@ptitSeb , your version gets compiled out but returns a segmentation fault after the intro which i have created a new issue on your fork

nesper8 avatar Aug 26 '20 05:08 nesper8

I have see, but don't reproduce the issue. But the install process discribed in the README is a bit confusing and I need to clarify that out,e specially with the Free GoG version.

ptitSeb avatar Aug 26 '20 06:08 ptitSeb