Canonical officially released Ubuntu 10.10 yesterday. I decided to check it out and thought that this would be a good time to compile the newest snapshot of Mudlet available in the Git repository. (mudlet-1d5e15c.tar.gz)
I've noticed some discrepancies between the compile instructions on the Mudlet website (http://make.mudlet.org/compiling-mudlet-on-linux/), instructions found in the forums (http://forums.mudlet.org/viewtopic.php?f=5&t=1654), and feedback from users on the forums who have attempted to compile Mudlet on similar systems (specifically Ubuntu.) Documentation of my experience follows; hopefully we can clear that up!
Step #1 - Installing Dependencies
- As per the linux instructions found on the website, I began with build-essentials. In a terminal:
sudo apt-get install build-essential - Fetched, installed, finished as expected.
sudo apt-get install libqscintilla2-dev
It gets interesting:The following NEW packages will be installed:
libaudio2 libdrm-dev libgl1-mesa-dev libglu1-mesa-dev libkms1 libmng1
libmysqlclient16 libphonon4 libpthread-stubs0 libpthread-stubs0-dev
libqscintilla2-5 libqscintilla2-dev libqt4-dbus libqt4-declarative
libqt4-designer libqt4-dev libqt4-help libqt4-network libqt4-opengl
libqt4-opengl-dev libqt4-qt3support libqt4-script libqt4-scripttools
libqt4-sql libqt4-sql-mysql libqt4-svg libqt4-test libqt4-xml
libqt4-xmlpatterns libqtcore4 libqtgui4 libqtwebkit-dev libqtwebkit4
libx11-dev libxau-dev libxcb-shape0 libxcb-xv0 libxcb1-dev libxdmcp-dev
libxine1 libxine1-bin libxine1-console libxine1-misc-plugins libxine1-x
mesa-common-dev mysql-common phonon phonon-backend-xine qt4-qmake
x11proto-core-dev x11proto-input-dev x11proto-kb-dev xtrans-dev- libqt4-dev has been selected, but we also need libqt4-dev-tools
- qt4-qmake is what we will be using instead of cmake, but I didn't expect to get it here
- libqt4-opengl-dev was selected here. This is odd because Vadi mentions in his post that he needed to install this before compiling the latest git snapshot. According to these directions, he should have already had it (It's possible that it wasn't listed as a dependency for this package when Vadi previously compiled Mudlet. Perhaps this is a change specific to Maverick (Ubuntu 10.10))
- sudo apt-get install lua5.1 liblua5.1-0-dev
- Fetched, installed, finished as expected. Looks like Lua is behind a version or two. [i]sudo apt-get install qt4-dev-tools[/i]
- Fetched, installed, finished as expected. *Grabbed qt4-designer, previously selected package during the installation of libqscintilla2 [i]sudo apt-get install libpcre3-dev[/i]
- Fetched, installed, finished as expected. Now, that finishes off the dependencies listed on the website. However, according to Vadi's post, we are potentially still missing [b]nvidia-current-dev[/b] and [b]libboost1.40-dev[/b]. For now, I think I'll proceed without trying them to confirm. (If we're betting, I put my money on the nvidia package not being required and the compile breaking on a call to boost.) [b]Step #1.B - Install QT SDK[/b] [i]wget http://get.qt.nokia.com/qtsdk/qt-sdk-linux-x86-opensource-2010.05.1.bin chmod u+x qt-sdk-linux-x86-opensource-2010.05.1.bin ./qt-sdk-linux-x86-opensource-2010.05.1.bin[/i]
- On a 64-bit machine, you'll want to use the 64-bit version of the SDK from http://get.qt.nokia.com/qtsdk/qt-sdk-li ... 0.05.1.bin [u][b]Step #2 - Get the Git (I'm so lame)[/b][/u] I took the snapshot from http://mudlet.git.sourceforge.net/git/gitweb.cgi?p=mudlet/mudlet;a=snapshot;h=HEAD;sf=tgz
- I used this fancy little Gnome archive manager to open the file (it did this by default) and then extracted it (by dragging and dropping) to my home folder, which is something a lot like /home/joseph on my system
- Then I right clicked the folder and renamed it to 'mudlet' because HEAD-mudlet-1d5e15c is not nice to work with in a terminal
You need to use the version of qmake installed with the QT SDK by calling qmake from the SDK's path.
cd mudlet
/home/joseph/qt-sdk/qt/bin/qmake
... (no output from qmake -at all-, I hope that's a good sign!)
make
Errors! Yay!
Okay, 1 error. That's not too bad. Let's see if I can't sort this out. I do a quick search on google, terms "ubuntu package zlib"; directed to package.ubuntu.com where I select maverick as my 'buntu version, and voila, I find the packages zlib1g-dev and zlib1g-dbg. I'm not sure which exactly I need so I elect for both.g++ -c -pipe -O2 -O3 -w -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include/lua5.1 -I/usr/X11R6/include -Itmp -I. -o tmp/TConsole.o TConsole.cpp
In file included from TConsole.h:36,
from TConsole.cpp:24:
ctelnet.h:29: fatal error: zlib.h: No such file or directory
compilation terminated.
make: *** [tmp/TConsole.o] Error 1
sudo apt-get install zlib1g-dbg zlib1g-dev
..fetched, installed, finished as expected.. Following up in my terminal with:
make
and compilation resumes right where we left off. At least until we run into this:
Hey guys, remember when I made that bet about boost? Let's see if I win the money.In file included from TMap.h:36,
from Host.h:52,
from TCommandLine.h:32,
from TConsole.h:37,
from TConsole.cpp:24:
TAstar.h:3: fatal error: boost/graph/astar_search.hpp: No such file or directory
compilation terminated.
make: *** [tmp/TConsole.o] Error 1
sudo apt-get install libboost1.40-dev
(Hmm, it 'suggested' a lot of other packages I'm guessing we don't need them so we'll ignore them for now and find out!)
make
... (time elapse for slow ass compiling to take place) ...
...
... (seriously, I'm eating a bowl of cheerios, the honey-nut kind. It -is- 6:00am now. I started downloading Ubuntu 10.10 at 1:12am)
....
I'm too tired for another error, but it looks like we're missing yet another JSON library. (LOL! I -really- am lame.) Should be an easy fix, but I really am too tired to bother finding exactly which yajl package is required, so lets try:/usr/bin/ld: cannot find -lyajl
collect2: ld returned 1 exit status
make: *** [mudlet] Error 1
sudo apt-get install libyajl1 libyajl-deb libyajl1-dbg
followed by another
make
SUCCESS!
Let's try running mudlet by doing:
./mudlet in the src directory (/home/joseph/mudlet/src for me)
It works! Client runs, though on connecting to Achaea, Mudlet reports that it couldn't locate rex_pcre (a lua error). I have rex_pcre installed, so it must be a path issue?
I hope this is useful to somebody. Concise summary of required instructions will follow in next post.
Cheers.