![]() |
![]() |
iprice |
![]()
Post
#1
|
||||||
Newbie ![]() Group: Members Posts: 4 Joined: 9-June 05 Member No.: 572 ![]() |
Hi, Noticed a bit of discussion about the Linux compilation was in the other thread but thought it might be better to break this out.... I'm fairly dedicated to geting this thing (re)built under linux, and heres my story so far... A couple of months ago I setup a 'training comm etc' server on my home Linux box, 12 bots and a few player slots for commander / etc. Compiling RCBot was rather difficult, I was using "gcc version 3.3 20030226 (prerelease) (SuSE Linux)" as the compiler and had to make various modifications to the sources to get it to compile. Please note while I am a programmer I am *not* a C++ programmer (never liked the language, but something I always felt I needed overcome perhaps one day). One of the things I hate about the C strain is the error messages from most compilers are horrendous. Anyway lets not get into the old programming language holy wars, just wanted to point out I have very little idea specifically what i'm doing, but a sound backgound in programming and Unix and so forth. I found the 'linux binaries' supplied would just crash randomly, particularly on bot add's as detailed in various forums, which is what got me working on the source. I made the following changes to the rcbot source distribution to get it to compile under linux and run successfully - the only issue apart from the AI being a bit poor in places (like skulks at your bot's feet dont get seen usually ![]() *) The addition of "-I ." to the makefile parameters to include the current directory in the include search *) The addition of the "-fpermissive" flag to the makefile to ignore errors regarding ISO C++ standards violation, variables declared with no type (?) etc *) Then things got wierd, I get errors like
... Which I *bodged* around by changing "abs" into "fabs" *) There was some error compiling the HAL module, where it tries to select something from a list... I forget the exact error, I just made the code do nothing since I didn't want HAL functionality anyway. And shockingly for someone who doesn't know what they're doing, this worked and the bots did run around and die lots (their ranking on psychostats is horrible ![]() Anyway, it lagged lots because it was running on a busy server, and the internet pipe to that server sucks for upstream anyway, so I recently got a new box and was working on moving it over to there... The compiler is now: gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) Reason I am now writing is I am again stuck on various syntactic C issues, and I don't have the knowledge to resolve these. With the above fixes (except the HAL one which the makefile hasn't tried to compile yet) in place, I now get the following error:
Now somehow I worked out this is related to the 'vector' type, and line 49 of generic_class.h reads "#include <vector>" which if i change it to "#include <vector.h>" changes the error to a similar one in a different place ![]()
followed by tons more 'undeclared' errors for variable 'it' and 'array', followed by similar barfage from other source files. The source i'm using is listed as "RCBot Source, Latest source for latest beta" on the downloads page. What i'm looking for is a bit of help with the C++ language and some interpretation of the errore messages, and I would like to try and work on getting this source compiled on linux, ideally the same source should compile on win and linux, but even if it comes down to a separate 'inferior/out of date' package for linux it would be a start! My only other option I can think of trying is to downgrade the new C++ compiler back to the previous version and try compiling on the new machine again... Needless to say this is a horrible option I'd really rather not go down. Thanks for your time, and any help you can offer. Iain |
||||||
![]() ![]() |
iprice |
![]()
Post
#2
|
Newbie ![]() Group: Members Posts: 4 Joined: 9-June 05 Member No.: 572 ![]() |
oK, well, I thought i'd touch back in here, just incase anyone was wondering about my progress
![]() I got the 'linuxified' source code, but still had issues compiling the code (the "expected ; before 'it'" error, which means so little to me) I downloaded GCC 3.3.6 and compiled this (and omg it wouldn't compile... i actually had to modify the sources for the C compiler to get it to compile under GCC 3.4)... Anyway this actually fixes the error, so stick with GCC 3.3.6 rather than 3.4.4 unless you actually know something about GC(C++) error messages ![]() Just gone back to my server however after running the bots for a couple of days to find the machine pretty much dead on its feet... The HLDS server has grown to consume over 1.5GB of ram ![]() Which leads me to wonder what else has changed in the source code since the version i'm compiling... Are there any ways of tracking versions of the code, generating 'diff's of the changes which I could try apply to the source... or getting the unmodified version of the RCBot sources for the version the linux code is based on (so i can see /those/ diffs and reapply to the latest greatest rcbot code)? I did notice the other thread about CVS, so perhaps none of this is in place yet? Anyway, got it working again, where to go from here to keep it 'up to date' with the latest developments? Thanks, Iain |
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 15th June 2025 - 11:27 AM |