HOW-TO build static Ryzom clients, version 2.0 using Ubuntu 12.04 by I do it the old way by first seting up a chroot. The distribution I used inside the chroot is Ubuntu 10.04. I THE CHROOT: $ sudo aptitude install debootstrap dchroot $ sudo mkdir /media/frivol/chroot-precise64 $ sudo mkdir /media/frivol/chroot-precise32 $ sudo editor /etc/dchroot.conf Write the prompt name to by displayed inside the chroot first, then the path where you will install the chroot, i.e.: mychroot-precise64 /media/frivol/chroot-precise64 mychroot-precise32 /media/frivol/chroot-precise32 I set up 2 chroots, one for 64bits and one for 32bits: $ sudo debootstrap --arch amd64 precise /media/frivol/chroot-precise64 http://archive.ubuntu.com/ubuntu/ $ sudo debootstrap --arch=i386 precise /media/frivol/chroot-precise32 http://archive.ubuntu.com/ubuntu/ /!\ In the following I will just setup the 64bits chroot, you have to do the same for the 32bits again if you want to use it too. Let's make the 64bits chroot usable: $ sudo chroot /media/frivol/chroot-precise64/ # aptitude install wget nano locales dialog apt-utils # apt-get install nano locales apt-utils I'm french, thus I set up the french langage: # locale-gen fr_FR.UTF-8 Edit the sources.list to have access to packages: # nano /etc/apt/sources.list deb http://archive.ubuntu.com/ubuntu precise main universe multiverse deb-src http://archive.ubuntu.com/ubuntu precise main universe multiverse # apt-get update # exit Fix the user and root password, the groups, the hostname, from your distribution $ sudo cp /etc/passwd /media/frivol/chroot-precise64/etc/ $ sudo sed 's/\([^:]*\):[^:]*:/\1:*:/' /etc/shadow | sudo tee /media/frivol/chroot-precise64/etc/shadow $ sudo cp /etc/group /media/frivol/chroot-precise64/etc/ $ sudo cp /etc/hosts /media/frivol/chroot-precise64/etc/ Enable sudo and setup your passwords for root and the first sudo user in the admin group: $ sudo cp /etc/sudoers /media/frivol/chroot-precise64/etc/ $ sudo chroot /media/frivol/chroot-precise64/ root@:/# dpkg-reconfigure passwd root@:/# passwd #your first ubuntu user in the admin group WROTE YOUR PASSWORD DOWN: YOU'LL NEED IT FOR SUDO ! root@:/# exit Mount stuff to your chroot from your installation $ sudo editor /etc/fstab # CHROOT PRECISE64 /proc /media/frivol/chroot-precise64/proc none rbind 0 0 # Can just be mounted, comments? /dev /media/frivol/chroot-precise64/dev none rbind 0 0 # Good thing todo, but not secure. /sys /media/frivol/chroot-precise64/sys none rbind 0 0 # Same as proc? /tmp /media/frivol/chroot-precise64/tmp none rbind 0 0 # This opens a lot of doors, namly X sockets are here... DRI should work assuming bits match. Mount your new fstab: $ sudo mount -a Enter the chroot: $ sudo chroot /media/frivol/chroot-precise64/ The default bash profile includes chroot information in the prompt. To make this visible: root@:/# echo mychroot-precise64 >> /etc/debian_chroot root@:/# exit YOU CAN NOW USE YOUR CHROOT AS A NORMAL USER :) Now when you want to use your chroot (you may omit the -c mychroot if there's only one, or you just want the first one in the file). The -d parameter means that your environment will be preserved, this is generally useful if you want chrooted applications to seamlessly use your X server, your session manager, etc. $ dchroot -c mychroot-precise64 (mychroot-lucid)@:~$ The folder for your user under /home does not exist, you have to create it: (mychroot-lucid)@:~$ sudo mkdir /home/USER # Replace USER with your user's name (mychroot-lucid)@:~$ sudo chown USER:USER /home/USER # Replace USER with your user's name II Build the Ryzom client. First dependencies to build Ryzom client. (mychroot-precise64)yannick@athena:~$ sudo apt-get install mercurial libcurl4-openssl-dev libfreetype6-dev libx11-dev libgl1-mesa-dev libxxf86vm-dev libxrandr-dev libxrender-dev libopenal-dev libogg-dev libvorbis-dev libxml2-dev cmake build-essential libpng12-dev libjpeg62-dev rrdtool libmysqlclient-dev bison libxmu-dev I grab w3c-libwww and libsquish from karvala's ppa $ sudo apt-get install python-software-properties $ sudo add-apt-repository ppa:kervala/ryzom $ sudo apt-get update $ sudo apt-get install libwww-dev libsquish-dev libluabind-dev Now, let's build libopenal static: $ cd ~ $ mkdir libopenal && cd libopenal $ apt-get source libopenal1 $ editor openal-soft-1.13/debian/rules add this line "-DLIBTYPE=STATIC", after line 15 to build libopenal static: -DALSOFT_CONFIG=ON \ -DLIBTYPE=STATIC \ $ sudo apt-get build-dep libopenal1 $ cd openal-soft-1.13 $ dpkg-buildpackage -rfakeroot -uc -b This will return some errors at the install stage, thus we will need to copy the static lib by hand. $ cd build-tree/ $ sudo cp libopenal.a /usr/lib Now, let's build a static libcurl: $ cd ~ $ mkdir libcurl $ cd libcurl/ $ sudo apt-get install wget $ wget -c http://curl.haxx.se/download/curl-7.28.0.tar.bz2 $ tar xjf curl-7.28.0.tar.bz2 $ cd curl-7.28.0 ./configure --disable-shared --disable-ldap --disable-ldaps --disable-rtsp --disable-dict --disable-ipv6 --disable-crypto-auth --disable-sspi --disable-tls-srp --without-gnutls --without-librtmp --without-libidn --disable-versioned-symbols --disable-pop3 $ make $ sudo make install Now, let's build the Ryzom client: $ cd ~ $ hg clone http://ryzom.hg.sourceforge.net:8000/hgroot/ryzom/ryzom Later, to update sources you will need to type : $ hg pull && hg update $ export RYHOME="~/ryzom/code" $ mkdir ~/ryzom/code/build $ cd ~/ryzom/code/build For 64bits: $ cmake .. -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TOOLS=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL=ON -DWITH_SOUND=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_STLPORT=OFF -DWITH_NEL_TESTS=OFF -DWITH_LIBWWW_STATIC=ON -DOPENAL_LIBRARY=/usr/lib/libopenal.a -DOPENGL_gl_LIBRARY=/usr/lib/x86_64-linux-gnu/libGL.so -DWITH_STATIC_EXTERNAL=ON -DCURL_LIBRARY=/usr/local/lib/libcurl.a For 32bits: $ cmake .. -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TOOLS=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL=ON -DWITH_SOUND=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_STLPORT=OFF -DWITH_NEL_TESTS=OFF -DWITH_LIBWWW_STATIC=ON -DOPENAL_LIBRARY=/usr/lib/libopenal.a -DOPENGL_gl_LIBRARY=/usr/lib/i386-linux-gnu/libGL.so -DWITH_STATIC_EXTERNAL=ON -DCURL_LIBRARY=/usr/local/lib/libcurl.a Specify your code number after the j, if you have 2 cores in your CPU write: $ make -j2 Now you have a static Ryzom client "ryzom_client": $ ls bin/ ryzom_client You can optionally remove symbols from the binary (this will reduce the size, but useless in gdb): $ strip -s bin/ryzom_client (This seems unecessary now...) $ exit Outside the chroot the binary is here: $ ls /media/frivol/chroot-precise64/home/USER/ryzom/code/build/bin/ ryzom_client