ugo-nama-kun / gym_torcs

MIT License
408 stars 163 forks source link

how to compile plip for ubuntu 64? #41

Open afakharany93 opened 7 years ago

afakharany93 commented 7 years ago

It says in the installation guid of vtorcs-color: Requires plib 1.8.5, FreeGLUT or GLUT, be aware to compile plib with -fPIC on AMD64 if you run a 64 bit version of Linux. Be aware that maybe just 1.8.5 works. I'm still new to this kind of stuff, so could you please tell how to do that?

jinchenglee commented 6 years ago

Copied from http://www.berniw.org/tutorials/robot/tutorial.html

Download and Unpack Plib

Download plib-1.8.3.tar.gz from here. TORCS has been tested against 1.8.3, for other versions we guarantee for nothing! Stay as root and do

cd /usr/src

mkdir torcs

cd torcs

tar xfvz /path_to_downloaded_files/plib-1.8.3.tar.gz

cd plib-1.8.3

Compiling and Installing Plib

You are still root and in /usr/src/torcs/plib-1.8.3, if you run a 64 bit version of Linux export the following variables:

export CFLAGS="-fPIC"

export CPPFLAGS=$CFLAGS

export CXXFLAGS=$CFLAGS

Now for all platforms run:

./configure

make

make install

Just to play safe clear the above defined variables:

export CFLAGS=

export CPPFLAGS=

export CXXFLAGS=

If something fails you need to resolve it. In case the configure script complained about something you can find some additional information in the file config.log. The cause for problems are usually missing header files or libraries, wrong versions or multiple versions installed.