May 8, 2008
filed in the early afternoon by DrScofield in: from the grid, hacking
technorati tags:
QR code for this entry · average time to read 2:27 minutes

mucking around with trying to get mono to run on hardy heron (and my custom compiled kernel1) i ended up with a mutilated mono installation. just following my previous recipe didn’t work out too well for the mono document browser…duh…:-(

so, i took sean’s shell script and gave that a spin. that worked mostly — i had to adapt it to mono 1.9.1 for the mono-doc stuff and also install additional mono packages. here’s the revised edition:

#!/bin/sh

# This is needed to pick up our built mono for commands
export PATH=/usr/local/bin:$PATH 

apt-get install build-essential bison gawk
apt-get install libglib2.0-dev
apt-get install libpng12-dev libx11-dev libfontconfig1-dev
apt-get install libfreetype6-dev libjpeg62-dev libtiff4-dev
apt-get install libungif4-dev libexif-dev libcairo2-dev
apt-get install libpango1.0-dev libgtk2.0-dev libglade2-dev
apt-get install libgnome2-dev libgnomecanvas2-dev libgnomeui-dev
apt-get install libgnomeprint2.2-dev libgnomeprintui2.2-dev
apt-get install libpanel-applet2-dev libgtksourceview-dev
apt-get install libgtkhtml3.14-dev

BUILDDIR=/usr/src/local/mono/1.9.1
mkdir -p $BUILDDIR
cd $BUILDDIR

wget -c http://go-mono.com/sources/libgdiplus/libgdiplus-1.9.tar.bz2
tar xvf libgdiplus-1.9.tar.bz2
cd libgdiplus-1.9
./configure --prefix=/usr/local
make
make install
cd ..

wget -c http://go-mono.com/sources/mono/mono-1.9.1.tar.bz2
tar xvf mono-1.9.1.tar.bz2
cd mono-1.9.1
./configure --prefix=/usr/local
make
make install
cd ..

wget -c http://switch.dl.sourceforge.net/sourceforge/nant/nant-0.86-beta1-src.tar.gz
tar xvf nant-0.86-beta1-src.tar.gz
cd nant-0.86-beta1
make install --prefix=/usr/local
cd ..

wget -c http://ftp.novell.com/pub/mono/sources/gtk-sharp212/gtk-sharp-2.12.0.tar.bz2
tar xvf gtk-sharp-2.12.0.tar.bz2
cd gtk-sharp-2.12.0
./configure --prefix=/usr/local
make
make install
cd ..

wget -c http://ftp.novell.com/pub/mono/sources/gecko-sharp2/gecko-sharp-2.0-0.13.tar.bz2
tar xvf gecko-sharp-2.0-0.13.tar.bz2
cd gecko-sharp-2.0-0.13
./configure --prefix=/usr/local
make
make install
cd ..

wget -c http://go-mono.com/sources/gnome-sharp2/gnome-sharp-2.16.1.tar.gz
tar xvf gnome-sharp-2.16.1.tar.gz
cd gnome-sharp-2.16.1
./configure --prefix=/usr/local
make
make install
cd ..

wget -c http://go-mono.com/sources/gtksourceview-sharp2/gtksourceview-sharp-2.0-0.12.tar.bz2
tar xvf gtksourceview-sharp-2.0-0.12.tar.bz2
cd gtksourceview-sharp-2.0-0.12
./configure --prefix=/usr/local
make
make install
cd ..

wget -c http://ftp.novell.com/pub/mono/sources/gnome-desktop-sharp2/gnome-desktop-sharp-2.20.1.tar.bz2
tar xvf gnome-desktop-sharp-2.20.1.tar.bz2
cd gnome-desktop-sharp-2.20.1
./configure --prefix=/usr/local
make
make install
cd ..

cd mono-1.9.1
wget  -c http://go-mono.com/sources/monodoc/monodoc-1.9.zip
unzip monodoc-1.9.zip
cd monodoc-1.9
./configure --prefix=/usr/local
make
make install
cd ../..

wget -c http://go-mono.com/sources/mono-tools/mono-tools-1.9.tar.bz2
tar xvf mono-tools-1.9.tar.bz2
cd mono-tools-1.9
./configure --prefix=/usr/local
make
make install
cd ..

wget -c http://ftp.novell.com/pub/mono/sources/mono-debugger/mono-debugger-0.60.tar.bz2
tar xvf mono-debugger-0.60.tar.bz2
cd mono-debugger-0.60
./configure --prefix=/usr/local
make
make install
cd ..

wget -c http://ftp.novell.com/pub/mono/sources/heap-buddy/heap-buddy-0.2.tar.gz
tar xvf heap-buddy-0.2.tar.gz
cd heap-buddy-0.2
./configure --prefix=/usr/local
make
make install
cd ..

wget -c http://ftp.novell.com/pub/mono/sources/mono-addins/mono-addins-0.3.1.tar.bz2
tar xvf mono-addins-0.3.1.tar.bz2
cd mono-addins-0.3.1
./configure --prefix=/usr/local
make
make install
cd ..

wget -c http://ftp.novell.com/pub/mono/sources/monodevelop/monodevelop-1.0.tar.bz2
tar xvf monodevelop-1.0.tar.bz2
cd monodevelop-1.0
./configure --prefix=/usr/local
make
make install
cd ..

note: you might want to adapt the setting of BUILDDIR!


  1. yes, i’m not using the ubuntu supplied kernel as

    1. the suspend–resume stuff is just not working on my thinkpad X60(s), and
    2. the iwl3945 WLAN driver just doesn’t grok our companies IEEE80211X setup :-(

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
May 2, 2008
filed in the early evening by DrScofield in: hacking
technorati tags:
QR code for this entry · average time to read 1:12 minutes

ever since i switched to wordpress 2.5 (and 2.5.1) i was experiencing absurdly high CPU loads whenever i posted a new blog entry or changed a page — culminating in loads of 124+ yesterday, effectively bringing our server to a standstill! :-( not good. not good at all.

a ps ax | grep apache2 | wc -l revealed a rocking 104 apache2 processes running! yikes! all with about 21MB of memory usage (at least), no wonder the poor box was thrashing for dear life…

looking at what ubuntu had installed i found that (a) we had apache-prefork running and (b) switching to apache-worker1 would remove mod_php5 — which we need to have all the PHP scripts running (including this blog). hmmm.

some googling later it transpired that switching to thread-based apache was the right thing to do and also, that the fast CGI module mod_fcgid would be the solution to the disappearing php5 apache module.

here’s what i did: first install threaded apache

% apt-get install apache2-mpm-worker

then, install the fcgid module

% apt-get install libapache2-mod-fcgid

then, modify /etc/apache2/mods-available/fcgid.conf to read as follows:

<IfModule mod_fcgid.c>
    AddHandler    fcgid-script .php
   FCGIWrapper   /usr/local/sbin/php-fcgi .php
   IPCConnectTimeout 60
</IfModule>

create /usr/local/sbin/php-fcgi .php with the following content:

#!/bin/sh
PHPRC="/etc/php5/apache2"
export PHPRC
PHP_FCGI_CHILDREN=1
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php5-cgi

now, all that’s left to do, is ensure that for each virtual host you have ExecCGI enabled:

<Directory /var/www/xyzzyxyzzy.net/>
        Options ExecCGI Indexes FollowSymLinks MultiViews
        AllowOverride All

        Order allow,deny
        Allow from all
</Directory>

restart your apache and we are back in business — on my box the load is now back in sane regions: instead of 124+ we are back at 0.52 for posting a blog entry (at most)!


  1. the thread based apache. 

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
filed in the early afternoon by DrScofield in: hacking
technorati tags:
QR code for this entry · average time to read 0:19 minutes

having bitten the bullet and upgraded from feisty fawn to hardy heron i had to reinstall my amorok from svn to get proper support for artwork again…which requires an installation of libgpod from svn…which on hardy heron requires gdk-pixbuf…

…just installing libgdk-pixbuf2 and libgdk-pixbuf-dev didn’t satisfy libgpod’s configure script though. what did the trick was

% apt-get install libgtk2.0-dev

compiling amarok now…

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
April 30, 2008
filed late at night by DrScofield in: from the grid, hacking, linux
technorati tags:
QR code for this entry · average time to read 0:45 minutes

just thought i’d let you participate in today’s adventure: triggered by ansgar commenting on ubuntu offering him to upgrade to ubuntu 8.04 “hardy heron” i though, “hmm, good idea, let’s do a quick update”…

…well, a couple of hours later i seemed to be back in business, hardy heron was installed on “my” x60 and i was just about do another OpenSim build — when i noticed that nant was seg faulting! now, wait a moment, it clearly was not supposed to do that. ok, can happen, what with new libs and all that. so, let’s walk on over to /usr/local/src/mono/nant-0.86b and do a re-install. should be easy, peasy…

…except it wasn’t: mono’s compiler mcs kept seg faulting as well! hmmm.

ok. let’s reinstall mono. following my own script i started the re-install — which crashed as well after about 5min of mucking around.

panic stations!

googling around it transpired that this would happen when running hardy heron with a custom compiled kernel of pre-2.6.24 vintage — which i was :-(

i’m happy to report that with 2.6.25 mono is running again :-)

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
April 29, 2008
filed in the early afternoon by DrScofield in: void
technorati tags:
QR code for this entry · average time to read 1:28 minutes

until a couple of days ago, opensim would only run in console mode: whenever you started OpenSim you would end up at a prompt inside OpenSim’s very own console — which is very convenient if you want to manage it that way. it is rather inconvenient if you want to start OpenSim as a daemon in the background (and control it via the RemoteAdminPlugin, for example).

as of OpenSim’s subversion release r4390 the basic support for running OpenSim without such a console is in the code base and all you need to do is invoke OpenSim with the -background True commandline parameter:

% mono --debug OpenSim.exe -background True

note: that’s just a single dash for -background True!

another patch is on its way that not only adds code to properly shutdown OpenSim when the admin_shutdown XmlRpc method is invoked but it also adds the shutdown.py script:1

you can either pass in the server URI and password to use via commandline parameters, or you can create .opensim-console.rc in your home directory and set default values:

[opensim]
server = http://127.0.0.1:9000/
password = secret

then all you need to do to shutdown your OpenSim server is: invoke shutdown.py


  1. to be found in share/python/console/shutdown.py

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
April 22, 2008
filed around lunchtime by DrScofield in: from the grid
technorati tags:
QR code for this entry · average time to read 1:55 minutes

last week i described how to set up asterisk & opensim. a rather useful tool to test the whole setup is libsecondlife’s TestClient which (as of release 1758) contains commands to retrieve the voice account details and also to obtain the voice parcel info.

you start up your freshly compiled TestClient1

% mono --debug TestClient --first Foo --last Bar --pass secret
...
1 avatars online>

and then you issue the voiceaccount command to obtain the voice account credentials:2

1 avatars online> voiceaccount
DEBUG [libsecondlife]: New CAPS request to 
https://sim4042.agni.lindenlab.com:1204/cap/…. initiated
Voice Account for Ghostly Writer: 
    user “x2MOzi4T1Sq-qsfh77_Mnag==”, 
    password “XXXXXXXXXXXXXXX”
1 avatars online> DEBUG [Ghostly Writer]: Voice version 1 verified

…this tells us the voice account user name3 and password4. next you can issue the voiceparcel command to obtain the parce voice info details for the parcel you are currently on…

1 avatars online> voiceparcel
DEBUG [libsecondlife]: New CAPS request to 
https://sim4042.agni.lindenlab.com:12043/cap/… initiated
Parcel Voice Info request for Ghostly Writer: 
    region name “Zurela”, 
    parcel local id 26, 
    channel URI sip:confctl-243489@bhr.vivox.com

…which returns the region, parcel local ID, and the channel URI (the “conf call”) for that parcel.

repeating the whole exercise with OpenSim gives us this output:

% mono TestClient.exe --first Foo --last Bar --pass secret \
        --loginuri http://127.0.0.1:9000/
DEBUG [libsecondlife]: New CAPS request to http://127.0.0.1:9000/ initiated
DEBUG [Foo Bar]: Setting InventoryRoot to d8913a4b-…
DEBUG [Foo Bar]: Login status: ConnectingToSim: Connecting to simulator…
INFO [Foo Bar]: Connecting to (127.0.0.1:9000)
INFO [Foo Bar]: Received a region handshake for user error (127.0.0.1:9000)
DEBUG [libsecondlife]: New CAPS request to 
http://127.0.0.1:9000/CAPS/… initiated
DEBUG [Foo Bar]: Login status: Success: Welcome to OpenSim
Logged in Foo Bar
Type quit to exit.  Type help for a command list.
1 avatars online> DEBUG [Foo Bar]: Got capabilities: 
    UpdateNotecardAgentInventory 
    NewFileAgentInventory 
    FetchInventoryDescendents 
    MapLayer UpdateScriptTaskInventory 
    UpdateScriptAgentInventory ParcelVoiceInfoRequest 
    ProvisionVoiceAccountRequest
INFO [Foo Bar]: Connecting to (127.0.0.1:19999)
INFO [Foo Bar]: Received a region handshake for solid (127.0.0.1:19999)
1 avatars online>
1 avatars online> voiceaccount
DEBUG [libsecondlife]: New CAPS request to 
http://127.0.0.1:9000/CAPS/… initiated
Voice Account for Foo Bar: 
    user “xJ_Mn9bMsTkWxiduZkM4zSw==”, 
    password “$1$a857bc518438f33c16504831a5a47dd0″

and voiceparcel:

1 avatars online> voiceparcel
DEBUG [libsecondlife]: New CAPS request to 
http://127.0.0.1:9000/CAPS/… initiated
Parcel Voice Info request for Foo Bar: 
    region name “user error”, 
    parcel local id 1, 
    channel URI sip:54a9888b-…-85d45956bc1b@secondlife.zurich.ibm.com

a bit different, but in essence the same.


  1. it needs to be compiled from the libsecondlife subversion code base

  2. i’ve changed the formatting to fit the output within the blog space, so the real output is a bit differently formatted. 

  3. the UUID of your avatar, base-64 encoded…and, yes, i cheated. can you find out which avatar i logged in for this example? ;-) 

  4. X-ed out here. 

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
April 18, 2008
filed around lunchtime by DrScofield in: from the grid
technorati tags:
QR code for this entry · average time to read 6:57 minutes

if you’ve been following the opensim-commits mailing lists recently, you will have noticed that among the flurry of bug fixes and new features were a couple of commits mentioning the magic terms voice support. based on the the voice technology entry on wiki.secondlife.com, and also jhurliman’s libsl VoiceManager and VoiceTest code we have been working on adding voice capabilities required to interact with Linden Lab’s SecondLife® client to OpenSim.

i’ll try and explain what we’ve achieved so far in the following sections. if you are impatient and want to skip the pretty pictures and high-level explanations you can use the following mini-table of contents:

asterisk-opensim integration

with the first iteration we refactored OpenSim’s capability system so that region module’s could contribute their capabilities to the seed capability and added a very simple, plain VoiceModule.

the second iteration (subversion r4236) now has a new voice module, AsteriskVoiceModule. also, in share/python/asterisk you should find a python XmlRpc server called asterisk-opensim.py. together with the open-source asterisk VoIP server both bring us quite a bit closer to our goal of voice support for OpenSim.

to understand how AsteriskVoiceModule and asterisk-opensim.py and your SecondLife client play together, let’s take a look at the following figure:

automatic SIP account creation

when the SecondLife client logs in to the Linden Lab grid or to an OpenSim grid, among the first things it does (once it got its seed capabilties from the grid) is to ask the grid server for the voice acount details (#1, ProvisionAccountRequest in the figure above). these voice account details basically are your avatar’s SIP account details which your SecondLife client is going to pass on to SLVoice(.exe).1 in our case, AsteriskVoiceModule deals with the incoming caps request from the SecondLife client: it

  • retrieves the avatar’s UUID and base64-encodes it, and
  • generates a one-time password (otp), and then
  • it then issues an account_update XmlRpc call to our asterisk-opensim.py XmlRpc server running on the same box as our asterisk server (#2, account_update).

asterisk-opensim.py checks that the XmlRpc call is correct and then updates the MySQL database that we use to configure asterisk in realtime by adding a dialplan for the UUID of our avatar (which basically creates a SIP account for our avatar)(#3, update extensions_table) — the MySQL database becomes effective (#4) the next time asterisk queries the database for its dialplan.

once asterisk-opensim.py has done its job, it tells AsteriskVoiceModule that it was successful (#5). AsteriskVoiceModule then returns the newly created (or updated) voice account information to your SecondLife client (#6).

Your SecondLife client then passes that information on to SLVoice which has nothing better to do than go and register with our asterisk server…

…well, it would, except, SLVoice as packaged with the normal SecondLife client does not know about our asterisk server. we’ll need to supply a replacement SLVoice client before we can claim success!2 you might want to check out the voipforvw project for one example of such a replacement.

ok, so, we now have a SIP account, and our potential SLVoice replacement has registered with the asterisk server (well, once we’ve got it, that is ;-)) — how do we actually get voice and get to talk to other avatars? that’s what the next section is all about…

automatic conference call setup

lacking a proper spatial sound module for asterisk, we are just going to assign a conference call number to each and every region in our grid. sure, the idea being that whenever you avatar enters a new region, your SecondLife client will dial into the conference call for that region and leave the conference call of the old region.

how does your SecondLife client get the conference call number then? well, it turns out that the SecondLife client issues a ParcelVoiceInfo request to the grid each time it enters a new region3. again, the figure below illustrates what happens.

our AsteriskVoiceModule will receive the ParcelVoiceInfo call (#1) and will in turn issue a region_update XmlRpc call to asterisk-opensim (#2) containing the region’s UUID4.

asterisk-opensim verifies the XmlRpc call from AsteriskVoiceModule and will then add records to asterisk’s MySQL database (#3) to

  • create (or update) a conference call with the region UUID as the dial-in “number”
  • create appropriate dial plan entries for that conference call

asterisk will pick up the changes the next time it goes through its dial plan (#4)

and, once done, asterisk-opensim returns success: true to AsteriskVoiceModule (#5), which then returns the region voice details to your SecondLife client (#6):

  • region_name — the name of the region your avatar is currently in
  • parcel_id — i assume this contains the local ID of the piece of land your avatar is on
  • channel_uri — basically, the UUID of the region plus the value of the conf_domain parameter from the [AsteriskVoiceModule] section from OpenSim.ini

your SecondLife client passes the received information on to the SLVoice application which will then dial into to the conference call (#7) for the new region (and leave the old conf call for the old region).5

setting it all up

to make this all work we need to

  • enable AsteriskVoiceModule
  • configure asterisk-opensim.py
  • setup asterisk’s MySQL database
  • configure asterisk to query the MySQL database for its dial plan

the following sections explain each step in more detail.

setting it all up: AsteriskVoiceModule

to enable the AsteriskVoiceModule you need to add the following lines to OpenSim.ini

[AsteriskVoice]
enabled = true
; SIP account server domain
sip_domain = testserver.com
; SIP conf server domain
conf_domain = testserver.com
; URL of the asterisk opensim frontend
asterisk_frontend = http://testserver.com:49153/
; password for the asterisk frontend XmlRpc calls
asterisk_password = bah-humbug
; timeout for XmlRpc calls to asterisk front end (in ms)
asterisk_timeout = 3000
; salt for asterisk nonces
asterisk_salt = some_secret_here

what do the individual parameter mean:

enabled
if true enable the module. make sure you have the plain vanilla Voice module disabled
sip_domain
the SIP domain to append to UUIDs for user accounts (can be empty)
conf_domain
the SIP domain to append to UUIDs for region conference call IDs
asterisk_frontend
the URL of the asterisk-opensim.py front end
asterisk_password
the password required for the asterisk-opensim.py XmlRpc calls
asterisk_timeout
AsteriskVoiceModule will wait this long for XmlRpc calls to asterisk-opensim.py to succeed (in ms)
asterisk_salt
salt to use for generating random one-time password for user SIP accounts

setting it all up: asterisk-opensim.py

asterisk-opensim.py is configured through it’s own config file. you supply the path to the config file via the --config option (just invoke asterisk-opensim.py with --help to get usage instructions). the config file looks like this:

[xmlrpc]
baseurl = http://127.0.0.1:53263/
debug   = true

[mysql]
server   = localhost
database = asterisk
user     = asterisk
password = asterisk
debug    = true

[mysql-templates]
tables = /path/to/create-table.sql
user   = /path/to/create-user.sql
region = /path/to/create-region.sql
debug    = true

we have three sections:

[xmlrpc]
here you configure the base URL for the account_update and region_update XmlRpc calls (currently you cannot supply a path name, we only take hostname and port)
[mysql]
here you configure which server to use, the name of the asterisk database, the user name and password of the MySQL user and whether you want debugging output or not.
[mysql-templates]
these are the path names to the templates that we use to create the required MySQL tables and also to update user account and update region conference calls. also, you can switch on debugging here.

setting it all up: MySQL database

setting up MySQL is pretty easy: you only need to create the asterisk database and the asterisk user:

# mysql -u root -p
mysql> create database asterisk;
Query OK, 1 row affected (0.02 sec)

mysql> use asterisk;
Database changed
mysql> grant all on asterisk.* to 'asterisk'@'localhost' identified by 'asterisk';
Query OK, 0 rows affected (0.09 sec)

mysql> quit;
Bye

that’s it. asterisk-opensim.py will take care of creating the necessary tables for you.

you might want to change the user name (the 'asterisk part of 'asterisk'@'localhost') and password (again, the 'asterisk' part in identified by 'asterisk') — but make sure you adapt your [asterisk-opensim.cfg](#setup-asterisk-opensim) and your asterisk configuration accordingly.

setting it all up: asterisk

we need to configure asterisk to use the ODBC database interconnect (also called asterisk realtime).

in your asterisk configuration directory — on ubuntu that’s /etc/asterisk — you need to make sure that you have

sipusers => odbc,asterisk,ast_sipfriends
sippeers => odbc,asterisk,ast_sipfriends
extensions => odbc,asterisk,extensions_table

in extconfig.conf

then in res_odbc.conf you need to have the following section:

[asterisk]
enabled => yes
dsn => asterisk-connector
username => asterisk
password => asterisk
;pooling => no
;limit => 5
pre-connect => yes

this assumes that your asterisk database is “asterisk”. likewise, that the MySQL username and password is ‘asterisk’ — if you used different values in your MySQL setup , you, of course, need to reflect that here.

then, you need to have the following extensions.conf:

[general]
static=yes
writeprotect=no
clearglobalvars=no

[globals]
CONSOLE=Console/dsp


[avatare]
switch => Realtime/@

finally, you need to have an empty sip.conf:

# mv sip.conf sip.conf.backup
# touch sip.conf

that’s about it, really.


  1. on windows it’s SLVoice.exe, on linux it’s just SLVoice

  2. emphasizing this so as not to get lots of emails telling me that your voice setup does not work. no, kids, we are not there yet. but we can see the city lights approaching… 

  3. it might actually do so, everytime you move into a new parcel (or land in OpenSim terminology), i haven’t checked that yet… “left as an exercise to the reader” ;-) 

  4. actually the region UUID plus the conf_domain parameter from the [AsteriskVoiceModule] config section in OpenSim.ini

  5. again, this requires a replacement SLVoice application, the standard one won’t do this. 

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
March 28, 2008
filed just before lunchtime by DrScofield in: hacking
technorati tags:
QR code for this entry · average time to read 0:32 minutes

i realized the other day that the markdown-extra plugin i am using for text markup was generating non-unique footnote anchors, resulting in any footnote #1 in a blog entry on referring back to footnote #1’s anchor in the very first blog on a page with multiple blog entries. not good. so, i had a look at the markdown-extra.php’s source — it already contains a variable fn_id_prefix but that is initialized to the empty string

yet, that is a nice starting point, because all we have to do to get unique anchors is to add the following line of code in _hashHTMLBlocks_inMarkdown():1


  1. right after the initial

    if ($text === '') return array('', '');
    

    test. 

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
March 27, 2008
filed just before lunchtime by DrScofield in: from the grid, linux
technorati tags:
QR code for this entry · average time to read 1:37 minutes

to run the most recent libsecondlife release you need to have at least mono 1.9 installed. the following step-by-step recipe applies to a ubuntu 7.10 system and you should be root:

installing pre-reqs

apt-get install build-essential bison gawk
apt-get install libglib2.0-dev
apt-get install libpng12-dev libx11-dev libfontconfig1-dev 
apt-get install libfreetype6-dev libjpeg62-dev libtiff4-dev 
apt-get install libungif4-dev libexif-dev libcairo2-dev
apt-get install libpango1.0-dev libgtk2.0-dev libglade2-dev
apt-get install libgnome2-dev libgnomecanvas2-dev libgnomeui-dev
apt-get install libgnomeprint2.2-dev libgnomeprintui2.2-dev 
apt-get install libpanel-applet2-dev libgtksourceview-dev
apt-get install libgtkhtml3.14-dev

installing libgdiplus

wget http://go-mono.com/sources/libgdiplus/libgdiplus-1.9.tar.bz2
tar xvf libgdiplus-1.9.tar.bz2
cd libgdiplus-1.9
./configure --prefix=/usr/local
make
make install

installing mono

wget http://go-mono.com/sources/mono/mono-1.9.tar.bz2
tar xvf mono-1.9.tar.bz2 
cd mono-1.9
./configure --prefix=/usr/local
make
make install

installing nant

wget http://switch.dl.sourceforge.net/sourceforge/nant/nant-0.86-beta1-src.tar.gz
tar xvf nant-0.86-beta1-src.tar.gz
cd nant-0.86-beta1
make install prefix=/usr/local

you now have the base setup, which is sufficient for building and running libsecondlife and opensim. the following packages are add-ons that are nice-to-have but not necessary-to-have. i do recommend installing the monodoc & mono-tools stuff, however — it makes live easier :-)

gtk-sharp

wget http://go-mono.com/sources/gtk-sharp210/gtk-sharp-2.10.4.tar.bz2
tar xvf gtk-sharp-2.10.4.tar.bz2
cd gtk-sharp-2.10.4
./configure --prefix=/usr/local
make
make install

gnome-sharp

wget http://go-mono.com/sources/gnome-sharp2/gnome-sharp-2.16.1.tar.gz
tar xvf gnome-sharp-2.16.1.tar.gz
cd gnome-sharp-2.16.1
./configure --prefix=/usr/local
make
make install

gtksourceview-sharp

wget http://go-mono.com/sources/gtksourceview-sharp2/gtksourceview-sharp-2.0-0.12.tar.bz2
tar xvf gtksourceview-sharp-2.0-0.12.tar.bz2
cd gtksourceview-sharp-2.0-0.12
./configure --prefix=/usr/local
make
make install

monodoc & mono-tools

to get the monodoc C# documentation viewer (recommended!) we need to install the monodoc package and the mono-tools package. monodoc itself needs to be installed inside the mono-1.9 source directory1 from above.

cd mono-1.9 # this is the source directory from the above
wget  http://go-mono.com/sources/monodoc/monodoc-1.9.zip
unzip monodoc-1.9.zip
cd monodoc-1.9
./configure --prefix=/usr/local
make
make install
cd ../..

next, install mono-tools:

wget http://go-mono.com/sources/mono-tools/mono-tools-1.9.tar.bz2
tar xvf mono-tools-1.9.tar.bz2
cd mono-tools-1.9
./configure --prefix=/usr/local
make
make install

configure will mumble about gecko-sharp.dll not being build, that’s ok, just ignore it.


  1. …otherwise, monodoc will not pick up the C# doc for the base assemblies. 

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
March 13, 2008
filed mid-afternoon by DrScofield in: from the grid, hacking
technorati tags:
QR code for this entry · average time to read 0:30 minutes

regardless of whether you check out opensim from a source repository or are using prebuild packages, opensim will always bring along its own libsecondlife.dll. as of the time of this writing this libsecondlife.dll is the subversion 1550 snapshot from libsecondlife’s subversion repo.

as mentioned in an earlier post, opensim’s libsecondlife sources are not contained within the main opensim source tree, you need to check those out separately:

% svn co http://opensimulator.org/svn/opensim-libs/libsl1550 opensim-libs

then, just go into the newly checked out opensim-libs directory and run nant to build libsecondlife.dll…

% cd opensim-libs
% nant

…and once it’s done, copy bin/libsecondlife.dll to your opensim/bin directory.

done. enjoy.

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
next page »