Building jhbuild

Note: You may get an error message msgfmt isn't installed - it's in the GNU gettext package

Note: You may get a message saying you need to run make -f Makefile.plain install - All this omits is building the documentation, which is also at http://library.gnome.org/devel/jhbuild/
The jhbuild executable is installed to ~/.local/bin/jhbuild. You will need to either symlink to it, use the full path or add it to your $PATH.

Building the Server, and Everything It Depends On

But often you would just want to build the X server and key drivers to enable support of your latest shiny hardware, without replacing all of your X libraries and utilities. In this case, you can build specific targets rather than everything.

You will need a minimal number of drivers as well as the server; rather than executing separate jhbuild commands, you can issue a single one listing all the targets you want to build. The input drivers for PS/2 keyboards and mice are: xf86-input-keyboard and xf86-input-mouse.

To build the server and dependencies, along with these drivers, you would type:

Other interesting targets include xorg-drivers which builds all maintained X.org drivers.

Note: rather than building the target xorg-fonts, which will build you an entire additional set of fonts, you may want to make a link in your $prefix area to link to your existing fonts. Unless you have built your X server with --enable-builtin-fontsit will need to access some fonts to start, even though few applications need legacy bitmap fonts anymore.

cd $prefix/lib/X11; ln -s /usr/share/fonts/X11 fonts

Other drivers you may need include the synaptics driver and/or wacom drivers, currently maintained elsewhere (fixme...).

DRM and Kernel Modules

The X server is finally using a device driver on many systems (e.g. Linux, BSD); this is called DRM. It consists of two parts, the generic DRM module and a driver specific to your hardware. Currently, the kernel modules are not built automatically by jhbuild; you can find them in drm/linux-core or drm/bsd-core. To build the drm driver,

make -C linux-core

You may want to install these where you will be able to use them from your /etc/modules file.

Building Other Modules

Other buildable modules include the applications (e.g. xbiff) and the libraries (e.g. libXfixes), plus there a couple of meta modules; xorg-libs will build all libs and xorg-apps will build all apps.

Running The Results

Now that your development environment is set up, you can try running it (as root).

rmmod i915 # assuming you're using Intel
rmmod drm
insmod <path_to_drm_tree_above>/linux-core/drm.ko
insmod <path_to_drm_tree_above>/linux-core/i915.ko
export LD_LIBRARY_PATH=$prefix/lib
startx -- $prefix/bin/Xorg -verbose # make sure you have a ~/.xinitrc with what you want to run

And there you have it, a fresh stack ready for tracking & doing upstream development. Enjoy!

This page and the modules file for the build were originally written by Kristian Høgsberg, and modified by ?EricAnholt. Wikified by ?JimGettys.

Hiccups

There's no facility in jhbuild to mark these modules as only appropriate to some targets, so to permanently avoid building these modules, add the module to the skip configuration variable in your jhbuildrc configuration file. e.g. skip = [ 'xf86-video-impact', 'xf86-video-sunbw2' ]

nouveau won't build unless you already have libdrm_nouveau built. One way to do so is setting temporarily autogenargs = '--enable-nouveau-experimental-api' in jhbuildrc, and use the buildone libdrm jhbuild command.