Author Topic: Glest does not build on Linux with gcc 4.3.2  (Read 4500 times)

abompard

  • Guest
Glest does not build on Linux with gcc 4.3.2
« on: 10 February 2009, 06:48:39 »
Hi all,

I'm trying to build glest from source on Fedora 10, and I have two remarks:

  • The mk/linux/autogen.sh script was not run before making the tarball, so we have to run it (as explained in the README.linux, not a big deal)
  • The compilation fails with this error:
Code: [Select]
glest_game/main/main.cpp: In function 'int Glest::Game::glestMain(int, char**)':
glest_game/main/main.cpp:120: error: cannot declare variable 'exceptionHandler' to be of abstract type 'Glest::Game::ExceptionHandler'
glest_game/main/main.cpp:37: note:   because the following virtual functions are pure within 'Glest::Game::ExceptionHandler':
glest_game/../shared_lib/include/../include/platform/sdl/platform_util.h:80: note: virtual void Shared::Platform::PlatformExceptionHandler::handle(std::string)

Any idea what's going on, and how to fix it ?

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Glest does not build on Linux with gcc 4.3.2
« Reply #1 on: 10 February 2009, 10:57:31 »
Which version of Glest are you trying to compile?
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

abompard

  • Guest
Re: Glest does not build on Linux with gcc 4.3.2
« Reply #2 on: 10 February 2009, 12:11:29 »
Oh, sorry about that, I did not even specify it... I'm trying to build the new 3.2.0

Yggdrasil

  • GAE Team
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: Glest does not build on Linux with gcc 4.3.2
« Reply #3 on: 10 February 2009, 13:48:08 »

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Re: Glest does not build on Linux with gcc 4.3.2
« Reply #4 on: 10 February 2009, 17:00:12 »
Did you compile from svn, or did you use my source package? http://www.titusgames.de/glest-source-3.2.0.tar.bz2
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

abompard

  • Guest
Re: Glest does not build on Linux with gcc 4.3.2
« Reply #5 on: 10 February 2009, 17:02:39 »
I used the glest_source package from SourceForge : http://downloads.sourceforge.net/glest/glest_source_3.2.0.zip

Should I use yours ? Which one is the most "official" ?

abompard

  • Guest
Re: Glest does not build on Linux with gcc 4.3.2
« Reply #6 on: 10 February 2009, 19:18:21 »
OK, I used titi's tarball, it worked perfectly.

Thanks people.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Re: Glest does not build on Linux with gcc 4.3.2
« Reply #7 on: 10 February 2009, 19:24:51 »
If you want an official source use the one from sourceforge.
If you want one that simply builds (hopefully) use mine.
If you want to play multiplayer you MUST use the precompiled binary. Self compiled binaries with other compiler/libs version will get out of sync because floatingpoint calculation is handled slighly different and the game gets out of sync after a while.
I compiled it on an old ubuntu 6.06 ( glibc 2.38 ) to get a compatible binary. I added some libs ( I think originally compiled by liflg.org for their very first glest release )
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
Re: Glest does not build on Linux with gcc 4.3.2
« Reply #8 on: 10 February 2009, 19:34:52 »
Hi, I've fixed the source in the SVN so it should now compile with any Linux GCC without any modifications, can anyone check it?

abompard

  • Guest
Re: Glest does not build on Linux with gcc 4.3.2
« Reply #9 on: 10 February 2009, 19:59:34 »
Quote
If you want an official source use the one from sourceforge.
If you want one that simply builds (hopefully) use mine.

OK, that's official enough, since it's the link provided in this forum.

Quote
If you want to play multiplayer you MUST use the precompiled binary. Self compiled binaries with other compiler/libs version will get out of sync because floatingpoint calculation is handled slighly different and the game gets out of sync after a while.

Hmm. Actually, I'm the Fedora packager for Glest, so I pretty much have to build from source. It means every linux user using the package from his distribution will be unable to play online ? That's too bad :(

And by the way, I have a very trivial patch to build with GCC 4.4
Code: [Select]
diff -up ./shared_lib/sources/util/util.cpp.gcc44 ./shared_lib/sources/util/util.cpp
--- ./shared_lib/sources/util/util.cpp.gcc44    2009-02-10 20:33:44.000000000 +0100
+++ ./shared_lib/sources/util/util.cpp  2009-02-10 20:33:56.000000000 +0100
@@ -15,6 +15,7 @@
 #include <cassert>
 #include <stdexcept>
 #include <cstring>
+#include <cstdio>

 #include "leak_dumper.h"

Please add that while you're at it... Thanks !

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Re: Glest does not build on Linux with gcc 4.3.2
« Reply #10 on: 10 February 2009, 21:21:16 »


Quote
Hmm. Actually, I'm the Fedora packager for Glest, so I pretty much have to build from source. It means every linux user using the package from his distribution will be unable to play online ? That's too bad Sad

well thats the way it is currently :/
I think thats the reason why there are so little multiplayer players, there is too much trouble to get a stable game.
But if you want to add more single player fun to glest, look at the things I did: http://www.titusgames.de it's all GPL .
( Currently the included scenarios of the megapack will not work because glest 3.2.0 has changes in the scenarious structure. )
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
Re: Glest does not build on Linux with gcc 4.3.2
« Reply #11 on: 11 February 2009, 10:51:40 »
Quote
Hmm. Actually, I'm the Fedora packager for Glest, so I pretty much have to build from source. It means every linux user using the package from his distribution will be unable to play online ? That's too bad Sad

They will be able to play online as long as they play against each other and they are using the same compiler version and architecture. The game gets out of synch if using 32bit vs 64bit binaries or different versions of GCC.

By the way, we will be releasing 3.2.1 soon (probably before the end of the week) to address some bugs, maybe it is worth waiting for it before you package the game.

Regards.

abompard

  • Guest
Re: Glest does not build on Linux with gcc 4.3.2
« Reply #12 on: 11 February 2009, 11:52:56 »
Quote
By the way, we will be releasing 3.2.1 soon (probably before the end of the week) to address some bugs, maybe it is worth waiting for it before you package the game.

Great, thanks, I'll do that.

 

anything