-
Notifications
You must be signed in to change notification settings - Fork 196
Building XLibre
This page will describe how to obtain the XLibre Xserver from your distribution and how to build it from source. If you are unsure whether to add something or make a change to this page, just talk about it.
Please bear with us that the content here is a work in progress (WIP). If you already built the XLibre Xserver from source then please feel free to add the missing parts.
You can either download a release from Releases · X11Libre/xserver or use Git to clone the project sources like so:
git clone https://github.com/X11Libre/xserver.gitThere are quite a few dependencies that must be available before building the XLibre Xserver. These vary by the distribution you use as shown below. Right now, only the Debian/Devuan dependencies are explicitly known.
apt-get install x11proto-dev xtrans-dev libpixman-1-dev libxkbcommon-x11-dev \
libxfont-dev libxcvt-dev libdrm-dev libepoxy-dev \
x11proto-present-dev x11proto-dev libxkbfile-dev libudev-dev libxshmfence-dev \
libbsd-dev x11proto-xf86dri-dev libgl1-mesa-dev libglu1-mesa-dev \
libglu1-mesa-dev libgl-dev libdrm-dev xutils-dev mesa-common-dev \
libxcb-shape0-dev libxcb-util-dev libxcb-icccm4-devSome need to build xorgproto from source as well.
After cloning the Xserver repository or unpacking the sources, change into the source directory and run the Meson build tool:
cd "<source dir of xserver>"
meson setup <prefix> build --buildtype debugoptimized <meson_options>
ninja -C buildYou may specify the install <prefix> with for example --prefix="$(pwd)/image" and add build time <meson_options> like so: -Dxnest=false.
note: by default meson build will not be optimized (default it debug build) and in GPU demanding applications could result stutters. It is suggested to use debugoptimized build version instead release for ability to have stack trace during crash
After compiling the sources you can install the compiled binaries by running:
sudo ninja -C build installAfter the successful installation you can find the XLibre Xserver at <prefix>/usr/local/bin/X.
WIP To run the Xserver you need some drivers in the <prefix>/usr/local/lib/xorg/modules/xlibre-....
Shutdown other Xservers, change into the <prefix> directory and create a simple testx.sh file with the following contents:
#!/bin/sh
./bin/X :1 vt8 &
\_pid=$!
sleep 10 && kill $\_pidYou can adjust the :1 vt8 and other options in the testx.sh file as detailed in man Xorg. Make the testx.sh executable and run it:
chmod 0770 testx.sh
./testx.shThis should give you glorious 10 seconds of a black and beautyful and empty screen. Afterwards the Xserver complains about being killed but there should be no other critical errors for a "test passed".