After weeping about the fact that I wasn’t able to compile Xgl for quite some time now I got a little pissed watching my pathetic self. Using some workarounds was simply not an acceptable solution and all the guides I found on the net were quite dated.
That’s why I decided to invest a little effort and bring this very howto to you, showing you how to compile Xgl swiftly without any major hassle or corruption.
Note: This guide will use packages from Debian experimental, if you’re faint of heart you may shouldn’t do this (although I’m using a lot of experimental packages without any trouble).
Note 2: This guide will not cover things like base dependencies. It will only add to the existing solutions to make it work with recent versions of Xgl sourcecode! Basically you have to install git and whatnot by yourself.
Synopsis
This post will show how to prepare the necessary sources and how to compile Xgl. For the safety of your system the installation will be made into /opt/Xgl, so in case something goes wrong it won’t break your current X installation.
Step 1: Preparing apt, upgrading packages
As I noted at the beginning of this post you’ve to add Debian experimental. So add the following entries into your /etc/apt/sources.list:
## Debian experimental ##
deb http://ftp.de.debian.org/debian ../project/experimental main contrib non-free
deb-src http://ftp.de.debian.org/debian ../project/experimental main contrib non-free
When you’ve finished run apt-get update and update some packages to their experimental versions:
apt-get install libdrm2/experimental libdrm-dev/experimental
This should be about all you need to upgrade.
Note: Although I’m quite sure I didn’t have to upgrade or install any additional packages to pull this off, please double check older guides for missing packages!
Step 2: Checking out necessary sourcecode
Now we come to the fun part of the show. Most guides tell you to check out data via CVS, but this is entirely wrong and outdated by now!
So, for starters let’s just create all the directories we need:
/opt/Xgl for installation and a local Xgl folder in your home directory for the sourcecode.
mkdir /opt/Xgl
mkdir Xgl
cd Xgl
We need several things:
git clone git://anongit.freedesktop.org/git/xorg/xserver
git clone git://anongit.freedesktop.org/git/xorg/proto/damageproto
git clone git://anongit.freedesktop.org/git/xorg/proto/inputproto
git clone git://anongit.freedesktop.org/git/xorg/proto/randrproto
apt-get source libgl1-mesa-dri/experimental #–not sure about the experimental on this one!–
Step 3: Compiling and stuff
Compile the proto components and prepare mesa…
cd damageproto
./autogen.sh –prefix=/opt/Xgl
make install
cd ../inputproto
./autogen.sh –prefix=/opt/Xgl
make install
cd ../randrproto
./autogen.sh –prefix=/opt/Xgl
make install
cd ../mesa-6.5.2
echo "MKLIB_OPTIONS = -static" >> configs/linux-indirect
make linux-indirect
Now it’s time to look at the xserver, but first we’ve to checkout the xgl-0-0-1 branch of Xgl because the master version is kind of broken right now…
cd ../xserver
git checkout xgl-0-0-1
Finally we can run autogen.sh and make things happen
!
export PKG_CONFIG_PATH=/opt/Xgl/lib/pkgconfig/
./autogen.sh –enable-xgl –disable-xorg –disable-xprint –enable-glx –enable-dri –with-mesa-source=/home/your_username/Xgl/mesa-6.5.2/ –with-release-snap=1 –disable-dmx –disable-xvfb –disable-xnest –enable-xglx –enable-xkb –disable-kdriveserver –prefix=/opt/Xgl
Note: WordPress eats the double dashes, every — (the long ones) represents two – (the short ones; "minus" symbol).
If all Makefiles are successfully created just run make and make install. You can then execute /opt/Xgl/bin/Xgl to start Xgl, for example like this:
/opt/Xgl/bin/Xgl :1 -ac -accel glx:fbo:1 -accel xv:fbo -fp /usr/share/fonts/X11/misc/
Compiz and Beryl should work properly now and there’s no need to use the awful –use-copy parameter anymore. That’s as easy as it could be, unfortunately the information on the official Wiki are a little dated. If anyone wants to use this text as a replacement, feel free to do so!














0 Responses to “Howto: Compiling Xgl on Debian (Sid)”