In order to trace a problem in the Mir stack I needed to build mesa to facilitate debugging. As the options needed were not entirely obvious I’m blogging the recipe here so I can find it again next time.
$ apt source libgl1-mesa-dri $ cd mesa-17.0.3 $ QUILT_PATCHES=debian/patches/ quilt push -a $ sudo mk-build-deps -i $ ./configure --with-gallium-drivers= --with-egl-platforms=mir,drm,rs $ make -j6 $ sudo make install && sudo ldconfig
 The stack breaking with EGL clients when the Mir server is running on a second host Mir server that is using the mesa-kms plugin and mesa is using the intel i965 driver. (LP: #1699484)