View Full Version : POBBot R2b46b AMD64 binary (and AMD64 fixed source)
ghost of evilspy
26-03-2005, 18:02
I was requested to make amd64 binary of podbot at http://forums.unitedadmins.com/index.php?showtopic=40666.
here: http://koti.mbnet.fi/axh/files/64bit/podbot_mm_amd64.zip
source: http://koti.mbnet.fi/axh/files/64bit/podbotsrcB_amd64.zip
Changes needed for AMD64:
PATH, PATH5 and PATH6 in waypoint.h have pointer 'next' as last member. Size of pointer is 8 bytes on AMD64 and 4 bytes on x86. This caused WaypointLoad() and WaypointSave() handle waypoint-files incorrectly on AMD64. Fix was to simply use SIZEOF_PATH* macros instead sizeof(PATH*) in those two functions. See SIZEOF_PATH in waypoint.h of fixed source.
sPlOrYgOn
26-03-2005, 18:53
Thank you a lot!
We've been asked to make a 64bit build too and someone here tried but it kept crashing and I was unable to help since i don't have a 64bit processor nor any knowledge of it.
3594
Thank you for finding out why it kept crashing :)
Lazarus Long
27-03-2005, 12:45
Hello, ghost of evilspy:
Changes needed for AMD64:
PATH, PATH5 and PATH6 in waypoint.h have pointer 'next' as last member. Size of pointer is 8 bytes on AMD64 and 4 bytes on x86. This caused WaypointLoad() and WaypointSave() handle waypoint-files incorrectly on AMD64. Fix was to simply use SIZEOF_PATH* macros instead sizeof(PATH*) in those two functions. See SIZEOF_PATH in waypoint.h of fixed source.Thank you very much for this. I had pinpoint it down to waypoint.cpp but I haven't the skill to fix it so I just reported it back in hope someone could.
I must confess I forgot you, since you have ported so many MetaMod plugins to x86_64, some of them on my request, it would be logical to ask you for this one also, but as I said I forgot you, shame on me.
I'll be testing it after the weekend, and post the results as soon as possible.
Once again thank you very much ghost of evilspy.
Best regards,
Lazarus Long
27-03-2005, 17:33
Hello, everybody:
For those who want to include ghost of evilspy changes to the source code I'm attaching a patch with them. There are two patch files podbotsrcB_x86_64.patch to run against the original source code files (with CR/LF DOS style EOL) and podbot_plugin.2005-03-12.x86_64.patch in case you converted the original *.cpp and *.h with dos2unix to compile under Linux. Please only apply the one that matches your source code or it will break compile.
I'm also attaching a full cross-compile Makefile (my own small contribution, if anyone is interested in it). It will autodetect in which environment it is building and act accordingly, one can also force the target to be built by calling make with either windows, i386 or amd64 or one can build for all targets by calling make with all. This Makefile is based on the original makefile with changes taken from Building the hlds_l Linux .so (http://articles.thewavelength.net/617/) article by Vino at Wavelength (http://articles.thewavelength.net/) (acknowledgement goes to [NvT]_KaszpiR_ for the pointer (http://forums.bots-united.com/showthread.php?t=3691)). It was developed with gcc-2.95 for x86, gcc-3.4 for x86_64 and mingw32 for windows on a Debian testing (sarge) distribution.
Best regards,
EDIT: Updated the Makefile in podbot_plugin_x86_64.zip (by recommendation of ghost of evilspy)
ghost of evilspy
27-03-2005, 19:11
'-Xlinker --add-stdcall-alias' is needed for LDFLAGS for mingw. Otherwise 'GiveFnptrsToDll' will be exported as 'GiveFnptrsToDll@8'.
Lazarus Long
27-03-2005, 20:01
Hello, ghost of evilspy:
'-Xlinker --add-stdcall-alias' is needed for LDFLAGS for mingw. Otherwise 'GiveFnptrsToDll' will be exported as 'GiveFnptrsToDll@8'.It wasn't giving me any error at runtime, but since it might be due to my building environment, I went ahead and added it.
The above podbot_plugin_x86_64.zip (http://forums.bots-united.com/attachment.php?attachmentid=656) already has the updated Makefile.
Thank you, regards,
To knowledge of the people they don't know who is ghost of evilspy - it's Hullu - the same guy improving / fixing metamod.
Welcome to BU, Hullu. :)
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.