I've got hold of a clean install Xubuntu 9.04 aka Jaunty Jackalope so I've decided to write down step-by-step what is needed to be able to build the latest TORCS version. I've done it many times now but never took time to note everything properly until now.
I hope you find the instructions below useful.
Method used
Brute force trial and error :) That is, you try to run TORCS's configure script and look at what it is complaining about. Then with the clever use of apt-cache search and dpkg -l and of course our good ol' friend grep you pick what is needed for real and you install that.
Below all the commands you must type in the mighty Terminal are in italics and follow the Ubuntu lifestyle of sudo-ing a lot.
Basics
- sudo apt-get install build-essential g++
Dependencies
- libpng: sudo apt-get install libpng12-dev
- the above also installs zlib1g-dev so zlib: OK
- OpenAL: sudo apt-get install libopenal-dev
- FreeGlut: sudo apt-get install freeglut3-dev - this pulls a lot of dependencies, too.
- X thingies: sudo apt-get install libxxf86vm-dev libxrender-dev libxrandr-dev
- ALUT: sudo apt-get install libalut-dev
- PLib: suxx, as Ubuntu Jaunty has only the 1.8.4c2 in the repo, so have to do some manual work here:
- sudo apt-get install libxmu-dev libxi-dev
- Visit the PLib download page.
- Download the 1.8.5 version, then do as told: tar xzf plib-1.8.5.tar.gz
- cd plib-1.8.5
- ./configure
- make
- sudo make install
Now you have a working PLib1.8.5 so can go ahead. (If you accidentally get lost the FlightGear Wiki is a good place to look for help.)
TORCS
- Download torcs-1.3.1.tar.bz2 (the all-in-one package, about 200MB).
- Unpack it: tar xfvj torcs-1.3.1.tar.bz2
- cd torcs-1.3.1
- ./configure --prefix=/usr/local --x-libraries=/usr/lib
- make
- sudo make install
- sudo make datainstall
Finished!
You can play TORCS now by typing /usr/local/bin/torcs
Have fun! ;)
Hi Kilo,
ReplyDeleteI'm sorry I've seen this entry late. Had I known this before, I'd have given you the tip. Given that torcs is packaged for ubuntu, you can use apt in order to get all the build dependencies (at least the ones to build torcs like the package mantainer). You could have issued
sudo apt-get build-dep torcs
and it would have downloaded and installed all those pesky -dev libraries.
Hi Miguel
ReplyDeletethanks for the hint - I prefer doing things manual though. Anyway your way can be useful, too.
BTW does the build-dep way pull in the appropriate plib-dev dependencies?
Awesome, thanks for this post. I used it to quickly gather the deps for compiling the head of the 1.3.1 branch.
ReplyDelete