Av Andreas Vrålstad, december 2007 Avdelningar 1. Inledning 2. Installation 3. Tips 4. Felsökning 1. INLEDNING Jag har stött på en del problem när jag försökt få igång RoboCup och RoboSoc på min PC och har skrivit en logg över de problem jag stött på. De versioner jag hade av berörda program är som följer: Gcc - 4.1.2 Bash - 3.2.13 Ubuntu - 7.04 (Feisty Fawn) 2. INSTALLATION 1. Installera libboost-dev, libboost-filesystem-dev samt antlr. Se även till att header-filerna till X11 finns installerade. 2. Lägg till --x-include till configure-raden i install-rcsoccersim. 3. Installera RoboCup med kommandot > sh install-rcsoccersim 3. Ändra rad 181 och 182 i parser.hpp. Parser:: ska tas bort! Parser.hpp finns både i ~/RoboCup/src/rcssbase-10.0.11/rcssbase/conf och ~/RoboCup/pkg/rcsoccersim/include/rcssbase/conf 4. Filerna field.cc, object.cc och player.cc i mappen ~/RoboCup/src/rcssserver-10.0.7/src innehåller anrop till funktionen Polar2PVector men den verkar inte vara definierad här. Funktionen är egentligen definierad som Polar2PVector(Value r, Angle ang) { return PVector(r*cos(ang),r*sin(ang)) } så antingen får man byta ut mot denna funktion vid varje förekomst alt. skapa en egen klass och inkludera denna i de berörda filerna. 5. I filen ~/RoboCup/RoboSoc/src/Framework/ddt/scanner.h måste ddt.h inkluderas och DDT_BEGIN_NAMESPACE placeras strax efter #ifndef/#define - satsen. Glöm inte DDT_END_NAMESPACE strax innan #end heller. 6. Installera RoboSoc med kommandot > sh install-robosoc 7. Nu är förhoppningsvis RoboSoc installerat. I så fall kan vi kopiera in mappen Team från aip-kontot på astmatix med följande kommando: > scp -r aipxx@astmatix.ida.liu.se:Team . 8. Lägg till raden export LIBTOOL_ACLOCALDIR=/usr/share/aclocal i filen ~/RoboCup/Team/bootstrap, strax innan anropet till aclocal. /usr/share/aclocal är här sökvägen till .m4-filerna som aclocal använder. 9. Lägg till -I ~/RoboCup/pkg/RoboSoc/include -I ~/RoboCup/pkg/rccparser/include i Makefile.am i mappen Team/src. Byt ut @RCCPARSER_LIBPATH@ med ~/RoboCup/pkg/rccparser/lib 10. Nu ska det gå att kompilera. 3. TIPS * Använd loggprogrammet script vid kompilering. skriv > script [logfile-path] så sparas all output i terminalfönstret även till angiven fil. * Aktivera en rad i taget i install-scripten. Först hämta hem, sen installera. Aktivera endast ett paket i taget - först base, sen server osv. * setenv heter export i Ubuntu! Lägg till export-kommandona som tipsas om efter lyckade installationer till .bashrc i hemmappen. 4. TROUBLESHOOTING * Felmeddelande under kompilering:"no rule to make target" Detta betyder att filen inte hittas. Inkludera filen eller biblioteket så bör det lösa sig. * Fler referensfel: Andra beroenden i Makefile.am refererar till katalogen ~/RoboCup/RoboSoc, men min katalog heter ~/RoboCup/RoboSoc-2.7.0 . Skriv > ln -s RoboSoc-2.7.0 RoboSoc i katalogen ~/RoboCup så är det löst. * Fel vid körning av configure i ~/RoboCup/Team: När jag kör ./configure i ~/RoboSoc/Team får jag felmeddelanden. När jag kollar i filen på angivna rader ser jag att det är echo-rader. Kommentera bort enl. följande: #{ #echo "$as_me:$LINENO: result: no" >&5 #echo "${ECHO_T}no" >&6; #} IN ENGLISH: Sections 1. Introducation 2. Installation 3. Tips 4. Troubleshooting 1. INTRODUCTION I have encounter some problems when trying to install RoboCup and RoboSoc on my PC and I have written a log about the problems I encountered. I used the following programs and versions: Gcc - 4.1.2 Bash - 3.2.13 Ubuntu - 7.04 (Feisty Fawn) 2. INSTALLATION 1. Install libboost-dev, libboost-filesystem-dev and antlr. Make sure that the header-files for X11 are installed. 2. Add --x-include to the configure-line in install-rcsoccersim. 3. Install RoboCup with the command > sh install-rcsoccersim 3. Change line 181 and 182 in parser.hpp. Parser:: should be removed! Parser.hpp is found in ~/RoboCup/src/rcssbase-10.0.11/rcssbase/conf and ~/RoboCup/pkg/rcsoccersim/include/rcssbase/conf 4. The files field.cc, object.cc and player.cc in the folder ~/RoboCup/src/rcssserver-10.0.7/src Contains function calls to the function Polar2PVector, but the functions seems not to be defined there. The functions definitions is Polar2PVector(Value r, Angle ang) { return PVector(r*cos(ang),r*sin(ang)) } So, either create a class with this function and include the class in the files using the function. Or you paste this function into each file using it. 5. In the file ~/RoboCup/RoboSoc/src/Framework/ddt/scanner.h ddt.h should be included and DDT_BEGIN_NAMESPACE placed just above the #ifndef/#define - statement. Don't forget DDT_END_NAMESPACE just before #end 6. Install RoboSoc with the command > sh install-robosoc 7. If everything works out, RoboSoc is now installed. Then we can copy the folder Team from the aip-account on astmatix with the following command: > scp -r aipxx@astmatix.ida.liu.se:Team . 8. Add the line export LIBTOOL_ACLOCALDIR=/usr/share/aclocal in the file ~/RoboCup/Team/bootstrap, just before the call to aclocal. /usr/share/aclocal is the path to the .m4-files that aclocal uses. 9. Add -I ~/RoboCup/pkg/RoboSoc/include -I ~/RoboCup/pkg/rccparser/include in Makefile.am in the folder Team/src. Replace @RCCPARSER_LIBPATH@ to ~/RoboCup/pkg/rccparser/lib 10. Noiw it should be possible to compile. 3. TIPS * Use the logger script when compiling. Useage > script [logfile-path] then all output to the terminal is saved into a file. * Activate one line at a time in the install script. First download, then install. Only activate on package at a time, starting with base, then server, and so on. * setenv is called export on Ubuntu! Add the export-commands that are mentioned after succcessful install, into the .bashrc in the home folder. 4. TROUBLESHOOTING * Error messages during compilation:"no rule to make target" This is because the file is not found. Include the file or library and it will be ok. * Other reference errors: Dependencies in Makefile.am refers to the folder: ~/RoboCup/RoboSoc, but mine folder is called ~/RoboCup/RoboSoc-2.7.0 . Write > ln -s RoboSoc-2.7.0 RoboSoc in the folder ~/RoboCup then it is solved. * Error when running configure in ~/RoboCup/Team: When I run ./configure i ~/RoboSoc/Team I get error messages. When I look into the file, at the mentioned lines, I discover it is only echo commands. Can be commented out: #{ #echo "$as_me:$LINENO: result: no" >&5 #echo "${ECHO_T}no" >&6; #}