Printable Version of Topic

Click here to view this topic in its original format

RCBot Forums _ Linux _ RC2BOTS

Posted by: luc19707 Feb 26 2007, 09:33 PM

Hi Everidody ,,

I just want to know if it is possible to run the RC2BOT source on a linux machine?If yes can sommeone give me the link for the plugin?Because i think .dll are for windows only.......thanks you .....

Posted by: terminator_2 Feb 26 2007, 10:23 PM

I would be able to provide a test server if a linux variant could be compiled. We're running the Windows32 version at work during lunchtimes and I have been working on some waypoints.

Posted by: luc19707 Feb 27 2007, 12:16 AM

ty terminator your da man

Posted by: Salvax Feb 27 2007, 04:53 AM

not yet, but i hope there would be . smile.gif

Posted by: Cheeseh Feb 27 2007, 11:50 AM

The source is available for anyone who wants to compile in linux, although I have no idea what is needed to compile in linux so they would have to do a little research on the Source developer sdk in linux before hand.

Posted by: Fusionhead Mar 19 2007, 04:24 AM

QUOTE(Cheeseh @ Feb 27 2007, 11:50 AM) *

The source is available for anyone who wants to compile in linux, although I have no idea what is needed to compile in linux so they would have to do a little research on the Source developer sdk in linux before hand.


Hi Cheeseh, nice mod.

I have an AMD 64 Ubuntu 64 Linux server as well a 32 bit verity. I'll look into getting a compile completed. As with you, my time is limited but I'll see what I can do. If others want to take a crack at it, Info can be found at the following link:

http://developer.valvesoftware.com/wiki/Compiling_under_Linux

-Fusionhead


Posted by: Salvax Mar 31 2007, 02:02 PM

there r lots of versions of Linux, for Red Hat , i think GCC is better smile.gif

Posted by: Fusionhead Apr 14 2007, 07:16 AM

QUOTE(Salvax @ Mar 31 2007, 02:02 PM) *

there r lots of versions of Linux, for Red Hat , i think GCC is better smile.gif


I use gcc smile.gif

OK, I'm taking a look at this now. Anyone know how to convert the Microsoft Visual Studio file HPB_Bot2.vcproj to a gcc Makefile?

I've got my gcc/g++ environment working. I really want to get this Linux port working so I can use my Linux box for games only. There's a big difference of how many people join the bot server versus no bots. Right now, I'm hosting my game server on my desktop. Not ideal!

-Fusionhead

Posted by: terminator_2 Oct 9 2007, 10:07 PM

QUOTE(Fusionhead @ Apr 14 2007, 08:16 AM) *

I use gcc smile.gif

OK, I'm taking a look at this now. Anyone know how to convert the Microsoft Visual Studio file HPB_Bot2.vcproj to a gcc Makefile?

I've got my gcc/g++ environment working. I really want to get this Linux port working so I can use my Linux box for games only. There's a big difference of how many people join the bot server versus no bots. Right now, I'm hosting my game server on my desktop. Not ideal!

-Fusionhead


Fusionhead,

I have probably made a breakthrough with the complie for linux, however I'm running 64bit and when I perform a "make", then it comes back saying that the "CPU you selected does not support x86-64 instruction set"!

What I have done so far is to install the HLSDK onto my linux machine and then gone to the HLSDK's linux_sdk directory and had a look at their makefile. I then installed a bit of code called xerces (as stated in the makefile) and apparently this will enable the gcc compiler to read Visual studio proj files!

I am even considering building a temporary linux 32bit machine just to compile the code!!

Regards,

T2

Posted by: Fusionhead Nov 13 2007, 08:11 PM

QUOTE(terminator_2 @ Oct 9 2007, 10:07 PM) *

Fusionhead,

I have probably made a breakthrough with the complie for linux, however I'm running 64bit and when I perform a "make", then it comes back saying that the "CPU you selected does not support x86-64 instruction set"!

What I have done so far is to install the HLSDK onto my linux machine and then gone to the HLSDK's linux_sdk directory and had a look at their makefile. I then installed a bit of code called xerces (as stated in the makefile) and apparently this will enable the gcc compiler to read Visual studio proj files!

I am even considering building a temporary linux 32bit machine just to compile the code!!

Regards,

T2



Hey T2, nice work. smile.gif Did you get a clean compile? That would be great. I haven't had the time to work on this. A 32 bit compile should work on your 64 bit machine.

-Fusionhead

Posted by: terminator_2 Nov 19 2007, 09:26 PM

QUOTE(Fusionhead @ Nov 13 2007, 08:11 PM) *

Hey T2, nice work. smile.gif Did you get a clean compile? That would be great. I haven't had the time to work on this. A 32 bit compile should work on your 64 bit machine.

-Fusionhead


Hey Fusionhead,

Still trying to get the mod to compile...... can get a sample server plugin provided by valve to compiles OK, but the RCBot code fails in some areas. I'm no c++ programmer (can post the failures). I am trying various versions of Linux to get a decent compile environment. Have tried Mandriva, Unbuntu and have now moved on fedora core 6.
Have had best results with gcc4.1.1 but I have seen in some forums that I should be using gcc3.4.6 which gives the best results.
Am still working on it, but I can't spend too mush time on it at the moment myself.
Xerces does convert from a vcproj file to a make file... it's just getting the copiler to work with the RCBot2 code.

T2

Posted by: terminator_2 Mar 4 2008, 10:16 PM

Cheeseh,

Firstly, I can't thank you enough for coding the bots for HL2DM...... we play during our lunch break at work. We used to able to get 5 humans deathmatch, but were told off because of all the peronal pc's on site and therefore we looked to using the bots and now have 3 humans and 11 bots team dethmatch - 30 miunte frag fest!

I have been extremely busy over the past year waypointing loads of maps (some aren't fully optimised, some are not finished.) but I was wondering if you would like them...... (if you can give me the ability to upload them somewhere then I will!). I have been using Salvax's ladder code, so some of the maps have areas for ladders.

I posted some entries on the forum regarding my attempts at compiling for Linux (so I can run the bots at home), but have really now come to a stop. I can get a sample plugin to compile (from valve) using gcc and also a tool called xerces (which can convert a vcproj file). However, when I try a rcbot2 compile it fails with some errors (This is the first): -

[nick@localhost linux_sdk]$ make

if [ -z "/usr/bin/gcc34" ]; then echo "Compiler not defined."; exit; fi

if [ ! -d . ];then mkdir .;fi

cd .

if [ ! -f "tier0_i486.so" ]; then ln -s ../../hl2mp/bin/tier0_i486.so .; fi

if [ ! -f "vstdlib_i486.so" ]; then ln -s ../../hl2mp/bin/vstdlib_i486.so .; fi

./vcpm ../utils/HPB_Bot2/HPB_Bot2.vcproj

Valve Software - vcprojtomake.exe (Feb 24 2008)

make -f Makefile.mod CC=/usr/bin/gcc34 CPLUS=/usr/bin/g++34 CPP_LIB="/usr/lib/gcc/i386-redhat-linux/3.4.6/libstdc++.a /usr/lib/gcc/i386-redhat-linux/3.4.6/libgcc_eh.a" BUILD_DIR=. BUILD_OBJ_DIR=./obj SOURCE_DIR=.. SHLIBLDFLAGS=-shared -Wl,-Map,mod_map.txt -Wl SHLIBEXT=so CLINK=/usr/bin/gcc34 CFLAGS=" -mtune=i686 -march=pentium3 -mmmx -O3 -fpermissive -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Usprintf=use_Q_snprintf_instead_of_sprintf -Ustrncpy=use_Q_strncpy_instead -UPROTECTED_THINGS_ENABLE" LDFLAGS="-lm -ldl ../../hl2mp/bin/tier0_i486.so ../../hl2mp/bin/vstdlib_i486.so mathlib_i486.a choreoobjects_i486.a tier1_i486.a" ARCH=i486 GAME_DIR=../../hl2mp MOD_CONFIG=HPB_bot2_ReleaseWin32 NAME=hpb_bot2 XERCES_INC_DIR=/usr/local/src/xerces-c_2_6_0/include XERCES_LIB_DIR=/usr/local/src/xerces-c_2_6_0/lib

make[1]: Entering directory `/hl2sdk/linux_sdk'

mkdir -p obj/hpb_bot2_i486/utils/HPB_Bot2

mkdir -p obj/hpb_bot2_i486/utils/HPB_Bot2/public

mkdir -p obj/hpb_bot2_i486/utils/HPB_Bot2/public/tier0

mkdir -p obj/hpb_bot2_i486/utils/HPB_Bot2/tier1

/usr/bin/g++34 -w -I../utils/HPB_Bot2/../../public -I../utils/HPB_Bot2/../../public/engine -I../utils/HPB_Bot2/../../public/tier0 -I../utils/HPB_Bot2/../../public/tier1 -I../utils/HPB_Bot2/../../dlls -I../utils/HPB_Bot2/../../game_shared -DNDEBUG -mtune=i686 -march=pentium3 -mmmx -O3 -fpermissive -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Usprintf=use_Q_snprintf_instead_of_sprintf -Ustrncpy=use_Q_strncpy_instead -UPROTECTED_THINGS_ENABLE -o obj/hpb_bot2_i486/utils/HPB_Bot2/bot.o -c ../utils/HPB_Bot2/bot.cpp

In file included from ../utils/HPB_Bot2/../../game_shared/usercmd.h:16,

from ../utils/HPB_Bot2/bot.cpp:44:

../utils/HPB_Bot2/../../game_shared/imovehelper.h:20: error: use of enum `PLAYER_ANIM' without previous declaration

../utils/HPB_Bot2/../../game_shared/imovehelper.h:81: error: `PLAYER_ANIM' has not been declared

In file included from ../utils/HPB_Bot2/bot.h:47,

from ../utils/HPB_Bot2/bot.cpp:54:

../utils/HPB_Bot2/../../game_shared/IEffects.h:23: error: use of enum `ShakeCommand_t' without previous declaration

In file included from ../utils/HPB_Bot2/bot_schedule.h:36,

from ../utils/HPB_Bot2/bot.cpp:55:

../utils/HPB_Bot2/bot_genclass.h: In member function `void dataUnconstArray<T>::Remove(T)':

../utils/HPB_Bot2/bot_genclass.h:645: error: expected `;' before "it"

../utils/HPB_Bot2/bot_genclass.h:647: error: `it' was not declared in this scope

make[1]: *** [obj/hpb_bot2_i486/utils/HPB_Bot2/bot.o] Error 1

make[1]: Leaving directory `/hl2sdk/linux_sdk'

make: *** [mod] Error 2

It's the last few lines that I don't understand..... these are valve standard files! ..... any ideas? If you do, then we're nearer a linux compile!

Any help would be appreciated!

t_2

Posted by: Fusionhead Mar 6 2008, 09:54 PM

Hey T2, nice work again. Have you checked the steam developer forums?

http://forums.steampowered.com/forums/forumdisplay.php?f=191

I shut down all of my servers a few months ago so I no longer have a need but I may crank them up again at some point. I wish that I could help. Just no time. Another place to ask is some of the modders sites. Like you could try asking on.

http://www.mani-admin-plugin.com/index.php?option=com_smf&Itemid=26&board=1.0

http://www.sourcemm.net/?go=plugins

They should be able to steer you in the right direction if not answer directly.

Good luck!

~Fusionhead






Posted by: terminator_2 Apr 18 2008, 08:43 PM

QUOTE(Fusionhead @ Mar 6 2008, 10:54 PM) *

Hey T2, nice work again. Have you checked the steam developer forums?

http://forums.steampowered.com/forums/forumdisplay.php?f=191

I shut down all of my servers a few months ago so I no longer have a need but I may crank them up again at some point. I wish that I could help. Just no time. Another place to ask is some of the modders sites. Like you could try asking on.

http://www.mani-admin-plugin.com/index.php?option=com_smf&Itemid=26&board=1.0

http://www.sourcemm.net/?go=plugins

They should be able to steer you in the right direction if not answer directly.

Good luck!

~Fusionhead


Fusionhead.... thanks for the info. I had searched the suggested forums and i had not found the answers that I wanted.

The news is that I have started to get a compile. It has now processed 13 of the 29 C++ files. The compile now fails in bot_main.cpp at lines 530 - static ConVar empty_cvar(BOT_VER_CVAR, BOT_VER, FCVAR_PLUGIN, BOT_NAME_VER);
It then fails at lines 604, 612, 613, 615, 616, 617, 632, 633, 634, 636 and then finally falls over!

I'm no C++ programmer, so I'm slow at running through the code, but at least we now have an environment that will compile the code (on fedora core and unbuntu).
Have had some luck with cygwin, but it seems to get further on Fedora core and Unbuntu.
Anyone able to to look at a dump of the latest failure?

terminator_2

Posted by: terminator_2 May 3 2008, 08:24 PM

Update!!!

I've sat through each c++ file and found most of the fixable errors and I now get something that compiles, however, I can't get it to load in the Linux Dedicated Server.
I have tried various ways of compiling the code on various platforms and I still get the same. The complile goes ahead without any error messages using Valves own Makefiles (which converts a VCProj file to something that can be used in Linux).
When I issue an ldd -d on the resulting file(in this case HPB_bot2_i486.so) it says something about an undefined symbol in the HPB_bot2_i486.so and quoting _ZN17CNavMeshNavigator6beliefE6VectorS0_ff9BotBelief
We're so near now to the Linux Compile.

Cheeseh, can you confirm all the bot*.cpp and bot*.h files are needed for the compile. I have edited the vcproj file to exclude bot_memory etc, but just wondering if I have missed something?

t_2

Posted by: Fusionhead Dec 3 2008, 11:46 PM

T2, I thought I'd check back here. You probably gave up on this by now.

Posted by: terminator_2 Dec 4 2008, 09:46 PM

QUOTE(Fusionhead @ Dec 4 2008, 12:46 AM) *

T2, I thought I'd check back here. You probably gave up on this by now.



I've not given up.... I have now got the code to compile via two methods (using valves Makefile + cross compilier xerces) and I have also used Sourcemm's version of copiling and a moddified version of their Makefile. Unfortunately, the resulting plugin fails to load. I have also got the code to compile in two variants of Linux - both Fedora core 6 and Unbuntu (can't remeber what version number).

The failure is somewhere in bot.navmesh.cpp I think, but I haven't been able to track down the error just yet. It's still WIP, but I don't understand why it is not working.

performing an ldd -d -r on HPB_Bot2_mm_i486.so results in: -

[nick@localhost Linux]$ ldd -d -r HPB_Bot2_mm_i486.so
linux-gate.so.1 => (0x00110000)
libm.so.6 => /lib/libm.so.6 (0x00498000)
libdl.so.2 => /lib/libdl.so.2 (0x004bf000)
/hl2mp/bin/tier0_i486.so (0x004c3000)
/hl2mp/bin/vstdlib_i486.so (0x004f9000)
libc.so.6 => /lib/libc.so.6 (0x0050d000)
/lib/ld-linux.so.2 (0x80000000)
libpthread.so.0 => /lib/libpthread.so.0 (0x0064d000)
tier0_i486.so => not found
undefined symbol: _ZN17CNavMeshNavigator6beliefE6VectorS0_ff9BotBelief (./HPB_Bot2_mm_i486.so)
undefined symbol: _ZSt20__throw_length_errorPKc (./HPB_Bot2_mm_i486.so)
undefined symbol: __cxa_guard_release (./HPB_Bot2_mm_i486.so)
undefined symbol: _ZSt17__throw_bad_allocv (./HPB_Bot2_mm_i486.so)
undefined symbol: __cxa_guard_acquire (./HPB_Bot2_mm_i486.so)


Thanks for the interest, t_2.

QUOTE(Fusionhead @ Dec 4 2008, 12:46 AM) *

T2, I thought I'd check back here. You probably gave up on this by now.



I've not given up.... I have now got the code to compile via two methods (using valve's Makefile + cross compilier xerces) and I have also used Sourcemm's version of copiling and a modified version of their Makefile. Unfortunately, the resulting plugin fails to load. I have also got the code to compile in two variants of Linux - both Fedora core 6 and Unbuntu (can't remeber what version number).

The failure is somewhere in bot.navmesh.cpp I think, but I haven't been able to track down the error just yet. It's still WIP, but I don't understand why it is not working.

performing an ldd -d -r on HPB_Bot2_mm_i486.so results in: -

[nick@localhost Linux]$ ldd -d -r HPB_Bot2_mm_i486.so
linux-gate.so.1 => (0x00110000)
libm.so.6 => /lib/libm.so.6 (0x00498000)
libdl.so.2 => /lib/libdl.so.2 (0x004bf000)
/hl2mp/bin/tier0_i486.so (0x004c3000)
/hl2mp/bin/vstdlib_i486.so (0x004f9000)
libc.so.6 => /lib/libc.so.6 (0x0050d000)
/lib/ld-linux.so.2 (0x80000000)
libpthread.so.0 => /lib/libpthread.so.0 (0x0064d000)
tier0_i486.so => not found
undefined symbol: _ZN17CNavMeshNavigator6beliefE6VectorS0_ff9BotBelief (./HPB_Bot2_mm_i486.so)
undefined symbol: _ZSt20__throw_length_errorPKc (./HPB_Bot2_mm_i486.so)
undefined symbol: __cxa_guard_release (./HPB_Bot2_mm_i486.so)
undefined symbol: _ZSt17__throw_bad_allocv (./HPB_Bot2_mm_i486.so)
undefined symbol: __cxa_guard_acquire (./HPB_Bot2_mm_i486.so)


Thanks for the interest, t_2.

Posted by: Enra Apr 27 2009, 08:18 PM

Any updates on the Linux build?

I have run into the first batch of problems discussed here.

CODE
../utils/RCBot2/../../game/shared/imovehelper.h:20: error: use of enum ‘PLAYER_ANIM’ without previous declaration
../utils/RCBot2/../../game/shared/imovehelper.h:81: error: ‘PLAYER_ANIM’ has not been declared
../utils/RCBot2/../../game/shared/IEffects.h:23: error: use of enum ‘ShakeCommand_t’ without previous declaration
../utils/RCBot2/bot_genclass.h: In member function ‘void dataUnconstArray<T>::Remove(T)’:
../utils/RCBot2/bot_genclass.h:647: error: expected `;' before ‘it’
../utils/RCBot2/bot_genclass.h:649: error: ‘it’ was not declared in this scope


I am using GCC 4.1.3 with the same options that I use to build my mod so I didn't expect errors in the Valve standard headers. What was the solution to this problem?

Posted by: Enra Apr 29 2009, 06:08 PM

OK, tracked down and fixed all Linux related problems. Now the bots loads fine on a dedicated Linux server.

Posted by: rcweed May 2 2009, 12:16 PM

QUOTE(Enra @ Apr 29 2009, 06:08 PM) *

OK, tracked down and fixed all Linux related problems. Now the bots loads fine on a dedicated Linux server.


hi enra,

can you please share your files? thx

Posted by: Enra May 9 2009, 04:06 PM

Here is the code: http://www.age-of-chivalry.com/team/enra/rcbot2aoc20090509.zip

Note that this code is setup to create bots for Age of Chivalry. To switch to TF2 you need to change some defines in bot_const.h

CODE
// Defines when compiling for a specific MOD/Bot type
#define BOT_USES_ADDONS_FOLDER_AS_BASE false
#define BOT_IS_SET_TO_ONLY_SUPPORT_SPECIFIC_MOD false


Posted by: rcweed May 13 2009, 01:05 AM

QUOTE(Enra @ May 9 2009, 04:06 PM) *

Here is the code: http://www.age-of-chivalry.com/team/enra/rcbot2aoc20090509.zip

Note that this code is setup to create bots for Age of Chivalry. To switch to TF2 you need to change some defines in bot_const.h
CODE
// Defines when compiling for a specific MOD/Bot type
#define BOT_USES_ADDONS_FOLDER_AS_BASE false
#define BOT_IS_SET_TO_ONLY_SUPPORT_SPECIFIC_MOD false




thx

but can you provide a completely compiled tf2 rcbot version ready to download ?smile.gif

thx in advance

Posted by: bir3yk Jun 4 2009, 09:46 PM

Enra Hi. Would not be able to put a working version HPB_bot2_i486.so TF2 , even better than the last assembly,
If the course is not difficult. I can not compile sad.gif
Thank you.

Posted by: bir3yk Jun 11 2009, 08:12 AM


I compiled RCBot2 75 release under linux dedicated server and it even works wink.gif

Posted by: CaptainAdder Jun 2 2013, 04:04 PM

QUOTE(bir3yk @ Jun 11 2009, 10:12 AM) *

I compiled RCBot2 75 release under linux dedicated server and it even works wink.gif


Could you share with us?

Posted by: Cheeseh Jun 6 2013, 07:37 AM

QUOTE(CaptainAdder @ Jun 2 2013, 05:04 PM) *

Could you share with us?


he meant SVN version 75 not 0.75 (check the date hehe)


try http://sourceforge.net/projects/rcbot2/files/rcbot2/RCBot2%200.75%20R2/RCBot2_075R2_linux.tar.gz/download