This is a simple guide to build mesa under GNU-Linux.
The dependencies required are for Ubuntu 11.04, they may differ.
General dependencies
1 2 3 |
sudo aptitude install flex bison dh-autoreconf xutils-dev libpciaccess0 libpciaccess-dev llvm libxext-dev libxdamage-dev libxfixes-dev libexpat1 libexpat1-dev git clone git://anongit.freedesktop.org/git/mesa/mesa mkdir ~/mesa_libs cd ~/mesa_libs |
GL_PROTO installation
The version or some libraries given with Ubuntu are quite old, so we will install our own up-to-date versions.
1 2 3 |
<a href="git://anongit.freedesktop.org/xorg/proto/glproto">git clone git://anongit.freedesktop.org/xorg/proto/glproto</a> ./autogen.sh; make; sudo make install GL_PROTO_CFLAG=/usr/local/include/GL |
LIBDRM
1 2 3 4 5 6 |
git clone git://anongit.freedesktop.org/git/mesa/drm ./autogen.sh ./configure --enable-nouveau-experimental-api make sudo make install sudo cp nouveau/nv04_pushbuf.h /usr/local/include/libdrm/ |
dri2proto
1 2 3 4 5 6 |
<a href="git://anongit.freedesktop.org/xorg/proto/dri2proto">git clone git://anongit.freedesktop.org/xorg/proto/dri2proto</a> cd dri2proto ./autogen.sh ./configure make sudo make install |
Environment variables
In order to defines our locally installed dependencies the followings environment variables are required.
1 2 3 4 |
declare -x DRI2PROTO_CFLAG="-I/usr/local/include/X11/extensions" declare -x GLPROTO_CFLAG="-I/usr/local/include/GL/" declare -x LIBDRM_CFLAG="-I/usr/local/include/libdrm/" declare -x LIBDRM_LIBS="/usr/local/lib/libdrm.so"esa compilation |
1 2 3 |
./autogen.sh ./configure make |
Some parameters can also be given with teh configure command.