Subject: Bug#775235: Repeatable failure to start on i386 running under kvm

From: Bernhard Übelacker <[email-masked]>
Date: Tue, 20 Jan 2015 19:41:22 +0100

Hello,
came across launchpad bug #1360241 [1] which discusses the same error.
There it comes from ubuntu-ui-toolkit tests.

There they did revert their mesa package to depend on llvm-3.4 instead
of llvm-3.5.

So did I and recompiled mesa to use llvm-3.4 (see attached patch).
And with these packages installed the error message was gone and the login
screen is shown and a login possible.

Going back to current jessie packages depending on llvm-3.5 lead to
getting the error message again.

Kind regards,
Bernhard

[1] https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-3.5/+bug/1360241

Rebuilding the mesa packages:

root@debian:/home/benutzer# apt-get install debhelper quilt pkg-config libdrm-dev libx11-dev x11proto-gl-dev libxxf86vm-dev libexpat1-dev libxfixes-dev libxdamage-dev libxext-dev libvdpau-dev autoconf automake libtool x11proto-dri2-dev x11proto-dri3-dev x11proto-present-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-glx0-dev libxcb-xfixes0-dev libxcb-dri3-dev libxcb-present-dev libxcb-randr0-dev libxcb-sync-dev libxshmfence-dev libudev-dev flex bison llvm-3.4-dev libelf-dev libwayland-dev libclang-3.4-dev libclc-dev

benutzer@debian:~$ mkdir mesa; cd mesa
benutzer@debian:~/mesa$ apt-get source libgl1-mesa-dri
benutzer@debian:~/mesa$ cd mesa-10.3.2
benutzer@debian:~/mesa/mesa-10.3.2$ patch -p1 --dry-run < ../switch-to-3.4.patch    # change llvm 3.5 to 3.4 like https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-3.5/+bug/1360241
benutzer@debian:~/mesa/mesa-10.3.2$ dpkg-buildpackage -b

root@debian:/home/benutzer/mesa# dpkg -i libegl1-mesa_10.3.2-1_i386.deb libegl1-mesa-drivers_10.3.2-1_i386.deb libgbm1_10.3.2-1_i386.deb libgl1-mesa-dri_10.3.2-1_i386.deb libgl1-mesa-dri-dbg_10.3.2-1_i386.deb libgl1-mesa-glx_10.3.2-1_i386.deb libglapi-mesa_10.3.2-1_i386.deb libopenvg1-mesa_10.3.2-1_i386.deb libwayland-egl1-mesa_10.3.2-1_i386.deb libxatracker2_10.3.2-1_i386.deb
    #reboot, error is gone

root@debian:/home/benutzer# apt-get install --reinstall libegl1-mesa libegl1-mesa-drivers libgbm1 libgl1-mesa-dri libgl1-mesa-dri-dbg libgl1-mesa-glx libglapi-mesa libopenvg1-mesa libwayland-egl1-mesa libxatracker2
    #reboot, error is visible again
diff -Nurp mesa-10.3.2.orig/debian/control mesa-10.3.2/debian/control
--- mesa-10.3.2.orig/debian/control	2015-01-20 16:09:09.000000000 +0100
+++ mesa-10.3.2/debian/control	2015-01-20 16:15:14.772000000 +0100
@@ -37,10 +37,10 @@ Build-Depends:
  libudev-dev [linux-any],
  flex,
  bison,
- llvm-3.5-dev (>= 1:3.5-1) [amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf],
+ llvm-3.4-dev [amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf],
  libelf-dev [amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf],
  libwayland-dev (>= 1.2.0) [linux-any],
- libclang-3.5-dev (>= 1:3.5-1) [amd64 i386 armhf],
+ libclang-3.4-dev [amd64 i386 armhf],
  libclc-dev [amd64 i386 armhf],
 Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/mesa
 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/mesa.git
diff -Nurp mesa-10.3.2.orig/debian/rules mesa-10.3.2/debian/rules
--- mesa-10.3.2.orig/debian/rules	2015-01-20 16:09:09.000000000 +0100
+++ mesa-10.3.2/debian/rules	2015-01-20 16:11:47.244000000 +0100
@@ -116,7 +116,7 @@ else
   ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf))
 	GALLIUM_DRIVERS += radeonsi
 	confflags_GALLIUM += --enable-gallium-llvm
-	confflags_GALLIUM += ac_cv_path_LLVM_CONFIG=llvm-config-3.5
+	confflags_GALLIUM += ac_cv_path_LLVM_CONFIG=llvm-config-3.4
   endif
 
 	confflags_DIRECT_RENDERING = --enable-driglx-direct