2

This issue came up when trying to assist a user with the questions: What are the required build dependencies of mesa for Debian-based distros? and How do I backport Mesa on Debian Wheezy?.

Mesa on Debian fails to build from source under certain conditions. See the Debian bug report: libdrm-nouveau1a: claims to be 2.4.33, but seems to really be 0.6. I was able to reproduce this building Mesa 9.1.3-1 (from snapshot.debian.org) on Wheezy. I get the following error message:

checking for NOUVEAU... no
configure: error: Package requirements (libdrm_nouveau >= 2.4.33) were not  
met:

Requested 'libdrm_nouveau >= 2.4.33' but version of libdrm_nouveau is 0.6

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables NOUVEAU_CFLAGS
and NOUVEAU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

See the full log at gist.github.com.

I'm not sure what is going on here. There is an "explanation" in the bug report, but I don't understand it. Namely:

It's not a bug in the debian libdrm 2.4.33 package. In libdrm git they bumped the soname to 2 and changed the version exported in libdrm_nouveau.pc from 0.6 to 2.4.33 without releasing a new version. Mesa now requires the newer libdrm that hasn't been released yet. In libdrm 2.4.33 the version in libdrm_nouveau.pc is 0.6

http://cgit.freedesktop.org/mesa/drm/commit/?id=292da616fe1f936ca78a3fa8e1b1b19883e343b6 is the commit this all took place today.

The file /usr/lib/x86_64-linux-gnu/pkgconfig/libdrm_nouveau.pc exists on my system. This is a pkg-config file. It has the following contents.

prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include

Name: libdrm_nouveau
Description: Userspace interface to nouveau kernel DRM services
Version: 0.6
Libs: -L${libdir} -ldrm_nouveau
Cflags: -I${includedir} -I${includedir}/libdrm -I${includedir}/nouveau
Requires.private: libdrm

This is presumably where the configure is getting the information that libdrm_nouveau is 0.6.

However, I'm unclear why the version was set to 0.6 when the actual value is 2.4.40-1~deb7u2 (Debian wheezy default). I'm also unsure of the correct way to fix this in the current context - building Mesa 0.9.3.1 on wheezy.

There are two obvious changes one could make which would (probably) allow Mesa to build.

  1. Change the version number in /usr/lib/x86_64-linux-gnu/pkgconfig/libdrm_nouveau.pc to 2.4.33 or higher
  2. Alter the Mesa configure script to accept libdrm at version 0.6.

I don't much like either of these alternatives. In the former case, I dislike messing with a running system. It is never clear what effects it may have. In the latter case, changing a build system without properly understanding what effect it will have does not seem like a great idea either.

NOTE: If you want to reproduce the error on Wheezy, you can do the following:

  1. go to http://snapshot.debian.org/package/mesa/9.1.3-1/
  2. download the files:

  3. Run

    dpkg-source -x mesa_9.1.3-1.dsc
    
  4. cd into the source directory meda-9.1.3 and run

    debuild -uc -us
    

    and install missing build dependencies.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.