PDA

View Full Version : POD-Bot mm build for x86-64 chokes on GetGunPosition (probably)


Lazarus Long
16-02-2005, 04:31
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"):
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:
relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPICIt 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):
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 queryI 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, 04:37
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, 03:57
Hello, 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, 10:01
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):
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)