Author Topic: I want to make glest work with newer versions of xerces-c  (Read 3327 times)

Platyhelminth

  • Guest
Hi,

In Ubuntu 9.04 Jaunty Jackalope there is no longer libxerces-c 27 avalable in the package manager. So you can't compile glest in that platform.

Of course I imagine I could compile libxerces-c 27 myself and install it manually in /usr/lib in order to compile glest, but I don't want to do that.

Can I change the code to make it work for libxerces-c 28 or newer ?

As far I know binaries distributed for gae (here : http://glest.codemonger.org/home_page.php ) are working with libxerces-c 28. So it is possible.

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: I want to make glest work with newer versions of xerces-c
« Reply #1 on: 19 July 2009, 11:50:13 »
I think xerces-c 2.8 has always worked, it was 3 that didn't but there is a patch for it.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Yggdrasil

  • GAE Team
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: I want to make glest work with newer versions of xerces-c
« Reply #2 on: 19 July 2009, 18:44:10 »
http://bugs.gentoo.org/259701
there is a patch for xerces-c 3. version 2.8 always worked.
i think hailstone commited this patch to gae trunk some time ago (if i remember correctly).

Platyhelminth

  • Guest
Re: I want to make glest work with newer versions of xerces-c
« Reply #3 on: 20 July 2009, 09:59:48 »
Quote
version 2.8 always worked.

It looks like that no. I have it installed and when I do ./configure it says I have not xerces-c installed.

Quote
http://bugs.gentoo.org/259701
Ok I installed it with portage in gentoo and it works. But there is lot of people using ubuntu.
« Last Edit: 20 July 2009, 13:52:52 by Platyhelminth »

Heretik

  • Guest
Re: I want to make glest work with newer versions of xerces-c
« Reply #4 on: 20 July 2009, 13:28:08 »
To compile glest, you must have xerces _headers_. Did you install libxerces-c-dev (it's the package name in Debian sid, guess it's the same in Ubuntu) ? After that it shouldn't say it's not installed.

But that's xerces 3 and not 2.8, so it won't compile. Then you must apply in glest the patch for xerces 3 which is here http://bugs.gentoo.org/attachment.cgi?id=188429 and it will compile.

and by the way, I had another compilation error in Debian sid :

C++ ./build/i686-pc-linux-gnu/optimize/glest_game/ai/ai_rule.o
glest_game/ai/ai_rule.cpp: In member function ‘virtual bool Glest::Game::AiRuleMassiveAttack::test()’:
glest_game/ai/ai_rule.cpp:156: error: ‘INT_MAX’ was not declared in this scope
glest_game/ai/ai_rule.cpp: In member function ‘virtual bool Glest::Game::AiRuleExpand::test()’:
glest_game/ai/ai_rule.cpp:815: error: ‘INT_MAX’ was not declared in this scope

which I solve with this patch :

--- source/glest_game/ai/ai_rule.cpp.old   2009-07-20 15:18:51.000000000 +0200
+++ source/glest_game/ai/ai_rule.cpp   2009-07-20 15:18:59.000000000 +0200
@@ -11,6 +11,7 @@
 #include "ai_rule.h"
 
 #include <algorithm>
+#include <limits.h>
 
 #include "ai.h"
 #include "ai_interface.h"

It would be great if these 2 patches could be applied in glest trunk (the second patch has to be checked on other systems before).

Platyhelminth

  • Guest
Re: I want to make glest work with newer versions of xerces-c
« Reply #5 on: 20 July 2009, 13:53:36 »
Code: [Select]
Did you install libxerces-c-dev
No I installed libxerces-c28 .

Watch this: http://dpaste.com/69104/
« Last Edit: 20 July 2009, 14:27:00 by Platyhelminth »

Heretik

  • Guest
Re: I want to make glest work with newer versions of xerces-c
« Reply #6 on: 20 July 2009, 21:52:19 »
libxerces-c28 is the runtime library, used when you run glest.

To compile glest, you need xerces headers, so you need to install libxerces-c-dev and it will resolve your configure error.

Platyhelminth

  • Guest
Re: I want to make glest work with newer versions of xerces-c
« Reply #7 on: 21 July 2009, 06:08:05 »
I installed libxerces-c2-dev , and it worked. I compiled it.
« Last Edit: 28 July 2009, 12:49:34 by Platyhelminth »