[Mesa-dev] Building mesa with libdrm

Satyajit Sarangi kernel.saty at gmail.com
Sat Feb 18 21:25:18 PST 2012


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
-g -O2  -fPIC   -D_GNU_SOURCE -DPTHREADS -DDEBUG -DHAVE_POSIX_MEMALIGN
-DUSE_XCB -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING
-DGLX_USE_TLS -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER
-DHAVE_ALIAS -DHAVE_MINCORE -D__STDC_CONSTANT_MACROS
-DHAVE_LLVM=0x0208 -fvisibility=hidden -I/usr/lib/llvm-2.8/include
-D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
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


Scons: scons partially succeeds in building all the libGL, libGLU etc
libraries but starts failing in glx where it says it cannot link to
-lGL.
Again, since by this time libGL.so has already been created I thought
that it should link to that file but it doesn't. The other missing
library is libglut which doesn't seem to get built with scons. I am
guessing that the stopping of the build from glx was the cause it
never got to build libglut.

Any help on this please ?
Thanks,
Satyajit


More information about the mesa-dev mailing list