Compile and run vmangos
I used Ubuntu 14.04.1 Server PowerPC 32-bit installed via CD on my PowerMac G4 (Digital Audio) but should work just fine on other 32-bit PowerPC machines.
There were strange problems with 14.04.5 where I was getting endless package conflicts with apt and gave up on it because it was so painful downgrading everything, but 14.04.1 seems to work barring one small issue with libssl.
This process involves compiling some additional utilities/libraries as well as vmangos itself which will take a while on this hardware so patience is required.
First we’ll install all the compilers, build tools, git and dependencies:
sudo apt install build-essential checkinstall git zlib1g-dev
Downgrade libssl
so that libssl-dev
can be installed:
sudo apt install libssl1.0.0=1.0.1f-1ubuntu2
sudo apt install libssl-dev
Install a newer version of gcc/g++ that supports C++14
sudo apt-add-repository "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main"
sudo apt update
sudo apt install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1 --slave /usr/bin/g++ g++ /usr/bin/g++-5
Add the missing public keys (is this actually necessary?):
gpg --keyserver keyserver.ubuntu.com --recv-keys 2C277A0A352154E5
gpg --export --armor 2C277A0A352154E5 | sudo apt-key add -
gpg --keyserver keyserver.ubuntu.com --recv-keys 1E9377A2BA9EF27F
gpg --export --armor 1E9377A2BA9EF27F | sudo apt-key add -
Next we need a newer version of cmake than what is available via apt.
Thanks to Claudio for these instructions. I’ve copied some steps with some modifications here for convenience and to suit the minimum requirements for vmangos.
cd ~
curl -kO https://cmake.org/files/v3.14/cmake-3.14.5.tar.gz
tar -xvzf cmake-3.14.5.tar.gz
cd cmake-3.14.5/
./configure
sudo make install
sudo update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force
You should now have cmake 3.14.5, verify with:
cmake --version
Next install the MySQL client:
sudo apt install libmysqlclient-dev
Reinstall curl so it supports https properly (this didn’t actually fix the problem with cmake not downloading zstd properly so probably not necessary):
sudo apt install --reinstall curl libcurl3
Now it’s time to clone the native branch of vmangos:
mkdir -p ~/vmangos && cd ~/vmangos
git clone -b native https://github.com/vmangos/core
Set up the build directory and configure the build. In this example I am building the client for patch 1.6.1.4544, if you want a different version change the SUPPORTED_CLIENT_BUILD
value to suit your needs (eg. 6141 will give you patch 1.12.1):
mkdir ~/vmangos/build && cd ~/vmangos/build
cmake ~/vmangos/core -DDEBUG=0 -DBUILD_FOR_HOST_CPU=0 -DSUPPORTED_CLIENT_BUILD=4544 -DUSE_EXTRACTORS=0 -DCMAKE_INSTALL_PREFIX=~/vmangos
Now we can compile:
make
If you have a dual core PowerPC CPU you can use both cores with make -j 2
instead.
TODO/INCOMPLETE
dunno why this is needed(?) I suspect github changed something recently, for whatever reason libcurl isn’t following redirects when invoked from cmake, so just download it manually…
cd ~/vmangos/build/_deps/zstd-subbuild/zstd-populate-prefix/src
curl -OL http://github.com/facebook/zstd/releases/download/v1.5.6/zstd-1.5.6.tar.gz