Author Topic: Trunk Testing  (Read 12440 times)

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Trunk Testing
« Reply #25 on: 31 July 2009, 22:54:16 »
Launched executable error:
Quote
Runtime Error!
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.

Windows Vista Ultimate 64bit
It requires I also have MSVCR90.dll and zlib1.dll in the directory with the EXE

zlib you will indeed need, msvcr90.dll you should not need (at least not in the game directory). That error is wierd, best I could find from a bit of googling was that maybe the runtime is getting confused by multiple references to the C run-time library. I'd delete msvcr90.dll from your game directory, it shouldn't be there, and if the game doesn't run without it, you need to sort out why it can't see msvcr90.dll, it should be in a system folder in 'windows' somewhere.

glestadv debug build in gdb: it builds but it has the same outcome.
That's an assertion being failed because of erroneous code in ValidationMap :)  It should be iterating through Zones, not Fields.

The 64 bit system thing I hope we can get sorted this weekend, but it will mean debugging by proxy...

The game should be being built with debugging symbols even without DEBUG defined, try running a build without DEBUG defined in gdb, that should tell me exactly where the problem is (or at least the first one :) )
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Inruin

  • Guest
Re: Trunk Testing
« Reply #26 on: 1 August 2009, 02:09:29 »
Can't seem to figure this out.  MSVCR90.dll is for sure in my windows folder (multiple instances of it).  If someone thinks they might be able to help me with this runtime error, please PM me :)  It's loading msvcr.dll but not msvcr90.dll so maybe it's looking in the wrong place?

ewomer

  • Guest
Re: Trunk Testing
« Reply #27 on: 1 August 2009, 11:09:30 »

optimized build run in gdb:
Code: [Select]
gdb ./glestadv
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...
(gdb) run
Starting program: /home/eric/src/games/gae/data/glest_game/glestadv
[Thread debugging using libthread_db enabled]
[New Thread 0x7f5a0a9b27a0 (LWP 17976)]
[New Thread 0x7f5a011b6910 (LWP 17979)]
[New Thread 0x7f59fff0d910 (LWP 17980)]
*** buffer overflow detected ***: /home/eric/src/games/gae/data/glest_game/glestadv terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x37)[0x7f5a080921f7]
/lib/libc.so.6[0x7f5a08090170]
/home/eric/src/games/gae/data/glest_game/glestadv[0x4b73e7]
/home/eric/src/games/gae/data/glest_game/glestadv[0x4b7703]
/home/eric/src/games/gae/data/glest_game/glestadv[0x4bcefb]
/home/eric/src/games/gae/data/glest_game/glestadv[0x538080]
/home/eric/src/games/gae/data/glest_game/glestadv[0x41f5f9]
/home/eric/src/games/gae/data/glest_game/glestadv[0x4616fe]
/home/eric/src/games/gae/data/glest_game/glestadv[0x491cc4]
/home/eric/src/games/gae/data/glest_game/glestadv[0x54672c]
/home/eric/src/games/gae/data/glest_game/glestadv[0x546a4d]
/home/eric/src/games/gae/data/glest_game/glestadv[0x4617e8]
/home/eric/src/games/gae/data/glest_game/glestadv[0x464a38]
/home/eric/src/games/gae/data/glest_game/glestadv[0x464c25]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f5a07fcca3d]
/home/eric/src/games/gae/data/glest_game/glestadv[0x40a449]
======= Memory map: ========
00400000-005c5000 r-xp 00000000 08:05 262165                             /home/eric/src/games/gae/data/glest_game/glestadv
007c4000-007c5000 r--p 001c4000 08:05 262165                             /home/eric/src/games/gae/data/glest_game/glestadv
007c5000-007c7000 rw-p 001c5000 08:05 262165                             /home/eric/src/games/gae/data/glest_game/glestadv
007c7000-06d76000 rw-p 00000000 00:00 0                                  [heap]
416f1000-41771000 rw-p 00000000 00:0e 3502                               /dev/zero
41e8e000-41e90000 rwxp 00000000 00:0e 3502                               /dev/zero
7f59ff38a000-7f59ff4b8000 rw-p 00000000 00:00 0
7f59ff4b8000-7f59ff4b9000 rw-p 00000000 00:00 0
7f59ff4b9000-7f59ff4c9000 r--p 00000000 08:07 689899                     /usr/share/xerces-c/msg/XercesMessages_en_US.cat
7f59ff4c9000-7f59ff4d9000 r--p 00000000 08:07 689899                     /usr/share/xerces-c/msg/XercesMessages_en_US.cat
7f59ff4d9000-7f59ff4e9000 r--p 00000000 08:07 689899                     /usr/share/xerces-c/msg/XercesMessages_en_US.cat
7f59ff4e9000-7f59ff4f9000 r--p 00000000 08:07 689899                     /usr/share/xerces-c/msg/XercesMessages_en_US.cat
7f59ff4f9000-7f59ff509000 r--p 00000000 08:07 689899                     /usr/share/xerces-c/msg/XercesMessages_en_US.cat
7f59ff509000-7f59ff50c000 r-xp 00000000 08:07 265907                     /usr/lib64/gconv/UTF-16.so
7f59ff50c000-7f59ff70b000 ---p 00003000 08:07 265907                     /usr/lib64/gconv/UTF-16.so
7f59ff70b000-7f59ff70c000 r--p 00002000 08:07 265907                     /usr/lib64/gconv/UTF-16.so
7f59ff70c000-7f59ff70d000 rw-p 00003000 08:07 265907                     /usr/lib64/gconv/UTF-16.so
7f59ff70d000-7f59ff70e000 ---p 00000000 00:00 0
7f59ff70e000-7f59fff0e000 rwxp 00000000 00:00 0
7f59fff0e000-7f59fff20000 r-xp 00000000 08:07 549232                     /usr/lib64/libspeexdsp.so.1.5.0
7f59fff20000-7f5a0011f000 ---p 00012000 08:07 549232                     /usr/lib64/libspeexdsp.so.1.5.0
7f5a0011f000-7f5a00120000 r--p 00011000 08:07 549232                     /usr/lib64/libspeexdsp.so.1.5.0
7f5a00120000-7f5a00121000 rw-p 00012000 08:07 549232                     /usr/lib64/libspeexdsp.so.1.5.0
7f5a00121000-7f5a00123000 r-xp 00000000 08:07 787814                     /usr/lib64/alsa-lib/libasound_module_rate_speexrate.so
7f5a00123000-7f5a00322000 ---p 00002000 08:07 787814                     /usr/lib64/alsa-lib/libasound_module_rate_speexrate.so
7f5a00322000-7f5a00323000 r--p 00001000 08:07 787814                     /usr/lib64/alsa-lib/libasound_module_rate_speexrate.so
7f5a00323000-7f5a00324000 rw-p 00002000 08:07 787814                     /usr/lib64/alsa-lib/libasound_module_rate_speexrate.so
7f5a00324000-7f5a00334000 rw-s 00000000 00:07 2785309                    /SYSV0056a4d6 (deleted)
7f5a00334000-7f5a006b6000 rw-p 00000000 00:00 0
7f5a006b6000-7f5a008b6000 rw-s 560ca000 00:0e 8653                       /dev/nvidia0
7f5a008b6000-7f5a009b6000 rw-s b6655000 00:0e 8653                       /dev/nvidia0
7f5a009b6000-7f5a009b7000 ---p 00000000 00:00 0
7f5a009b7000-7f5a011b7000 rwxp 00000000 00:00 0
7f5a011b7000-7f5a011c2000 r-xp 00000000 08:07 266099                     /lib64/libnss_files-2.10.1.so
7f5a011c2000-7f5a013c2000 ---p 0000b000 08:07 266099                     /lib64/libnss_files-2.10.1.so
7f5a013c2000-7f5a013c3000 r--p 0000b000 08:07 266099                     /lib64/libnss_files-2.10.1.so
7f5a013c3000-7f5a013c4000 rw-p 0000c000 08:07 266099                     /lib64/libnss_files-2.10.1.so
7f5a013c4000-7f5a013ce000 r-xp 00000000 08:07 266176                     /lib64/libnss_nis-2.10.1.so
7f5a013ce000-7f5a015cd000 ---p 0000a000 08:07 266176                     /lib64/libnss_nis-2.10.1.so
7f5a015cd000-7f5a015ce000 r--p 00009000 08:07 266176                     /lib64/libnss_nis-2.10.1.so
7f5a015ce000-7f5a015cf000 rw-p 0000a000 08:07 266176                     /lib64/libnss_nis-2.10.1.so
7f5a015cf000-7f5a015d6000 r-xp 00000000 08:07 266185                     /lib64/libnss_compat-2.10.1.so
7f5a015d6000-7f5a017d5000 ---p 00007000 08:07 266185                     /lib64/libnss_compat-2.10.1.so
7f5a017d5000-7f5a017d6000 r--p 00006000 08:07 266185                     /lib64/libnss_compat-2.10.1.so
7f5a017d6000-7f5a017d7000 rw-p 00007000 08:07 266185                     /lib64/libnss_compat-2.10.1.so
7f5a017d7000-7f5a018a2000 r-xp 00000000 08:07 788483                     /usr/lib64/libasound.so.2.0.0
7f5a018a2000-7f5a01aa1000 ---p 000cb000 08:07 788483                     /usr/lib64/libasound.so.2.0.0
7f5a01aa1000-7f5a01aa7000 r--p 000ca000 08:07 788483                     /usr/lib64/libasound.so.2.0.0
7f5a01aa7000-7f5a01aa9000 rw-p 000d0000 08:07 788483                     /usr/lib64/libasound.so.2.0.0
7f5a01aa9000-7f5a01aae000 r-xp 00000000 08:07 546364                     /usr/lib64/libXfixes.so.3.1.0
7f5a01aae000-7f5a01cad000 ---p 00005000 08:07 546364                     /usr/lib64/libXfixes.so.3.1.0
7f5a01cad000-7f5a01cae000 r--p 00004000 08:07 546364                     /usr/lib64/libXfixes.so.3.1.0
7f5a01cae000-7f5a01caf000 rw-p 00005000 08:07 546364                     /usr/lib64/libXfixes.so.3.1.0
7f5a01caf000-7f5a01cb9000 r-xp 00000000 08:07 556332                     /usr/lib64/libXcursor.so.1.0.2
7f5a01cb9000-7f5a01eb8000 ---p 0000a000 08:07 556332                     /usr/lib64/libXcursor.so.1.0.2
7f5a01eb8000-7f5a01eb9000 r--p 00009000 08:07 556332                     /usr/lib64/libXcursor.so.1.0.2
7f5a01eb9000-7f5a01eba000 rw-p 0000a000 08:07 556332                     /usr/lib64/libXcursor.so.1.0.2
7f5a01eba000-7f5a01f07000 rw-p 00000000 00:00 0
7f5a01f11000-7f5a02092000 r--p 00000000 08:07 131448                     /usr/lib64/locale/locale-archive
7f5a02092000-7f5a0209a000 r-xp 00000000 08:07 555995                     /usr/lib64/libXrandr.so.2.2.0
7f5a0209a000-7f5a02299000 ---p 00008000 08:07 555995                     /usr/lib64/libXrandr.so.2.2.0
7f5a02299000-7f5a0229a000 r--p 00007000 08:07 555995                     /usr/lib64/libXrandr.so.2.2.0
7f5a0229a000-7f5a0229b000 rw-p 00008000 08:07 555995                     /usr/lib64/libXrandr.so.2.2.0
7f5a0229b000-7f5a022a4000 r-xp 00000000 08:07 551396                     /usr/lib64/libXrender.so.1.3.0
7f5a022a4000-7f5a024a3000 ---p 00009000 08:07 551396                     /usr/lib64/libXrender.so.1.3.0
7f5a024a3000-7f5a024a4000 r--p 00008000 08:07 551396                     /usr/lib64/libXrender.so.1.3.0
7f5a024a4000-7f5a024a5000 rw-p 00009000 08:07 551396                     /usr/lib64/libXrender.so.1.3.0
7f5a024a5000-7f5a024a8000 r-xp 00000000 08:07 540807                     /usr/lib64/libgpg-error.so.0.5.0
7f5a024a8000-7f5a026a7000 ---p 00003000 08:07 540807                     /usr/lib64/libgpg-error.so.0.5.0
7f5a026a7000-7f5a026a8000 r--p 00002000 08:07 540807                     /usr/lib64/libgpg-error.so.0.5.0
7f5a026a8000-7f5a026a9000 rw-p 00003000 08:07 540807                     /usr/lib64/libgpg-error
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7f5a0a9b27a0 (LWP 17976)]
0x00007f5a07fe02e5 in raise () from /lib/libc.so.6

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Trunk Testing
« Reply #28 on: 1 August 2009, 14:31:03 »
Ok, not so helpful after all :)

I added some logging around the map init earlier and PolitikerNEU was kind enough to run a test for me which helped narrow it down.  I've now added some more logging to the pathfinder initialising code, if someone could run (aka crash) it on a 64 bit system and post up the glest-adv.log I'd be most grateful :)
Glest Advanced Engine - Code Monkey

Timeline | Downloads

PolitikerNEU

  • Guest
Re: Trunk Testing
« Reply #29 on: 1 August 2009, 14:52:04 »
Here is the glestadv.log:
Code: [Select]
Log file

20: Core data
4490: Tileset: tilesets/forest
4850: TechTree: techs/magitech
4850: Resource type: techs/magitech/resources/energy
4900: Resource type: techs/magitech/resources/food
4910: Resource type: techs/magitech/resources/gold
4940: Resource type: techs/magitech/resources/stone
4970: Resource type: techs/magitech/resources/wood
5000: Faction type: techs/magitech/factions/magic
5000: Unit type: techs/magitech/factions/magic/units/archmage
5210: Unit type: techs/magitech/factions/magic/units/archmage_tower
5320: Unit type: techs/magitech/factions/magic/units/battlemage
5530: Unit type: techs/magitech/factions/magic/units/behemoth
5730: Unit type: techs/magitech/factions/magic/units/daemon
5860: Unit type: techs/magitech/factions/magic/units/dragon
6030: Unit type: techs/magitech/factions/magic/units/drake_rider
6320: Unit type: techs/magitech/factions/magic/units/energy_source
6340: Unit type: techs/magitech/factions/magic/units/ghost_armor
6480: Unit type: techs/magitech/factions/magic/units/golem
6560: Unit type: techs/magitech/factions/magic/units/initiate
6700: Unit type: techs/magitech/factions/magic/units/library
6750: Unit type: techs/magitech/factions/magic/units/mage_tower
6820: Unit type: techs/magitech/factions/magic/units/summoner
6920: Unit type: techs/magitech/factions/magic/units/summoner_guild
6960: Unit type: techs/magitech/factions/magic/units/tower_of_souls
7040: Unit type: techs/magitech/factions/magic/units/wicker_behemoth
7090: Upgrade type: techs/magitech/factions/magic/upgrades/ancient_summoning
7090: Upgrade type: techs/magitech/factions/magic/upgrades/dragon_call
7090: Upgrade type: techs/magitech/factions/magic/upgrades/energy_compression
7090: Upgrade type: techs/magitech/factions/magic/upgrades/energy_sharpening
7110: Upgrade type: techs/magitech/factions/magic/upgrades/hell_gate
7160: Faction types
7180: State cells
7180: Heightmap computations
7180: Calling Map::smoothSurface()
7180: Calling Map::computeNormals()
7190: Calling Map::computeInterpolatedHeights()
7190: Calling Map::computeNearSubmerged()
7200: Calling Map::computeCellColors()
7200: Calling Map::setCellTypes()
7200: Map::init() returning...
7200: Calling World::initSplattedTextures()
7410: Creating ScriptManager
7410: Calling UnitUpdater::init()
7410: PathFinder::init()
7410: AnnotatedMap::AnnotatedMap()
7410: AnnotatedMap::initMapMetrics()
7440: Game
7440: World
7440: Minimap
7440: Tech tree
7450: Tileset
7450: Cells
http://pastebin.com/m35971d1e

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Trunk Testing
« Reply #30 on: 1 August 2009, 15:10:22 »
Ok, all systems go on 64 bit!

PolitikerNEU found and corrected my mistake, many thanks!  ;D

rev 138 should be good for everyone ...
Glest Advanced Engine - Code Monkey

Timeline | Downloads

ewomer

  • Guest
Re: Trunk Testing
« Reply #31 on: 1 August 2009, 16:21:53 »
Works but there is two issues, senerios causes an error and it crashes(i read about it some where i think) and when the level starts with the default map the enemy is right next to me and they start attacking as soon as the game starts.

Edit:
im using the data folder from trunk and not the dowloaded data folder so the spawining issue is fixed as far as i know. and i red the post earlyer about gae_scenarios and does there need to be a seperate scenarios folder

Edit: again
 I guess the current trunk of gae is incompatible with the megapak_v4. that is what is causing the diffrent opponets to be placed to close to gather. and the tech tech is missing from data trunk(?).
« Last Edit: 1 August 2009, 16:49:15 by ewomer »

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Trunk Testing
« Reply #32 on: 2 August 2009, 01:31:32 »
Works but there is two issues, senerios causes an error and it crashes(i read about it some where i think) ...

For scenarios you will need a 'gae_scenarios' directory, and then sub directories in that for 'categories' of scenarios, ie. tutorial, battle, megapack... then the actual scenario directories go in those.

Quote from: ewomer
I guess the current trunk of gae is incompatible with the megapak_v4. that is what is causing the diffrent opponets to be placed to close to gather. and the tech tech is missing from data trunk(?).

Titi's megapack has featured numerous times in my tests, it all works fine as far as I'm aware. The map 'Conflict' is designed for 2v2 with team mates in slots 1 & 2, that's why you're getting attacked straight away :)  It's a nice little map though, you just need to remember to close the #2 slot and put the AI in 3 or 4.

Another bug at runtime, after compiling under debian gnu/linux : autogen.sh script creates symlinks for data directories but they are all broken so it makes glest crash at runtime. This can be fixed manually afterwards or should be fixed beforewards with this patch :

Thank you :)

I think we might as well apply the xerces patch too, if it's only going to be two lines, but we will be dumping xerces shortly in any case.

World::assertConsistiency() should actually be going over zones, not fields. But zones are 'new' and fields have a more refined meaning now. It being debugging code, I'm going to have to tread carefully and have a good look at that one.

Thanks for your efforts!
Glest Advanced Engine - Code Monkey

Timeline | Downloads

ewomer

  • Guest
Re: Trunk Testing
« Reply #33 on: 17 August 2009, 21:49:15 »
ok here we go

Code: [Select]
jam                               
...found 594 target(s)...                                                         
...using 5 temp target(s)...                                                     
...updating 4 target(s)...                                                       
C++ ./build/x86_64-unknown-linux-gnu/optimize/shared_lib/sources/xml/xml_parser.o
shared_lib/sources/xml/xml_parser.cpp: In constructor 'Shared::Xml::XmlNode::XmlNode(TiXmlNode*)':                                                                 
shared_lib/sources/xml/xml_parser.cpp:148: error: 'class TiXmlNode' has no member named 'ValueStr'                                                                 
shared_lib/sources/xml/xml_parser.cpp:151: error: 'DOCUMENT' is not a member of 'TiXmlNode'                                                                         
shared_lib/sources/xml/xml_parser.cpp: In member function 'void Shared::Xml::XmlNode::populateElement(TiXmlElement*) const':                                       
shared_lib/sources/xml/xml_parser.cpp:287: error: no matching function for call to 'TiXmlElement::SetAttribute(const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const char*)'                                           
/usr/include/tinyxml.h:1044: note: candidates are: void TiXmlElement::SetAttribute(const char*, const char*)                                                       
/usr/include/tinyxml.h:1062: note:                 void TiXmlElement::SetAttribute(const char*, int)                                                               
shared_lib/sources/xml/xml_parser.cpp: In constructor 'Shared::Xml::XmlAttribute::XmlAttribute(TiXmlAttribute*)':                                                   
shared_lib/sources/xml/xml_parser.cpp:325: error: 'class TiXmlAttribute' has no member named 'ValueStr'                                                             

    g++ -c -o ./build/x86_64-unknown-linux-gnu/optimize/shared_lib/sources/xml/xml_parser.o  -I/usr/include -DPACKAGE_NAME="gae" -DPACKAGE_TARNAME="gae" -DPACKAGE_VERSION="0.2.11" -DPACKAGE_STRING="gae 0.2.11" -DPACKAGE_BUGREPORT="http://bugs.codemonger.org" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DUSE_POSIX_SOCKETS=/**/ -DX11_AVAILABLE=1 -DHAVE_GLOB_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_BYTESWAP_H=1 -DUSE_SDL=/**/ -DHAVE_PTHREAD=1 -DHAVE_LIBZ=1 -I. -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -pthread -pthread     -I/usr/include -Ishared_lib/include -Ishared_lib/include/platform -Ishared_lib/include/platform/sdl -Ishared_lib/include/platform/posix -Ishared_lib/include/util -Ishared_lib/include/graphics -Ishared_lib/include/graphics/gl -Ishared_lib/include/sound -Ishared_lib/include/sound/openal -Ishared_lib/include/xml -Ishared_lib/include/lua   -Wall -W -Wno-unused -Wno-sign-compare -fno-strict-aliasing -O3 -DNDEBUG -ffast-math -ftree-vectorize -Winit-self -Wmissing-include-dirs -Wwrite-strings -Wextra -Winvalid-pch shared_lib/sources/xml/xml_parser.cpp

...failed C++ ./build/x86_64-unknown-linux-gnu/optimize/shared_lib/sources/xml/xml_parser.o ...
...skipped libglestlib.a for lack of libglestlib.a(xml_parser.o)...
...skipped glestadv for lack of libglestlib.a...
...skipped glest_editor for lack of libglestlib.a...
...failed updating 1 target(s)...
...skipped 3 target(s)...

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Trunk Testing
« Reply #34 on: 18 August 2009, 03:15:38 »
Have you got the tinyxml include files?

I have it compiled but the game is laggy. [r162]
« Last Edit: 18 August 2009, 03:23:24 by hailstone »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Trunk Testing
« Reply #35 on: 18 August 2009, 08:47:09 »
I have it compiled but the game is laggy. [r162]

Quote from: tinyxml.h
// Help out windows:
#if defined( _DEBUG ) && !defined( DEBUG )
#define DEBUG
#endif

Debug mode? World::assertConsistiency() is actually getting called now...

It needs to be moved into either annotated_map.cpp or astar_nodepool.cpp, which both need to have optimisations turned on in debug build, as path_finder.cpp used to.

Glest Advanced Engine - Code Monkey

Timeline | Downloads

ewomer

  • Guest
Re: Trunk Testing
« Reply #36 on: 18 August 2009, 21:05:44 »
Have you got the tinyxml include files?

Yes i have tiny xml installed

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Trunk Testing
« Reply #37 on: 19 August 2009, 14:14:50 »
TIXML_USE_STL needs to be defined, that might be the problem... I'll look into this when I can, but I'm without a computer to call my own for a week or two :(
Glest Advanced Engine - Code Monkey

Timeline | Downloads

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Trunk Testing
« Reply #38 on: 20 August 2009, 00:24:18 »
The Linux project files will need to be updated. I'm not sure how to compile TinxyXML to get a library file. I compiled on Windows before. I didn't realise you were using Linux.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Yggdrasil

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: Trunk Testing
« Reply #39 on: 21 August 2009, 12:53:54 »
Ok. i got it working. Here is a simple patch:
http://www1.inf.tu-dresden.de/~s1445051/rev164_gae_tinyxml.patch

jam build files need to be updated. Problem is: tinyxml has no install routine. So i'm not quite sure where to search for the files. Maybe deliver it with the source and link statically.
I just hacked in Jamconfig for now:
Code: [Select]
...
XERCES_AVAILABLE ?= "yes" ;
XERCES_CFLAGS ?= "-I/path/to/tinyxml -DTIXML_USE_STL" ;
XERCES_LIBS ?= "-L/path/to/tinyxml -ltinyxml" ;
...

I used cvs version of tinyxml because there is a scons buildfile for building libraries.
Code: [Select]
$ cvs -z3 -d:pserver:anonymous@tinyxml.cvs.sourceforge.net:/cvsroot/tinyxml co -P tinyxml
$ cd tinyxml
$ scons staticlibrary=1 program=0 debug=0

I could play or better loose a short game magic vs magic. I was not able to choose tech. Only magic or random was available.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Trunk Testing
« Reply #40 on: 23 August 2009, 01:08:20 »
Ok. i got it working. Here is a simple patch:
http://www1.inf.tu-dresden.de/~s1445051/rev164_gae_tinyxml.patch

Cheers.  I should have realised when I had to build TinyXML myself on windoze that this would be an issue...

So, do we
A) Get TinyXML integrated directly in the source (maybe in shared_lib?)
Or,
B) Just build our own static libs and add them to our deps.

I think A might be the better option, but it's also more work, so I think B is the way to go :)

Glest Advanced Engine - Code Monkey

Timeline | Downloads

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Trunk Testing
« Reply #41 on: 23 August 2009, 03:52:20 »
Keep in mind that GLGooey comes with TinyXML builtin and no namespace around it. I'm not sure if there's going to be a conflict.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Trunk Testing
« Reply #42 on: 23 August 2009, 05:12:10 »
Keep in mind that GLGooey comes with TinyXML builtin and no namespace around it. I'm not sure if there's going to be a conflict.

Murphy's Law, there can be, there will be  :'(

I had thought of this, and I've been meaning to have a chat with you about it, unfortunately I have had few chances to play with C++ recently... If it's built into GLGooey then option A is the way forward.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Yggdrasil

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: Trunk Testing
« Reply #43 on: 24 August 2009, 19:16:48 »
I'm not really a fan of integrating libraries in the source tree because one has to maintain it. But both libraries tinyxml and GLGooey are unmaintained for years, so i think it does not make any difference. I would suggest a separate directory for dependencies like 0ad does it (only for unmaintained stuff) and we should try to only link once against tinyxml. So GLGooey needs some modification to link against tinyxml.

That's my proposal.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Trunk Testing
« Reply #44 on: 26 August 2009, 07:46:00 »
...and we should try to only link once against tinyxml.

try ?  Unless you've got some super bizarre linker, you're not actually going to have a choice on this one :) When linkers see something with the same name as something they've already seen, that's an error.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Trunk Testing
« Reply #45 on: 1 September 2009, 11:06:17 »
I've moved TinyXML into shared_lib, and even found time to make some bug-fixes :)

So if you have all the old deps, it should compile & link ok now.  Sorry for the delay.

Any problems, please let me know.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Yggdrasil

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: Trunk Testing
« Reply #46 on: 11 September 2009, 12:57:46 »
works for me.

Here is a patch which gets rid of some unneeded linking (found in debian package) and removes xerces.

http://www1.inf.tu-dresden.de/~s1445051/r184-gae-jamcleanup.patch

Another patch which enables g3dviewer for linux:

http://www1.inf.tu-dresden.de/~s1445051/r184-gae-g3dviewer.patch

You need to run autogen.sh and configure after applying.

daniel.santos

  • Guest
Re: Trunk Testing
« Reply #47 on: 28 September 2009, 20:36:17 »
Well, I'm terribly sorry about this.  I'm rolling back revision 260 as we speak and I'll re-assemble it without removing tinyxml, as I didn't realize it's state necessitated this (nor that silnarm fixed some bugs in it).

Also, I'm going to re-write the toString() for XmlNode & related classes to support the pretty printing again and to also optimize it.  Using std::string's operator+() is expensive because it allocates a new string each time (with a call to new).  That doesn't matter in most cases, but with the current network code using Xml several times a second, I think it starts to matter.  I'm thinking the best bet is to generalize the Printable and ObjectPrinter classes (now in the network branch) to manage this since they already take care of the bulk of the work and are efficient.  But for now, I'm just going to implement it something like this:

Code: [Select]
void XmlAttribute::toString(stringstream &str) const {
    str << name << "=\"" << value << "\"";
}

string XmlNode::toString() const {
    stringstream str;
    toString(str, string(""), string("  "));
    return str.str();
}

void XmlNode::toString(stringstream &str, const string &indent, const string &indentSingle) const {
    str << indent "<" << name;
    foreach(XmlAttribute* a, attributes) {
        a->toString(str);
        if(a != attributes.last()) {
            str << " ";
        }
    }
    // print closing bracket, body, etc.
    if(children.size()) {
        foreach(XmlNode*n, children) {
            n->toString(str, indent + indentSingle, indentSingle);
        }
    }
    // print closing tag if there was a body or child nodes
}

I guess I could tweak that a bit more by using stack<char> for the indentation, thus eliminating all string addition.  Either way, the network branch is still using the xerces-c and the pretty printing makes a big difference there because it makes debugging the networking so much easier! :)

For now, I'm just going to rebuild my last commit, to rollback the part that removed tinyxml.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Trunk Testing
« Reply #48 on: 28 September 2009, 22:20:11 »
Well, I'm terribly sorry about this.  I'm rolling back revision 260 as we speak and I'll re-assemble it without removing tinyxml, as I didn't realize it's state necessitated this (nor that silnarm fixed some bugs in it).

No no, I don't think we'll find any bugs in tinyxml, the bug fixes were for our code (specifically, probably mine ;)

I don't mind which way we go here... but when I realised we only needed 3 files, I just dumped them in shared_lib (the lib, not the namespace) and moved on.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

daniel.santos

  • Guest
Re: Trunk Testing
« Reply #49 on: 29 September 2009, 00:18:43 »
ahh, ic.  Well I would obviously prefer them outside of our source tree if there are reasonable packages for them for windows and various Linux distributions.  There is one for Gentoo, but I don't know about others.  Now I have to figure out why updates are getting sent empty in network games in the trunk (not that network play is reliable there anyway :)

 

anything