XuvTools is developed in a cooperative effort from:
  • Chair of Pattern Recognition and Image Processing [www]
  • Friedrich Miescher Institute for Biomedical Research [www]
  • Center for Biological Systems Analysis [www]

Ubuntu Changeroot for Compilation

This short introduction is based on a more detailed guide at https://wiki.ubuntu.com/DebootstrapChroot.

Installing Ubuntu into a Chroot


sudo aptitude install debootstrap schroot

first, create a new chroot-environment (Ubuntu hardy, 64-bit):

sudo debootstrap --variant=buildd --arch amd64 hardy "${CHROOTDIR}" http://archive.ubuntu.com/ubuntu/
sudo vim "${CHROOTDIR}/etc/apt/sources.list"
sudo touch "${CHROOTDIR}/CHROOT"
echo hardy64_chroot | sudo tee ${CHROOTDIR}/etc/debian_chroot
for file in passwd shadow group gshadow hosts ; do sudo cp -av /etc/$file ${CHROOTDIR}/etc/ ; done

NOTE: if you're behind a proxy, use the following debootstrap-call instead:

sudo http_proxy="http://<your.proxy.address>:<port>/" debootstrap --variant=buildd --arch amd64 hardy "${CHROOTDIR}" http://archive.ubuntu.com/ubuntu/

then, set up the according /etc/schroot/schroot.conf:

description=Ubuntu Hardy Heron 8.04 (LTS) 64-bit

NOTE: “type” and “run-setup-scripts” are required so schroot automatically mounts “/proc” and “/dev/pts” etc. when starting a chroot-session

“log in” the new chroot for the first time as root:

sudo schroot -c hardy64 -u root -d /root
apt-get update
apt-get install wget devscripts gnupg nano aptitude apt-utils sudo vim-tiny bash-completion
locale-gen en_US.UTF-8
locale-gen de_DE.UTF-8
aptitude update
aptitude dist-upgrade
aptitude -f install

set up the home for the non-root user that builds the software:

sudo mkdir ${CHROOTDIR}/home/<USERNAME>


deb http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu hardy-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu hardy-updates main restricted
deb http://security.ubuntu.com/ubuntu hardy-security main restricted
deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted 

## 'Backports' repository
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release.
deb http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse 

# media packages
deb http://packages.medibuntu.org/ hardy free non-free


Add some or all of the following lines to enable sudo (replace emmenlau with your username).

%admin		ALL=(ALL) ALL

# with password, emmenlau can do much stuff
emmenlau	ALL = (ALL) ALL

# emmenlau may do some more
emmenlau	ALL = NOPASSWD: /bin/mount, /bin/umount
emmenlau	ALL = NOPASSWD: /usr/bin/apt-get, /usr/bin/aptitude, /usr/bin/dpkg
emmenlau	ALL = NOPASSWD: /usr/bin/nohup, /sbin/reboot, /sbin/shutdown, /usr/bin/killall, /bin/kill

emmenlau	ALL = NOPASSWD: /sbin/mount, /sbin/umount
emmenlau        ALL = NOPASSWD: /bin/cp, /bin/mv, /bin/chmod, /usr/sbin/chown, /bin/echo, /usr/bin/touch

Ubuntu essential Packages

At this point, you can use the tool xuvprepare.sh to test your chroot system. xuvprepare.sh will tell you about missing required packages, too. See Testing your build Environment for Unix/Linux/Mac or Windows on the XuvTools build page.

For Ubuntu Lucid Lynx 10.04

The bare minimum of Ubuntu packages, that are essential for XuvTools compilation (and/or very convenient and also small), is:

colorgcc build-essential lsb-release\
xorg-dev libglu1-mesa-dev \
automake autoconf m4 bison flex \
cvs subversion mercurial git git-svn libtool patchutils texi2html dvipng \
rar unrar arj zip unzip \
perl python

For libBlitzBioFormats, you also need:

openjdk-6-jdk ant cmake

# or sun-java6-jdk

Several useful packages that you might also want to install:

valgrind gdb \
less nano vim \
automake1.7 automake1.9

Tips and Tricks

Qt will draw the fonts (un)pretty grainy if some libs are not available during (Qt-) buildtime. To prevent this, you should install the freetype, fontconfig and xrender libraries (and their development headers). On Ubuntu/Debian, just do a:
sudo aptitude install libfreetype6-dev libfontconfig1-dev libxrender-dev

devel/install_ubuntu_chroot.txt · Last modified: 2012/05/04 17:28 by niko
Contact: admin(a)xuvtools.org