-
Notifications
You must be signed in to change notification settings - Fork 400
Compiling on Linux
Kleber Holtz edited this page Apr 4, 2022
·
22 revisions
First install required development packages using apt-get
sudo apt install -y build-essential cmake git-core
sudo apt install -y libboost-all-dev libphysfs-dev libssl-dev liblua5.1-0-dev
sudo apt install -y libglew-dev libvorbis-dev libopenal-dev zlib1g-dev
and if you are using 18.04, you may also need sudo apt install -y libogg-dev
Get the sources, compile and run
git clone git://github.com/edubart/otclient.git
cd otclient
mkdir -p build
cd build
cmake ..
make -j $(nproc)
./otclient
If you have this error at make:
Linking CXX executable otclient /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libphysfs.a: error adding symbols: Archive has no index; run ranlib to add one collect2:
Then do:
git clone -b stable-3.0 https://github.com/icculus/physfs.git
cd physfs
sudo mkdir build
cd build
sudo cmake ..
sudo make -j $(nproc)
sudo make install
sudo cp /usr/local/lib/libphysfs.a /usr/lib/x86_64-linux-gnu/.
First upgrade your system and install required development packages using pacman
sudo pacman -Syu && sudo pacman -S base-devel git cmake boost physfs openssl lua51 glew libvorbis openal zlib libogg
Get the sources, compile and run
git clone git://github.com/edubart/otclient.git
cd otclient && mkdir build && cd build && cmake .. && make
./otclient
These instructions were tested on Fedora 20. Some packages that I suggest to be installed might not actually be needed and there might be a simpler way to link in Lua, but I am not aware of it. In case of a problem, contact d33tah.
sudo yum install readline-devel
yum-builddep lua
wget "http://www.lua.org/ftp/lua-5.1.5.tar.gz" -O- | tar zxvf -
cd lua-5.1.5
make linux
mkdir /opt/lua5.1
make INSTALL_TOP=/opt/lua5.1 install
yum install boost-devel physfs-devel mesa-libGLw mesa-libGL-devel glew-devel openal-devel libvorbis-devel boost-system boost-thread boost-chrono boost-filesystem
The final command, make
, will take most time. If you have a multi-core processor, try make -j$(nproc)
to speed up the build process.
mkdir build && cd build
cmake -DUSE_STATIC_LIBS=OFF -DLUA_LIBRARY=/opt/lua5.1/lib/liblua.a -DLUA_INCLUDE_DIR=/opt/lua5.1/include/ ..
make
./otclient