icculus / Serious-Engine

An open source version of a game engine developed by Croteam for the classic Serious Sam games.
GNU General Public License v2.0
164 stars 21 forks source link

Building on Linux fails #71

Open ghost opened 7 years ago

ghost commented 7 years ago

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

stevenc99 commented 7 years ago

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

ghost commented 7 years ago

Hi,

It appears to be a different issue.

makelog.txt

stevenc99 commented 7 years ago

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.

ghost commented 7 years ago

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

stevenc99 commented 7 years ago

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.

ghost commented 7 years ago

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

doggodanubus commented 7 years ago

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.

ptitSeb commented 7 years ago

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

nesper8 commented 4 years ago

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

ptitSeb commented 4 years ago

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.

nesper8 commented 4 years ago

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

ptitSeb commented 4 years ago

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.