.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Releases, Installers, Docs & Coding (http://forums.bots-united.com/forumdisplay.php?f=48)
-   -   POD-Bot mm build for x86-64 chokes on GetGunPosition (probably) (http://forums.bots-united.com/showthread.php?t=3594)

Lazarus Long 16-02-2005 03:31

POD-Bot mm build for x86-64 chokes on GetGunPosition (probably)
 
Hello, everybody:

I think that this should be asked here, if not I appologize.

I'm trying to run POD-Bot mm on a 64bit Linux server (Athlon64).

I managed to compile it although I had to tweak a bit the Makefile. I had to use GCC 3.3.5 since no Pure64 Linux distribution, that I know of, carries GCC 2.95.3 and I got it compiled without any error, by using the following (I tried using "-O2" but it made the plugin segfault when loaded and anyway the recommended for x86-64 is "-O3"):
Code:

CPPFLAGS = -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -fPIC -O3 -DNDEBUG -march=x86-64 \
        -w -I"../metamod" -I"../../devtools/hlsdk-2.3/multiplayer/common" \
        -I"../../devtools/hlsdk-2.3/multiplayer/dlls" \
        -I"../../devtools/hlsdk-2.3/multiplayer/engine" \
        -I"../../devtools/hlsdk-2.3/multiplayer/pm_shared"

I used "-fPIC" because previously the linker bailed out with:
Code:

relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC
It compiled OK but Metamod produces the following error (I think it's related to GetGunPosition but, although I can more or less follow the flow of code, I'm no coder):
Code:

L 02/16/2005 - 01:28:05: [META] ERROR: dll: Failed query plugin '<podbot_mm_amd64.so>';
  Couldn't open file '/usr/local/games/hlds/cstrike/addons/podbot/dlls/podbot_mm_amd64.so':
  /usr/local/games/hlds/cstrike/addons/podbot/dlls/podbot_mm_amd64.so: undefined symbol:
  _Z14GetGunPositionP7edict_s
L 02/16/2005 - 01:28:05: [META] ERROR: dll: Skipping plugin '<podbot_mm_amd64.so>';
  couldn't query

I compiled it with both the SDK that comes with POD-Bot mm and the one from Metamod, with the same result, so can anyone hint me to what should I look for?

Thank you very much, regards,

sPlOrYgOn 16-02-2005 03:37

Re: POD-Bot mm build for x86-64 chokes on GetGunPosition (probably)
 
Thank you a lot for your help. It is appreciated a lot.
That error should probably be blamed on me :)
I forgot to remove it after playing around with 'inline'
http://splorygon.game-host.org:8080/ download the util.cpp right click and save target as..

Lazarus Long 17-02-2005 02:57

POD-Bot mm build for x86-64 segfaults
 
3 Attachment(s)
Hello, sPlOrYgOn:
Quote:

Originally Posted by sPlOrYgOn
http://splorygon.game-host.org:8080/ download the util.cpp right click and save target as..

OK, I've done it and the loading error is gone. That's the good news, the bad one is that it's segfaulting.

I don't know what might be needed to check it, if anyone is willing to, of course, so I'm attaching the plain output untill the segfault (cstrike-standard.output.zip) and a trace output as well (cstrike-standard.trace.zip). I'm also attaching the modified Makefile in case anybody might want to give it a look (I modified it a bit to do architecture auto-detection and build the correct binary, so it's a bi-arch Makefile).

Anyway, and in case someone will give it a look, if anything else is needed just tell me what and I'll try, to my best knowledge, to help.

Best regards,

(BTW: I don't know who maintains the Forums, but tar, gz and/or bz2 as valid attachment extensions are harmless and might be useful... Windowscentrics... humpf!)

Lazarus Long 18-02-2005 09:01

POD-Bot mm build for x86-64 segfaults (continuation)
 
1 Attachment(s)
Hello, everybody:

Sorry about this, but over the last 14 years I didn't even thought in source code, programming, debugging and the like, so I'm a bit rusty.

I know what you all are thinking and you are right, of course that I didn't include the most important piece of information, sorry.

Here it goes, I recompiled the module with "-O0 -g" and ran gdb on it, and here is the output (cstrike-standard.debug.zip), once again I'm sorry for my previous incomplete information.

As you can see on the last lines of the text the problem seems to be in waypoint.cpp at line 2460. The list refers two memset() so it might be a memory alocation problem (as I recall a Segmentation fault usually is, but it was a long time ago):
Code:

WaypointLoad ();
InitVisTab ();
InitExperienceTab ();

// Initialise the Client Struct for welcoming and keeping track who's connected
memset (clients, 0, sizeof (clients));

// Initialize the bots array of structures
memset (bots, 0, sizeof (bots));

Best regards,

(After re-reading my last post I realized that the final comment might look a litle harsh since I don't usually use emoticons, I hope that everybody understands that I was joking, I didn't intend to bash anybody)


All times are GMT +2. The time now is 19:08.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.