[Mesa-dev] Building mesa with libdrm

Tom Stellard tstellar at gmail.com
Sun Feb 19 19:13:07 PST 2012

On Sun, Feb 19, 2012 at 12:25 AM, Satyajit Sarangi
<kernel.saty at gmail.com> wrote:
> I posted this message to mesa-users but didn't get an answer so I am
> posting this to mesa dev.
> The MesaLib 7.5.1 tar.gz files does compile fine however git:master
> doesn't seem to compile. I tried
> older commits yet they still don't compile at all.
> --
> I have been trying to build mesa with drm from git but haven't been
> successful in any of my attempts till now. It might be that I am
> completely missing something so if someone could point me in the right
> direction that would be really great.
> OS: Ubuntu 11.10
> asic: Redwood
> After installing all the dependencies for mesa I first built drm and
> installed it in /usr/local/xorg.
> Essentially I followed this link since none of the other methods
> suggested were getting me anywhere
> http://www.graphics-muse.org/wp/?p=314
> I get 2 different errors with make & scons.
> For make I get an error in
> src/gallium/winsys/radeon/drm/radeon_winsys.h saying it cannot include
> libdrm/radeon_surface.h. My understanding is that this file comes with
> libdrm to when I do PKG_CONFIG_PATH to where libdrm's pkgconfig is installed (by
> me) then it should pick up the include directory from there. However,
> it doesn't seem to in my case.
> gcc -c -I. -I../../../../src/gallium/include
> -I../../../../src/gallium/auxiliary -I../../../../src/gallium/drivers
> -I../../../../include -I../../../../src/mesa -I../../../../src/glsl -g
> -O2 -Wall -std=c99 -Werror=implicit-function-declaration
> -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -g
> -DHAVE_LLVM=0x0208 -fvisibility=hidden -I/usr/lib/llvm-2.8/include
> r300_blit.c -o r300_blit.o
> In file included from r300_screen.h:28:0,
>                 from r300_context.h:36,
>                 from r300_blit.c:23:
> ../../winsys/radeon/drm/radeon_winsys.h:46:35: fatal error:
> libdrm/radeon_surface.h: No such file or directory
> compilation terminated.
> make[4]: *** [r300_blit.o] Error 1
> make[4]: Leaving directory
> `/home/satyajit/dev/graphics/mesa/src/gallium/drivers/r300'
> make[3]: *** [default] Error 1
> make[3]: Leaving directory
> `/home/satyajit/dev/graphics/mesa/src/gallium/drivers'
> make[2]: *** [default] Error 1
> make[2]: Leaving directory `/home/satyajit/dev/graphics/mesa/src/gallium'
> make[1]: *** [subdirs] Error 1
> make[1]: Leaving directory `/home/satyajit/dev/graphics/mesa/src'
> make: *** [default] Error 1

I've committed a fix for this build error, but Redwood uses the r600
driver, so you don't need to build the r300 driver.  To build only the
r600 driver, pass these flags to the configure script:
--with-gallium-drivers=r600 --with-dri-drivers=""


More information about the mesa-dev mailing list