These are the steps I followed to get skulltag running on Linux. Using build 2969 I can play online. Replace 2969 with 2999, and this guide should work for the latest version of skulltag. If this guide doesn't get you running, reply here or /msg fadein on chat.freenode.net. I'm around some of the time, so don't be discouraged if I don't reply right away.
1. Create a new directory for MM8BDM in your home dir. I name mine for the version of skulltag I'm using, so it's called mm8bdm.98d-2969.
Code:
$ mkdir mm8bdm.98d-2969
$ cd mm8bdm.98d-2969
2. Download CutmanMike's MM8BDM-v1a.zip, and extract into this directory:
Code:
# Cutman Mike's Mega Man 8 Bit Deathmatch bundle
$ wget
http://wadhost.fathax.com/files/MM8BDM-v1a.zip
$ unzip MM8BDM-v1a.zip
3. See what version of skulltag.exe is included in CutmanMike's bundle[1]. This is the version that everyone else will be running on their Wintendos, and if you want to get online you'll need to match it.
Code:
$ grep -a "Skulltag version" skulltag.exe
4. Download the corresponding skulltag release, and extract all of the files. You only need to download the one which matches the architecture your Kernel was built for[2].
Code:
# 64-bit version of build
2999, because there was no 64-bit 2969!!!
$ wget
http://skulltag.net/download/files/testing/98d/SkullDev98d-2999linux-x86_64.tar.bz2
# 32-bit version of build
2999
$ wget
http://skulltag.net/download/files/testing/98d/SkullDev98d-2999linux-x86.tar.bz2
# 32-bit version of build
2969
$ wget
http://skulltag.net/download/files/testing/98d/SkullDev98d-2969linux-x86.tar.bz2
$ tar jxf SkullDev98d*tar.bz2
5. See if you are missing any libraries needed by this build of skulltag. I'll use my system as an example here.
Code:
$ ldd skulltag | grep "not found"
libjpeg.so.62 => not found
libfmodex64-4.24.16.so => not found
libsnes_spc.so => not found
Any libraries listed as not found will need to be installed to your system, or added to the runtime search path of the skulltag binary.
The dependancy on libsnes_spc.so is easy to fix, since that file came with this build of skulltag and is already in this directory.
5a. I already had libjpeg installed on my system in /usr/lib, but it isn't the same version that skulltag was built against. I discovered that it is close enough to work, though. I'll just copy it from /usr/lib to this directory and rename it to match skulltag's expectation.
Code:
$ ls -l /usr/lib/libjpeg.so
lrwxrwxrwx 1 root root 16 Oct 4 10:29 /usr/lib/libjpeg.so -> libjpeg.so.8.0.2*
$ cp /usr/lib/libjpeg.so.8.0.2 libjpeg.so.62
5b. I didn't already have the fmod library installed on my system. However, in the case of my system, the version of the FMOD library in the package repository is not the same version that this build of skulltag is asking for. Even if I installed it, it still would not work. Luckily, the folks at
http://www.fmod.org are good enough to keep all of the previous versions of the library available for download. I was able to navigate to
http://www.fmod.org/index.php/download/find and look for version 4.24.16, as indicated by the ldd output above.
Code:
$ wget
http://www.fmod.org/index.php/release/version/fmodapi42416linux64.tar.gz
# Extract the one file we need:
$ tar -zxf ../fmodapi42416linux64.tar.gz --strip-components=3 fmodapi42416linux64/api/lib/libfmodex64-4.24.16.so
5c. Unlike on Windows, Linux won't by default look for libraries in the current directory. If you want to know why, look for messages in the Full Disclosure archives in September
http://seclists.org/fulldisclosure/2010/Sep/index.html for messages titled "DLL Hijacking vulnerablity".
Now, there are two ways to go about telling skulltag where to find these libraries. The less-intrusive way is to write a wrapper script that will tell the OS where you want to look for the libraries. Such a script will look like this:
Code:
#!/bin/bash
BASEDIR=$(dirname $0)
cd $BASEDIR
LD_LIBRARY_PATH=../lib:. ./skulltag -file MM8BDM-v1a.pk3 -iwad ../wads/megagame.wad $*
#__EOF__
I can't say how well this works in conjunction with doomseeker, but this is how I currently launch MM8BDM. I just use doomseeker to find the games, then I manually connect to them with the console.
The intrusive-but-1337 way to fix skulltag permanently is to hack the binary so that it looks for the libraries in the right place. There's a tool hosted by the FSF called chrpath (
ftp://ftp.hungry.com/pub/hungry/chrpath ... 0.9.tar.gz) that makes this easy enough for a Windows user.
First, let's take a look at skulltag and see where it's trying to load these extra libraries:
Code:
$ chrpath -l skulltag
skulltag: RPATH=/home/blzut3/Code/Skulltag/build/fmodapi/api/lib:/home/blzut3/Code/Skulltag/build/snes_spc
Well, that's the problem: I don't have blzut3's Linux build environment on my PC at home. Nevermind, it's easily fixed:
Code:
$ chrpath -r $PWD skulltag
skulltag: RPATH=/home/blzut3/Code/Skulltag/build/fmodapi/api/lib:/home/blzut3/Code/Skulltag/build/snes_spc
skulltag: new RPATH: /home/fadein/downloads/mm8bdm-098d-2969
As a sanity check, let's run ldd one more time:
Code:
$ ldd skulltag | grep "not found"
This time there's no output. That means we're out of DLL-hell, and you can launch skulltag and frag those Penguin-fearing n00bs.
IT'S OVER!!!
[1] If you can't launch the Linux build of skulltag, you can still find
the build number with this command:
Code:
$ grep -a "SVN revision" skulltag
viewangle = %xOct 24 201029690.98d-alphaSkulltag v%s - SVN revision %s -
SDL version
The output isn't pretty, but you can see it right after the year in the build date.
[2] The `uname -a` command will reveal whether you're running a 32-bit or 64-bit kernel. If i386, i586, or i686 appears in the output, you're kernel is 32-bit. If it says x86_64, it's a 64-bit kernel. Remember, 64-bit Linux will be able to run 32-bit binaries, but you can't do it the other way around. Here's what `uname -a` says on my PC:
Code:
$ uname -a
Linux gemini 2.6.31-gentoo-r6 #3 SMP Mon Dec 28 13:55:06 MST 2009 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ AuthenticAMD GNU/Linux
You can also see if your CPU is 64-bit by checking the /proc/cpuinfo special file:
Code:
$ grep -E "^flags.*\<lm\>" /proc/cpuinfo
If any output is generated, it means that your CPU has the long-mode flag, which means 64-bits.