Printable Version of Topic

Click here to view this topic in its original format

RCBot Forums _ Linux _ Compiling Rcbot - Linux

Posted by: Venom Dec 6 2006, 09:50 PM

Hello,
I am having problems setting up the g++ compiler under linux and the g++ compiler for Windows wasnt much help either. I understand fully how to compile under Visual Studio but having little experience of Linux in general, i am not sure how to setup the compiler in order to compile the code.

If someone would be so kind as to provide me with so guideance i would be very greatful.

Venom

Posted by: LordSkitch Dec 7 2006, 01:31 AM

under gentoo, and possibly others cause i dont use anything but gentoo...


cd /pathto/rcbot/dlls
make -f makefile_linux
or
make -f makefile_linux_mm

i just tried to compile rcbot on my linux system and i got several errors, youll have to diddle the code a bit.

Posted by: Venom Dec 7 2006, 08:08 AM

QUOTE(LordSkitch @ Dec 7 2006, 01:31 AM) *

under gentoo, and possibly others cause i dont use anything but gentoo...
cd /pathto/rcbot/dlls
make -f makefile_linux
or
make -f makefile_linux_mm

i just tried to compile rcbot on my linux system and i got several errors, youll have to diddle the code a bit.


Do you mind helping me with the linux compiling?

As i have a dedicated server with 100mbit connection now but the server runs Linux which is something i am not use too and as i enjoy developing areas of rcbot, i would like to understand how to develop and compile in both VS (which i know already) and Linux (which i know very little about).

If you could help me sort out the errors i would be be very greatful smile.gif

I am downloading Gentoo now, i will then download the latest source and attempt to compile it using the the command you gave me, then i will have a look at the errors, but having never worked with linux, i dont think i will be able to fix them without your help.

Posted by: LordSkitch Dec 7 2006, 08:28 AM

QUOTE(Venom @ Dec 7 2006, 02:08 AM) *

Do you mind helping me with the linux compiling?

As i have a dedicated server with 100mbit connection now but the server runs Linux which is something i am not use too and as i enjoy developing areas of rcbot, i would like to understand how to develop and compile in both VS (which i know already) and Linux (which i know very little about).

If you could help me sort out the errors i would be be very greatful smile.gif

I am downloading Gentoo now, i will then download the latest source and attempt to compile it using the the command you gave me, then i will have a look at the errors, but having never worked with linux, i dont think i will be able to fix them without your help.



gentoo may not be the one to start out with... i made that mistake, but it turned out somewhat good cause it does what i need without doing extra stupid crap. when you go to use it, its got no GUI and stuff, you have to download and compile KDE or gnome if you want those. you just get the shell, which is delicious for servers, cause you dont need the overhead of the GUI. but if you know enough linux to get it going, sure ill help out where i can. most of my coding on linux has been for hardware interaction though, not crazy bots with AI and such... but I've edited the code under windows, cause... i like windows and use it for my game/web servers.


and i want a damn 100mbit connection lol

Posted by: Venom Dec 7 2006, 09:26 AM

The operating system which came with my server was: Fedora Core 4

Its very similar to gentoo it seems so i think i will stay with Fedora Core for the moment as i cannot see any special difference between the two other than the theme.

I have downloaded the source code onto the server, if you could guide me as to what programs i need install in order to compile them and what code to add i would be very greatful.

I work on RCbot from the multiple mode side of it, i have currently got (i havnt shared the source yet, bad off me sad.gif ) Marine Vs Marine and Alien vs Alien working for Windows which it didnt support before. I have started to continue development on adding another extra feature which you will love if you have an NS server smile.gif

But as mentioned before, Linux seems alot harder to compile stuff under compared with Visual Studio, with Visual Studio you just load the worksheet, edit some code, then compile the rcbot_mm.dll (i perfer mm smile.gif ), linux on the other hand, doesnt seem to have an installer as such for applications, you just kinda put them into a directory or something is my understanding of it.

But if you could help me compile source under Linux, myself and others would be very greatful as i have made some changes to the RCbot.

Thanks
Venom

UPDATE: I managed to find the development tools needed to compile RCbot with, the annoying thing is that the server wont install those packages lol.

Posted by: LordSkitch Dec 7 2006, 11:01 AM

gentoo comes with gcc, the only thing i had to install was unzip cause it was in zip form instead of tar.gz

( to install [download and compile] unzip under gentoo: emerge unzip )

the makefile is kinda like the workspace/project files in VC++, it tells the compiler what to compile and link and all that.

so instead of loading the project, you edit the cpp's and h's and whatnot directly, then make the makefile and it compiles it out to a .so library that you can load with hl/metamod, as far as installing gcc on FC4, it should come with GCC 4.0, which should be enough to compile it with O2 flags and such

try going to the shell and typing g++ --help and see if it brings up the compiling flags

Posted by: Venom Dec 7 2006, 03:03 PM

OK, g++ is installed correctly now i hope.

But when i compile it, i get so many errors, but i am guessing you know how to fix them?

Attached Image

Venom

Posted by: LordSkitch Dec 7 2006, 11:32 PM

lol im sure i could with enough time, most of them are probably formatting and compatibility issues, find the first error in the string of errors and see if you can tell anything wrong with it.

Posted by: Venom Dec 8 2006, 08:06 AM

Just wondering, if you have managed to fix the bugs and errors in your version of Rcbot, why dont you just release that? instead of people keep having to convert the current source code, which seems to be all Windows based.

I really dont understand how Visual Studio can compile it with only one error / warning and with a Linux compiler you get a whole stream of errors. Fixing the first error is not going to fix the rest of them, most of them seem to be "not declared" errors which is kinda stupid as we know the declared variables work as the Visual Studio compiles it correctly.

If you have managed to fix all these errors in your source code would it be possible if you could release or send me the latest working linux code?

UPDATE:
Intresting, the non-metamod version seems to compile almost correctly, one or two voids and data types to sort out then the non-metamod version would be compiled, but thats not what i wanted, i require the metamod version of RCbot which comes up with 20 or so errors sad.gif

Posted by: Cheeseh Dec 8 2006, 04:15 PM

ive uploaded a new source + try these makefiles:

http://rcbot.bots-united.com/forums/index.php?showtopic=960

Posted by: Venom Dec 8 2006, 06:10 PM

QUOTE(Cheeseh @ Dec 8 2006, 04:15 PM) *

ive uploaded a new source + try these makefiles:

http://rcbot.bots-united.com/forums/index.php?showtopic=960


Thanks for the information, the new beta linux dlls didnt work on linux, when running the server, it didnt pick rcbot up where as when i had the old linux dlls installed, the server would run rcbot on it.

I will try and see if the makefile works, just curious, how do i use the makefile to compile the code? lol i know, stupid question but i have never used linux to compile code.

Any way, thanks for helping Chesseh and its good to see you around smile.gif

Posted by: LordSkitch Dec 8 2006, 06:19 PM

the linux compile fails because linux and windows dont follow the exact same rules. if they did you wouldnt ever have to "port" a program from one OS to the other, they'd be the exact same.

i tried to compile using the new source and makefile, still came up with a buch of errors... declarations mostly, atleast from what i can see, i dont know how to output the errors to a file so i can send it anywhere lol


and again, to compile using the make file... save the makefile in your rcbot source/dlls directory, and do

make -f makefile_linux_mm

and the line 19 error, fix the formatting of the tabs... (ie, add tabs to those tabbed lines)

Posted by: Venom Dec 8 2006, 06:25 PM

well the new makefile for mm has a problem on line 19 according to what its telling me sad.gif

Error: Missing Seperator

BTW LordSkitch, did the new Linux dlls work for you either?

Posted by: Cheeseh Dec 8 2006, 09:46 PM

i attached the make files this time, it was a problem with the copy paste on the forums You should move the -I../metamod to the same line as the others

Posted by: Venom Dec 8 2006, 11:09 PM

Im sorry i dont see anything attached to either posts and on http://filebase.bots-united.com i dont see anything new either.

Posted by: Cheeseh Dec 9 2006, 01:20 AM

QUOTE(Venom @ Dec 8 2006, 11:09 PM) *

Im sorry i dont see anything attached to either posts and on http://filebase.bots-united.com i dont see anything new either.

hmm my zip attachment didnt attach right sad.gif

i uploaded it to the server
http://rcbot.bots-united.com/downloads/rcbot_new/makefile.zip

Posted by: Venom Dec 9 2006, 07:58 AM

Thanks for the make files.

It didnt make a difference though sad.gif

If you are able to compile the source code correctly for Linux Cheeseh, would you be able to release a linux version of the code? because there seems to be some difference between the Windows and Linux code.

If worse comes to worse, i will just have to compile and develop RCbot under Windows for people, but as i have a Linux server, i would like to use and test RCbot development on my own server as well as support Linux users and not just Windows.

I presume that the Source Code you got is either modified or the compiler has been modified in order for you to compile source code correctly without errors, if so would you be able to release the linux only source code or tell me how to make the changes to get it to compile correctly.

It seems annoying that i am having all this trouble when you and LordSkitch seem to be able to compile it correctly. I hope i am not doing anything wrong or using an out of date compiler.

Posted by: LordSkitch Dec 9 2006, 08:28 AM

he doesnt have a linux system, im downloading the new files on my linux system at the moment, waiting to compile...

...wait for it...

nope errors.


QUOTE
It seems annoying that i am having all this trouble when you and LordSkitch seem to be able to compile it correctly. I hope i am not doing anything wrong or using an out of date compiler.


neither me nor Cheeseh has been able to compile it in linux, he cant because he doesnt have a linux system, and i cant because i cant be assed to go through and fix all the errors. lol



alright, finally figured out how to get an output..

make -f <makefile> &> <output file name>

and the error log i get is:

CODE
g++ -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -DRCBOT_META_BUILD -m486 -O2 -w -I../engine -I../common -I../pm_shared -I../metamod -c bot_ga.cpp -o bot_ga.o
In file included from osdep.h:48,
                 from h_export_meta.h:40,
                 from bot_ga.cpp:37:
log_meta.h:40:43: error: enginecallback.h: No such file or directory
In file included from log_meta.h:41,
                 from osdep.h:48,
                 from h_export_meta.h:40,
                 from bot_ga.cpp:37:
sdk_util.h:50:18: error: util.h: No such file or directory
sdk_util.h: In function 'char* ENTITY_KEYVALUE(edict_t*, char*)':
sdk_util.h:67: error: 'g_engfuncs' was not declared in this scope
sdk_util.h: In function 'void ENTITY_SET_KEYVALUE(edict_t*, char*, char*)':
sdk_util.h:73: error: 'g_engfuncs' was not declared in this scope
sdk_util.h:74: error: 'ENTINDEX' was not declared in this scope
sdk_util.h: In function 'char* SERVERINFO(char*)':
sdk_util.h:79: error: 'INDEXENT' was not declared in this scope
sdk_util.h: In function 'void SET_SERVERINFO(char*, char*)':
sdk_util.h:85: error: 'INDEXENT' was not declared in this scope
sdk_util.h:86: error: 'g_engfuncs' was not declared in this scope
sdk_util.h: In function 'void SET_LOCALINFO(char*, char*)':
sdk_util.h:99: error: 'g_engfuncs' was not declared in this scope
dllapi.h: At global scope:
dllapi.h:78: error: 'BOOL' does not name a type
dllapi.h:142: error: ISO C++ forbids declaration of 'BOOL' with no type
dllapi.h:142: error: typedef 'BOOL' is initialized (use __typeof__ instead)
dllapi.h:142: error: 'FN_CLIENTCONNECT' was not declared in this scope
dllapi.h:142: error: expected ',' or ';' before '(' token
mutil.h:64: error: 'hudtextparms_t' has not been declared
mutil.h:66: error: 'hudtextparms_t' has not been declared
mutil.h:96: error: 'hudtextparms_t' has not been declared
mutil.h:98: error: 'hudtextparms_t' has not been declared
saverestore.h:30: error: 'EOFFSET' has not been declared
cbase.h:348: error: 'EOFFSET' does not name a type
cbase.h: In member function 'virtual int CBaseEntity::BloodColor()':
cbase.h:178: error: 'DONT_BLEED' was not declared in this scope
cbase.h: In member function 'virtual int CBaseEntity::GetToggleState()':
cbase.h:183: error: 'TS_AT_TOP' was not declared in this scope
cbase.h: In member function 'virtual int CBaseEntity::IsMoving()':
cbase.h:190: error: 'g_vecZero' was not declared in this scope
cbase.h: In member function 'virtual BOOL CBaseEntity::HasTarget(string_t)':
cbase.h:202: error: 'STRING' was not declared in this scope
cbase.h:202: error: 'FStrEq' was not declared in this scope
cbase.h: In static member function 'static void* CBaseEntity::operator new(size_t, entvars_t*)':
cbase.h:230: error: 'ENT' was not declared in this scope
cbase.h:230: error: 'ALLOC_PRIVATE' was not declared in this scope
cbase.h: In static member function 'static CBaseEntity* CBaseEntity::Instance(edict_t*)':
cbase.h:274: error: 'ENT' was not declared in this scope
cbase.h:275: error: 'GET_PRIVATE' was not declared in this scope
cbase.h: In static member function 'static CBaseEntity* CBaseEntity::Instance(entvars_t*)':
cbase.h:280: error: 'ENT' was not declared in this scope
cbase.h: In static member function 'static CBaseEntity* CBaseEntity::Instance(int)':
cbase.h:281: error: 'ENT' was not declared in this scope
cbase.h: In member function 'edict_t* CBaseEntity::edict()':
cbase.h:347: error: 'ENT' was not declared in this scope
cbase.h: In member function 'int CBaseEntity::entindex()':
cbase.h:349: error: 'ENTINDEX' was not declared in this scope
cbase.h: In member function 'virtual int CBaseEntity::Illumination()':
cbase.h:356: error: 'ENT' was not declared in this scope
cbase.h:356: error: 'GETENTITYILLUM' was not declared in this scope
cbase.h: At global scope:
cbase.h:508: error: 'TOGGLE_STATE' does not name a type
cbase.h: In member function 'virtual int CBaseToggle::GetToggleState()':
cbase.h:535: error: 'm_toggle_state' was not declared in this scope
basemonster.h: At global scope:
basemonster.h:156: error: 'Activity' does not name a type
basemonster.h:157: error: 'Activity' does not name a type
basemonster.h:158: error: 'Activity' does not name a type
basemonster.h:162: error: 'MONSTERSTATE' does not name a type
basemonster.h:163: error: 'MONSTERSTATE' does not name a type
basemonster.h:176: error: 'Activity' does not name a type
basemonster.h:273: error: 'Activity' does not name a type
basemonster.h:312: error: 'MONSTERSTATE' does not name a type
basemonster.h:313: error: 'Activity' has not been declared
basemonster.h:315: error: 'MONSTERSTATE' has not been declared
basemonster.h:392: error: 'Activity' has not been declared
basemonster.h:393: error: 'Activity' has not been declared
basemonster.h:394: error: 'Activity' has not been declared
basemonster.h:395: error: 'Activity' has not been declared
basemonster.h:396: error: 'Activity' has not been declared
basemonster.h:437: error: 'Activity' does not name a type
basemonster.h:438: error: 'Activity' does not name a type
basemonster.h: In member function 'virtual BOOL CBaseMonster::IsAlive()':
basemonster.h:232: error: 'm_MonsterState' was not declared in this scope
basemonster.h:232: error: 'MONSTERSTATE_SCRIPT' was not declared in this scope
basemonster.h: In member function 'virtual void CBaseMonster::Stop()':
basemonster.h:274: error: 'm_IdealActivity' was not declared in this scope
basemonster.h:274: error: 'GetStoppedActivity' was not declared in this scope
basemonster.h: In member function 'virtual Vector CBaseMonster::BodyTarget(const Vector&)':
basemonster.h:451: error: 'FClassnameIs' was not declared in this scope
basemonster.h: In member function 'void CBaseMonster::UpdateShockGlow()':
basemonster.h:508: error: 'gpGlobals' was not declared in this scope
cbase.h: In function 'T* GetClassPtr(T*)':
cbase.h:737: error: there are no arguments to 'CREATE_ENTITY' that depend on a template parameter, so a declaration of 'CREATE_ENTITY' must be available
cbase.h:737: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
cbase.h:740: error: there are no arguments to 'ENT' that depend on a template parameter, so a declaration of 'ENT' must be available
cbase.h: At global scope:
cbase.h:848: error: 'CBasePlayer' has not been declared
cbase.h:854: error: ISO C++ forbids declaration of 'CBasePlayer' with no type
cbase.h:854: error: expected ';' before '*' token
cbase.h: In member function 'BOOL CFuncTank::CanFire()':
cbase.h:826: error: 'gpGlobals' was not declared in this scope
cbase.h: In member function 'Vector CFuncTank::BarrelPosition()':
cbase.h:837: error: 'UTIL_MakeVectorsPrivate' was not declared in this scope
player.h: At global scope:
player.h:122: error: 'CBTEXTURENAMEMAX' was not declared in this scope
player.h:277: error: extra qualification 'CBasePlayer::' on member 'TabulateAmmo'
player.h: In member function 'virtual Vector CBasePlayer::BodyTarget(const Vector&)':
player.h:183: error: 'RANDOM_FLOAT' was not declared in this scope
player.h: In member function 'virtual void CBasePlayer::StartSneaking()':
player.h:184: error: 'gpGlobals' was not declared in this scope
player.h: In member function 'virtual void CBasePlayer::StopSneaking()':
player.h:185: error: 'gpGlobals' was not declared in this scope
player.h: In member function 'virtual BOOL CBasePlayer::IsSneaking()':
player.h:186: error: 'gpGlobals' was not declared in this scope
generic_class.h: In member function 'void dataUnconstArray<T>::Remove(T)':
generic_class.h:962: error: expected `;' before 'it'
generic_class.h:967: error: 'it' was not declared in this scope
generic_class.h: In member function 'void dataUnconstArray<T>::RemoveByPointer(T*)':
generic_class.h:983: error: expected `;' before 'it'
generic_class.h:989: error: 'it' was not declared in this scope
bot_client.h: In member function 'void CBotStatedNetMessage::init(int)':
bot_client.h:654: error: 'INDEXENT' was not declared in this scope
bot_client.h: In member function 'virtual void CSetOrderMessage::write_short(int)':
bot_client.h:706: error: 'INDEXENT' was not declared in this scope
bot_ga.h: In member function 'virtual void CIntGAValues::load(FILE*, int)':
bot_ga.h:106: error: 'RANDOM_LONG' was not declared in this scope
bot_ga.h: In member function 'virtual void CIntGAValues::crossOver(IIndividual*)':
bot_ga.h:128: error: 'RANDOM_FLOAT' was not declared in this scope
bot_ga.h: In member function 'virtual void CIntGAValues::mutate()':
bot_ga.h:141: error: 'RANDOM_FLOAT' was not declared in this scope
bot.h: At global scope:
bot.h:190: error: expected ',' or '...' before '&' token
bot.h:190: error: ISO C++ forbids declaration of 'hudtextparms_t' with no type
bot.h:191: error: expected ',' or '...' before '&' token
bot.h:191: error: ISO C++ forbids declaration of 'hudtextparms_t' with no type
bot.h: In constructor 'CBotTask::CBotTask(eBotTask, int, edict_t*, int, float, Vector, float)':
bot.h:765: error: 'gpGlobals' was not declared in this scope
bot.h: In member function 'BOOL CBotTask::TimedOut()':
bot.h:773: error: 'gpGlobals' was not declared in this scope
bot.h: In member function 'float CBotTask::TimeToComplete()':
bot.h:781: error: 'gpGlobals' was not declared in this scope
bot.h: In member function 'void CBotTask::SetTimeToComplete(float)':
bot.h:862: error: 'gpGlobals' was not declared in this scope
bot.h: In member function 'void CBotTasks::SetTimeToCompleteSchedule(int, float)':
bot.h:1130: error: 'gpGlobals' was not declared in this scope
bot.h: In member function 'void CBotSquad::UpdateAngles()':
bot.h:2480: error: 'UTIL_VecToAngles' was not declared in this scope
bot.h: In member function 'void CBot::SawSpy(edict_t*)':
bot.h:2891: error: 'gpGlobals' was not declared in this scope
bot.h:2891: error: 'RANDOM_FLOAT' was not declared in this scope
bot.h: In member function 'void CBot::CantBuildHere()':
bot.h:3275: error: 'gpGlobals' was not declared in this scope
bot.h:3275: error: 'RANDOM_FLOAT' was not declared in this scope
bot.h: In member function 'BOOL CBot::CanUseTank(edict_t*)':
bot.h:3343: error: 'gpGlobals' was not declared in this scope
bot.h: At global scope:
bot.h:4270: error: 'hudtextparms_t' does not name a type
bot.h: In member function 'void HudText::SetPosition(float, float)':
bot.h:4227: error: 'm_textParms' was not declared in this scope
bot.h: In member function 'void HudText::SetEffect(int)':
bot.h:4237: error: 'm_textParms' was not declared in this scope
bot.h: In member function 'void HudText::SetFadeTime(float, float)':
bot.h:4242: error: 'm_textParms' was not declared in this scope
bot.h: In member function 'void HudText::SetHoldTime(float)':
bot.h:4249: error: 'm_textParms' was not declared in this scope
bot.h: In member function 'void HudText::SetChannel(int)':
bot.h:4254: error: 'm_textParms' was not declared in this scope
bot.h: In member function 'void HudText::SetEffectTime(float)':
bot.h:4259: error: 'm_textParms' was not declared in this scope
bot.h: In member function 'void HudText::SetColour1(Vector, int)':
bot.h:4265: error: 'm_textParms' was not declared in this scope
bot.h: In member function 'void HudText::SetColour2(Vector, int)':
bot.h:4266: error: 'm_textParms' was not declared in this scope
bot.h: In member function 'BOOL CClient::HasPlayerName(const char*)':
bot.h:4473: error: 'STRING' was not declared in this scope
bot.h:4476: error: 'STRING' was not declared in this scope
bot.h: In member function 'CClient* CClients::GetClientByEdict(edict_t*)':
bot.h:4759: error: 'ENTINDEX' was not declared in this scope
bot.h:4761: error: 'gpGlobals' was not declared in this scope
bot.h: In member function 'BOOL CAllowedPlayer::IsForPass(const char*) const':
bot.h:4859: error: 'FStrEq' was not declared in this scope
bot.h: In member function 'BOOL CBotCvar::error()':
bot.h:4985: error: 'IS_DEDICATED_SERVER' was not declared in this scope
bot.h: In member function 'BOOL CStructure::IsUnderAttack()':
bot.h:5360: error: 'gpGlobals' was not declared in this scope
bot.h: In member function 'void CStructure::UnderAttack()':
bot.h:5366: error: 'gpGlobals' was not declared in this scope
bot.h: In member function 'void CStructure::Update()':
bot.h:5371: error: 'FNullEnt' was not declared in this scope
bot.h: In member function 'void CBotCam::SetCurrentBot(CBot*)':
bot.h:5663: error: 'gpGlobals' was not declared in this scope
bot.h:5663: error: 'RANDOM_FLOAT' was not declared in this scope
bot.h: At global scope:
bot.h:6226: error: 'IGNORE_MONSTERS' has not been declared
bot.h:6226: error: 'IGNORE_GLASS' has not been declared
bot.h: In member function 'TraceResult* CBotGlobals::Traceline(Vector&, Vector&, int, int, edict_t*)':
bot.h:6228: error: 'UTIL_TraceLine' was not declared in this scope
bot_ga.cpp: In member function 'virtual void CBotGAValues::crossOver(IIndividual*)':
bot_ga.cpp:70: error: 'RANDOM_LONG' was not declared in this scope
bot_ga.cpp: In member function 'virtual void CBotGAValues::mutate()':
bot_ga.cpp:97: error: 'RANDOM_FLOAT' was not declared in this scope
bot_ga.cpp: In member function 'virtual void CBitsGAValues::crossOver(IIndividual*)':
bot_ga.cpp:275: error: 'RANDOM_LONG' was not declared in this scope
bot_ga.cpp: In member function 'virtual void CBitsGAValues::mutate()':
bot_ga.cpp:302: error: 'RANDOM_FLOAT' was not declared in this scope
generic_class.h: In member function 'void dataUnconstArray<T>::Remove(T) [with T = CRememberPosition]':
bot.h:1995:   instantiated from here
generic_class.h:962: error: dependent-name 'std::vector<T,std::allocator<_CharT> >::iterator' is parsed as a non-type, but instantiation yields a type
generic_class.h:962: note: say 'typename std::vector<T,std::allocator<_CharT> >::iterator' if a type is meant
make: *** [bot_ga.o] Error 1

Posted by: Venom Dec 9 2006, 09:23 AM

Yeah thats similar to what i get, but if Cheeseh or someone else is able to get *.so files and to get it to compile right, then why dont we have a working Linux release?

Posted by: LordSkitch Dec 9 2006, 10:27 AM

i diddled the makefile and put in -I../dlls to see if i could clear some of the "file not found" errors, and i came up with this:

CODE
g++ -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -DRCBOT_META_BUILD -m486 -O2 -w -I../engine -I../common -I../pm_shared -I../metamod -I../dlls -c bot_ga.cpp -o bot_ga.o
player.h:277: error: extra qualification 'CBasePlayer::' on member 'TabulateAmmo'
generic_class.h: In member function 'void dataUnconstArray<T>::Remove(T)':
generic_class.h:962: error: expected `;' before 'it'
generic_class.h:967: error: 'it' was not declared in this scope
generic_class.h: In member function 'void dataUnconstArray<T>::RemoveByPointer(T*)':
generic_class.h:983: error: expected `;' before 'it'
generic_class.h:989: error: 'it' was not declared in this scope
generic_class.h: In member function 'void dataUnconstArray<T>::Remove(T) [with T = CRememberPosition]':
bot.h:1995:   instantiated from here
generic_class.h:962: error: dependent-name 'std::vector<T,std::allocator<_CharT> >::iterator' is parsed as a non-type, but instantiation yields a type
generic_class.h:962: note: say 'typename std::vector<T,std::allocator<_CharT> >::iterator' if a type is meant
make: *** [bot_ga.o] Error 1


which is a much more managable error list. ill try and see if i cant clear some of it up tomorrow.

Posted by: Venom Dec 9 2006, 11:01 AM

cool thanks smile.gif

thank for helping smile.gif

Just wondering, what is the main use you use rcbot for LordSkitch? I mainly use rcbot for NS, so i am currently developing for that side of RCbot.

There is one or two things i am currently working on which i hope will provide some extra features for NS side of RCbot.

Posted by: LordSkitch Dec 9 2006, 11:42 AM

NS all the way. i host the worlds most EVIL NS server

68.203.132.155:27015

more often than not im the one coming up with the waypoints for most of the maps, and if you look in the beta section i posted some code changes to get the marines to get scan upgrades, and disable squads and some other stuff. ive been trying to figure out how to get the gorges to heal the hives when theyre hurt, and... if i could id apply the lerk flying genetic algorithms to their normal movement, but that stuff is way over my head.

plus, bot.cpp is 17000 lines. its really hard for me to make sense of it, cause i didnt write it lol


i dont do AvA or MvM though... i like the interactions of different skill sets of aliens vs marines

and as far as all the plugins on my server that everyone seems to want, i wrote half of them, and no you cant have them cause theyre not finished cause the code is messy and i dont want people to think im a messy coder. tongue.gif


[edit]

ok so its 6:50 and i got an itch to code.


the #ifndef __cygwin isnt working i dont think, if its sposda do what i think its sposda do, if thats defined, its windows, and it declares it as "vector<T>::interator" and if its linux it declares it as "typename vector<T>::iterator" if i comment out the first declaration, it uses the typename, and it gets past that part, so mr cheeseh, i dunno how to fix that to keep it compatible with both windows and linux, i hope you do, cause youre the code guru, im merely a code monkey.

Posted by: Venom Dec 9 2006, 02:22 PM

Yeah, i managed to code both MvM and AvA player modes which is what my server i am building will be. thanks to cheeseh commenting, i can understand pretty much most of it, but i am only intrested in the NS side of it really any way.

If its easier, i guess we just have to have seperate versions of linux and windows, but i am hoping that cheeseh might be able to shed some light on the matter.


Posted by: LordSkitch Dec 9 2006, 02:44 PM

lol well if you understand most of it, redo the cygwin part so it can compile under linux tongue.gif

Posted by: Cheeseh Dec 9 2006, 02:49 PM

actually thats not the right source I gave you, I forgot I made a copy of the source and edited it and sent you the wrong version unsure.gif

anyway I uploaded the correct one, made a proper cross compile of it here:

http://filebase.bots-united.com/index.php?action=file&id=428

I got no errors on each build

I changed that __cygwin thing whilst editing the code a few weeks ago but sent you the old version its now #if defined(WIN32) && !defined(__CYGWIN__) or simply #ifndef linux

the makefiles that come with it should work Hopefully... definetly the cygwin ones work when cross compiling

Posted by: Venom Dec 9 2006, 03:18 PM

Its not working for me, i guess i must be doing something wrong sad.gif

I copied over the .so and replaced the existing one in my rcbot folder and still nothing runs when the server launches.

How did you manage to compile it without errors? lol


Posted by: Cheeseh Dec 9 2006, 04:31 PM

QUOTE(Venom @ Dec 9 2006, 03:18 PM) *

Its not working for me, i guess i must be doing something wrong sad.gif

I copied over the .so and replaced the existing one in my rcbot folder and still nothing runs when the server launches.

How did you manage to compile it without errors? lol


have you tried the standalone one? Can you just make sure that works without metamod? So that I know its not the compilers fault
QUOTE

How did you manage to compile it without errors? lol

download source again

Posted by: Venom Dec 9 2006, 05:19 PM

CODE

Auto detecting CPU
Using AMD-Opteron (64 bit) Optimised binary.
Auto-restarting the server on crash

Console initialized.
scandir failed:/home/Root/hlds/./valve/SAVE
scandir failed:/home/Root/hlds/./platform/SAVE
Protocol version 47
Exe version 1.1.2.0/Stdio (valve)
Exe build: 20:02:44 Oct 24 2006 (3651)
STEAM Auth Server
couldn't exec language.cfg
Server IP address 45.12.32.67:27015
LoadLibrary failed on ./ns/../rcbot/dlls/rcbot_i386.so: ./ns/../rcbot/dlls/rcbot_i386.so: cannot open shared object file: No such file or directory
Host_Error: Couldn't get DLL API from ./ns/../rcbot/dlls/rcbot_i386.so!
FATAL ERROR (shutting down): Host_Error: Couldn't get DLL API from ./ns/../rcbot/dlls/rcbot_i386.so!

Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
Sat Dec  9 17:13:16 GMT 2006: Server restart in 10 seconds


This was what i got when trying to use the latest rcbot_i486.so

I have also disabled all metamod stuff and have changed the liblist.gam accordingly to point to the rcbot SA as well.

I dont think i have left anything out of the installation process sad.gif

As you can see, its trything to run rcbot_i386.so instead of rcbot_i486.so for some strange reason.

Posted by: Cheeseh Dec 9 2006, 10:12 PM

yeah says rcbot_i386.so in your quote, should be rcbot_i486.so

did u rename the bot dll? ?? Maybe it will help i dunno but it should be i486

if youre using 64bit operating environment you will have to compile, I built for 32bit

Posted by: LordSkitch Dec 9 2006, 11:56 PM

im compiling it now to see what it does, i did get an error on that tabulate ammo thing, and i did a search for all occurances of it in vc++ and it only found that one, so i just commented it out, but it finished building rcbot_mm_i486.so completely.

good work mr the cheese!

i do need someone to test it for me though, cause if it works ill be able to compile your future linux versions to keep the linux people happy from now on.

the one i compiled is at:

http://www.joesucks.net/files/rcbot/rcbot_mm_i486-dec-09-2006.so
you WILL NEED to rename it to rcbot_mm_i486.so though. unless you update your metamod to use the full string including the date.

[edit]

64 bit build:
http://www.joesucks.net/files/rcbot/rcbot_mm_x64-dec-09-2006.so

Posted by: Venom Dec 10 2006, 12:05 AM

thanks LordSkitch, i will test it now and let you know.

there must be somthing wrong with my hlds install then as i carnt seem to run anything at all without some sort of i386.so not found, i tryed it with amxmodx, metamod etc...it seems it maybe the liblist.game file or something sad.gif

Why its looking for filename_i386.so (filename being what ever you change it too in liblist.game) i dont know, it was working before.

Posted by: LordSkitch Dec 10 2006, 06:14 AM

you need your liblist.gam's "gamedll_linux" to point to your metamod .so file.

then your metamod needs to point at the rcbot .so file

Posted by: Venom Dec 10 2006, 10:19 AM

im using the 64bit version of metamod

gamedll_linux "addons\metamod\dlls\metamod_amd64.so"

And still no luck. I dont understand it, it keeps wanting to run a i386.so, renaming the file doesnt work either.

I think i may have to reinstall.

Posted by: LordSkitch Dec 10 2006, 07:46 PM

post your liblist.gam and your metamod.ini files on here

Posted by: Venom Jan 11 2007, 03:43 PM

QUOTE(LordSkitch @ Dec 10 2006, 07:46 PM) *

post your liblist.gam and your metamod.ini files on here


Ok my server is running stable, i am using 32bit as Valve doesnt wish to support 64bit on the Half-Life 1 engine and as AMXModX has stopped development of the 64bit version and as i have been having problems with mixed 64bit and 32bit mods and plugins, i will be just using 32bit mode.

I got Whichbot 1.04 working, i will try RCbot when i get home.

Wish me luck and its good to see the forum back up smile.gif

Posted by: Venom Jan 15 2007, 08:31 AM

OK, RCbot refueses to load and crashes the server at startup.

The old i386 of RCbot works fine, but the newer compiled i486 doesnt work at all.

Metamod - Plugins.ini - Is Assigned Correctly
NS - liblist.gam - Points to Metamod

Not sure what else i can do sad.gif

I need to be able to have RCbot in linux working.

If you can help i would be greatful.

Posted by: LordSkitch Jan 15 2007, 09:29 AM

does it give you an error?

Posted by: Venom Jan 15 2007, 09:48 AM

RCbot doesnt seem to error, but the hlds crashes when ever rcbot is added to the plugin list. The server just runs, crashes and waits 10 seconds and repeats until you exit the terminal window.

I will see if i can copy and paste the error message but its just the standard crash.


;; Metamod plugins.ini
; AMX Mod X 1.76c
; linux addons\amxmodx\dlls\amxmodx_mm_amd64.so
linux addons/amxmodx/dlls/amxmodx_mm_i386.so

; RCCbot 1.441 Beta
linux ../rcbot/dlls/rcbot_mm_i486.so

; Whichbot 1.04
linux addons/whichbot/dlls/libwhichbot.so


liblist.gam
////////////////////////////
// Natural Selection //
// by Charlie Cleveland //
////////////////////////////
game "Natural Selection"
url_info "http://www.unknownworlds.com/ns/"
url_dl "http://www.unknownworlds.com/ns/view?action=files"
version "v3.1"
size "165000000"
svonly "0"
secure "0"
cldll "cl_dlls\client.dll"
hlversion "1110"
// How to allow training but disable "New game"?
type "multiplayer_only"
// Don't show models in browser
nomodels "1"
nohimodel "1"
// Only show NS-compliant maps
mpentity "info_mapinfo"
// Using HPB_bot support for now
//gamedll "dlls\ns.dll"
//gamedll_linux "dlls/ns_i386.so"
gamedll_linux "addons/metamod/dlls/metamod_i386.so"
// Training map
//trainmap "ns_training"

Server Terminal Window:
Console initialized.
scandir failed:/home/Razorwing/hlds/./valve/SAVE
scandir failed:/home/Razorwing/hlds/./platform/SAVE
Protocol version 47
Exe version 1.1.2.0/Stdio (valve)
Exe build: 20:02:44 Oct 24 2006 (3651)
STEAM Auth Server
couldn't exec language.cfg
Server IP address 80.101.24.73:27015

Metamod version 1.19 Copyright © 2001-2006 Will Day <willday@metamod.org>
Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `meta gpl' for details.


AMX Mod X version 1.76c Copyright © 2004-2006 AMX Mod X Development Team
AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'.
This is free software and you are welcome to redistribute it under
certain conditions; type 'amxx gpl' for details.

./hlds_run: line 342: 9856 Bus error (core dumped) $HL_CMD
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
Mon Jan 15 09:52:59 GMT 2007: Server restart in 10 seconds

Posted by: Cheeseh Jan 15 2007, 04:59 PM

use the -debug command, the debug logs are usually helpful but can be quite big

Posted by: Venom Jan 15 2007, 07:26 PM

I do use the -debug but there is nothing in the file that i am aware off, either that or it doesnt show anything when i view it with a text editor.

Posted by: LordSkitch Jan 17 2007, 11:05 AM

try this... http://www.joesucks.net/files/rcbot/rcbot_mm_i486.so

Posted by: Venom Jan 19 2007, 10:22 AM

OMG it worked, i am actually running RCbot on Linux biggrin.gif

What did you do to make it work?

and the second question is how can i compile it under linux without getting hundreds of errors? smile.gif

Thanks Lordskitch and Cheeseh for helping so much.

I am so happy smile.gif

Posted by: LordSkitch Jan 20 2007, 03:08 AM

i compiled using the latest source cheeseh put up there, its got the code inside to check for linux and windows so it should compile the same on both platforms

Posted by: Venom Jan 20 2007, 05:32 PM

[root@www dlls]$ make -fmakefile_linux_mm
g++ -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -DRCBOT_META_BUILD -m486 -O2 -w -I../engine -I../common -I../pm_shared -c bot.cpp -o bot.o
bot.cpp: In function \u2018BOOL BotFunc_FillString(char*, const char*, const char*, int)\u2019:
bot.cpp:2201: error: cast from \u2018char*\u2019 to \u2018int\u2019 loses precision
bot.cpp:2201: error: cast from \u2018char*\u2019 to \u2018int\u2019 loses precision
bot.cpp: In member function \u2018BOOL CBot::UpdateVisibles()\u2019:
bot.cpp:6641: error: cast from \u2018edict_t*\u2019 to \u2018int\u2019 loses precision
make: *** [bot.o] Error 1

Seems to work almost except for that one error. Any idea on how to fix it?

I am hoping to help develop RCbot and provide you with code additions etc...but i need to be able to compile it correctly.

If you can help, i would be very greatful.

UPDATE:
Also i wanted to add, based on the RCbot you compiled for me Lordskitch, there are errors produced when running it. The terminal displays the following but does seem to effect the bots that much.

This line below only shows up once or twice every few minutes with a different ID.
[RCBOT>] warning: GetClientRep(): No Rep for pClient (id: 3) (returning default)

This one below is spammed constantly every few seconds.
[RCBOT>] warning: GetClientRep(): Bad pClient recieved (NULL) (returning default)

Posted by: LordSkitch Jan 20 2007, 11:24 PM

make sure you have the latest source from the file base, that's all i downloaded, then i ran

make -f linux_makefile_mm and it ran just fine

those clientrep errors are pretty meaningless, the bots can actually develop "feelings" for players based on how many times they kill/get killed by a player. usually you can correct that by deleting the files related to the reputations, they'll automatically be regenerated in a non-busted way. the files are "bot_playerids.ini" in the /rcbot/ folder, and all of the .rcr files in /rcbot/botprofiles/

Posted by: Venom Jan 21 2007, 12:41 PM

I have the latest source i think, i am using the source from here: http://filebase.bots-united.com/index.php?action=file&id=204

Which i thought was the latest, same error is being produced.


Posted by: IHQ-Reima[DWMH] Jan 28 2007, 12:45 PM

When I changed to Linux I kept the hierarchy the same. I load the .so file in the metamod ini ../rcbot/dlls/rcbot_mm_i486.so.

I just copied the rcbot folder from my Windows server and just replaced the .dll with .so. The bots work fine but I can't waypoint: 'you don't have rights to that command' when I type in cl-console 'rcbot waypoint on'. Do I have a bug somewhere? In windows server it works.

Posted by: LordSkitch Jan 28 2007, 07:58 PM

whats your bot_users.ini file look like?

Posted by: Cheeseh Jan 28 2007, 08:36 PM

QUOTE(LordSkitch @ Jan 28 2007, 07:58 PM) *

whats your bot_users.ini file look like?


also make sure its in the correct folder, the bot also says messages in the console when loading about the bot users file, make sure to check those.

Posted by: IHQ-Reima[DWMH] Jan 29 2007, 07:08 AM

QUOTE(Cheeseh @ Jan 28 2007, 08:36 PM) *

also make sure its in the correct folder, the bot also says messages in the console when loading about the bot users file, make sure to check those.



Like I said I copied the working rcbot folder from my windows server. Rcbot loads the users at the server startup and they should work then. Dunno, but after testing Linux for a day and it didn't give me anything better than windows so I switched back tongue.gif

Posted by: LordSkitch Jan 29 2007, 03:03 PM

IPB Image

Posted by: Venom Feb 1 2007, 10:23 AM

lol nice picture LordSkitch tongue.gif

I deleted both "bot_playerids.ini" in the /rcbot/ folder, and all of the .rcr files in /rcbot/botprofiles/
and still the same error being produced, which is a minor problem.

I am still unable to compile the bots correctly with the same error being produced using the link i posted previously.

Any suggestions sad.gif

Posted by: LordSkitch Feb 1 2007, 02:35 PM

what do the errors say again?

Posted by: Cheeseh Feb 1 2007, 04:59 PM

If you mean GetClientRep(), they are not errors ! they are warnings! Most likely it is caused by using metamod and having whichbots or any other bot (which isn't rcbot) joining the game and not being caught by RCbot engine hooking functions. [Again errors cause the program to cease executing. Warnings cause the program to continue executing because the occuring problem is not essential to the bots operation.]

It is not a problem because all that warning message does is say "I am returning the default value which does not have any effect on anything except the correct function of the bot reputation system which is not even essential to the bots function" cool.gif However there may be indirect crashes being caused by the same thing but they will only have an affect if you use rcbot util functions on which bots and stuff like that.

Posted by: Venom Feb 2 2007, 09:24 AM

[root@www dlls]$ make -fmakefile_linux_mm
g++ -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -DRCBOT_META_BUILD -m486 -O2 -w -I../engine -I../common -I../pm_shared -c bot.cpp -o bot.o
bot.cpp: In function \u2018BOOL BotFunc_FillString(char*, const char*, const char*, int)\u2019:
bot.cpp:2201: error: cast from \u2018char*\u2019 to \u2018int\u2019 loses precision
bot.cpp:2201: error: cast from \u2018char*\u2019 to \u2018int\u2019 loses precision
bot.cpp: In member function \u2018BOOL CBot::UpdateVisibles()\u2019:
bot.cpp:6641: error: cast from \u2018edict_t*\u2019 to \u2018int\u2019 loses precision
make: *** [bot.o] Error 1

Seems the only error i get when compiling the bots.

Posted by: Cheeseh Feb 2 2007, 04:16 PM

that compiler is freakin pedantic!!



// initialize them to empty (don't need to null terminate at the right point)//bot.cpp:2200
memset((void*)before,0,len);//bot.cpp:2201
memset((void*)after,0,len);//bot.cpp:2202

stuff like that. make sure you haven't got a pedantic option selected in GCC/g++, or reduce warning level. these should be warnings given by the compiler, not errors

Posted by: Venom Feb 15 2007, 06:15 PM

OK so we now hopefully know its not a problem with the source code but its the compiler, so how do i change it to show less warnings? i am using fedora OS.


Posted by: Cheeseh Feb 15 2007, 06:34 PM

QUOTE(Venom @ Feb 15 2007, 06:15 PM) *

OK so we now hopefully know its not a problem with the source code but its the compiler, so how do i change it to show less warnings? i am using fedora OS.


"Read the compiler's manual to learn about the various '-W' options," - http://users.actcom.co.il/~choo/lupg/tutorials/c-on-unix/c-on-unix.html

I was guessing you had -Werror flag on, but I'm not sure, as it didnt generate a .so file, or did it?.

Posted by: junktext Oct 6 2007, 07:01 PM

QUOTE(LordSkitch @ Jan 19 2007, 11:08 PM) *

i compiled using the latest source cheeseh put up there, its got the code inside to check for linux and windows so it should compile the same on both platforms


Stupid question (maybe): Where exactly is the latest source code located? I'm looking at RCBot's "Bot United Filebase" section and the latest source says it is for v1.38 [and the one I'm using is v1.441 Beta]. Here is what I'm looking at... http://filebase.bots-united.com/index.php?action=file&id=204

Is this the same source version that you used by chance? I have a few things I'd like to try and modify, but I want to be sure I'm using the correct source files first.

Thanks in advance for any help on this!

- junktext

Posted by: LordSkitch Oct 6 2007, 07:39 PM

http://rcbot.bots-united.com/forums/index.php?s=&showtopic=1011&view=findpost&p=7096

bottom of that page.

Posted by: junktext Oct 8 2007, 04:21 PM

QUOTE(LordSkitch @ Oct 6 2007, 03:39 PM) *

http://rcbot.bots-united.com/forums/index.php?s=&showtopic=1011&view=findpost&p=7096

bottom of that page.



Thanks man!

Posted by: scrow Jun 20 2008, 09:48 PM

compiling using the source for v1.441_B works under Linux with one modification.

CODE
tardus dlls # uname -a
Linux tardus 2.6.22-gentoo-r9 #1 SMP Sun Dec 16 12:29:58 CST 2007 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 5000+ AuthenticAMD GNU/Linux
tardus dlls # gcc --version
gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.1)

CODE
tardus ~ # wget http://rcbot.bots-united.com/downloads/rcbot_new/rcbot_src.zip
tardus ~ # mkdir rcbot_src
tardus ~ # cd rcbot_src
tardus rcbot_src # unzip ../rcbot_src.zip

CODE
tardus rcbot_src # cd dlls
tardus dlls # make -fmakefile_linux_mm
g++ -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -DRCBOT_META_BUILD -m486 -O2 -w -I../engine -I../common -I../pm_shared -c bits.cpp -o bits.o
`-m486' is deprecated. Use `-march=i486' or `-mtune=i486' instead.
g++ -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -DRCBOT_META_BUILD -m486 -O2 -w -I../engine -I../common -I../pm_shared -c bot.cpp -o bot.o
`-m486' is deprecated. Use `-march=i486' or `-mtune=i486' instead.
player.h:277: error: extra qualification 'CBasePlayer::' on member 'TabulateAmmo'
make: *** [bot.o] Error 1

http://www.fourmilab.ch/fourmilog/archives/2006-05/000699.html; modified player.h:277 from this;
CODE
void CBasePlayer::TabulateAmmo( void );

to this;
CODE
void TabulateAmmo( void );

restarted compile and it completed successfully except the file copy...
CODE
tardus dlls # make -fmakefile_linux_mm
<snip>
g++ -fPIC -shared -o rcbot_mm_i486.so bits.o bot.o bot_client.o bot_commands.o bot_ga.o bot_menu.o bot_navigate.o bot_nn.o bot_rep.o bot_visibles.o bot_weapons.o client.o dir.o dll.o engine.o ga.o globals.o h_export.o linkfunc.o megahal.o netmessages.o perceptron.o rcbot_meta_api.o util.o waypoint.o -ldl -lm
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object.
cp -f rcbot_mm_i486.so /home/paul/hlds_l/rcbot/dlls
cp: cannot create regular file `/home/paul/hlds_l/rcbot/dlls': No such file or directory
make: *** [rcbot_mm_i486.so] Error 1

tardus dlls # ls -l rcbot_mm_i486.so
-rwxrwx--- 1 root root 801401 Jun 20 16:36 rcbot_mm_i486.so

tried to upload the resulting file, but the "Global Space Left: 64k"
download metamod version v1.441_B http://ps.badco2.com/downloads/rcbot_mm_i486.so

Posted by: Weasel Feb 15 2011, 06:41 PM

QUOTE(scrow @ Jun 20 2008, 01:48 PM) *

download metamod version v1.441_B http://ps.badco2.com/downloads/rcbot_mm_i486.so


That URL doesn't seem to work any more. Any chance for an updated link?