Install required libraries:
sudo apt-get install -y build-essential cmake git-core libboost-all-dev libphysfs-dev libssl-dev liblua5.1-0-dev libglew-dev libvorbis-dev libopenal-dev zlib1g-dev g++ make cmake automake libogg-dev libncurses5-dev mercurial
Replace physfs from Ubuntu repository to version that works:
hg clone -r stable-3.0 http://hg.icculus.org/icculus/physfs/ && cd physfs && mkdir build && cd build && cmake .. && make && sudo make install && sudo mv /usr/local/lib/libphysfs.a /usr/lib/x86_64-linux-gnu/.
Download OTClient:
git clone git://github.com/edubart/otclient.git
Go into otclient directory:
cd otclient
Edit file CMakesList.txt
Find:
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,-Map=${PROJECT_NAME}.map")
Replace with:
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -fPIC -no-pie -Wl,-Map=${PROJECT_NAME}.map")
Compile OTClient:
mkdir -p build && cd build && cmake .. && make
DONE! You can run OTClient (it’s in build directory):
./otclient
All goes right, and then, at the very end:
[ 99%] Building CXX object CMakeFiles/otclient.dir/src/main.cpp.o
make[2]: *** Brak reguĊ do zrobienia obiektu ‘/usr/lib/x86_64-linux-gnu/libGL.so’, wymaganego przez ‘otclient’. Stop.
CMakeFiles/Makefile2:99: recipe for target ‘CMakeFiles/otclient.dir/all’ failed
make[1]: *** [CMakeFiles/otclient.dir/all] Error 2
Makefile:129: recipe for target ‘all’ failed
make: *** [all] Error 2
Well, this symlink helper – source: https://github.com/RobotLocomotion/drake/issues/2087#issue-148166827
~/otclient/build$ sudo rm /usr/lib/x86_64-linux-gnu/libGL.so
~/otclient/build$ sudo ln -s /usr/lib/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so