I have a compile error that's a bit weird. MesaLib 7.8.1 compiled fine against libdrm 2.4.20, but then failed to compile again when I re-built my entire system. When I downgraded libdrm from 2.4.20 to 2.4.19, I was again able to build MesaLib 7.8.1 Here is the last line from the compile error: gcc -c -I. -I../../../../../src/mesa/drivers/dri/common -Iserver -I../../../../../include -I../../../../../src/mesa -I../../../../../src/egl/main -I../../../../../src/egl/drivers/dri -I/usr/include/drm -I/usr/include/libdrm -Wall -Wmissing-prototypes -std=c99 -ffast-math -O3 -march=core2 -O2 -pipe -fno-strict-aliasing -fPIC -m32 -mmmx -msse -msse2 -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -fno-strict-aliasing -I../intel -I../intel/server -DI915 -DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP intel_buffer_objects.c -o intel_buffer_objects.o intel_buffer_objects.c: In function 'intel_buffer_purgeable': intel_buffer_objects.c:600: error: 'I915_MADV_DONTNEED' undeclared (first use in this function) intel_buffer_objects.c:600: error: (Each undeclared identifier is reported only once intel_buffer_objects.c:600: error: for each function it appears in.) intel_buffer_objects.c: In function 'intel_buffer_unpurgeable': intel_buffer_objects.c:669: error: 'I915_MADV_WILLNEED' undeclared (first use in this function) make[7]: *** [intel_buffer_objects.o] Error 1 make[7]: Leaving directory `/usr/src/sorcery/MesaLib/Mesa-7.8.1/src/mesa/drivers/dri/i915' make[6]: *** [lib] Error 2 make[6]: Leaving directory `/usr/src/sorcery/MesaLib/Mesa-7.8.1/src/mesa/drivers/dri/i915' make[5]: *** [subdirs] Error 1 make[5]: Leaving directory `/usr/src/sorcery/MesaLib/Mesa-7.8.1/src/mesa/drivers/dri' make[4]: *** [default] Error 1 make[4]: Leaving directory `/usr/src/sorcery/MesaLib/Mesa-7.8.1/src/mesa/drivers' make[3]: *** [driver_subdirs] Error 2 make[3]: Leaving directory `/usr/src/sorcery/MesaLib/Mesa-7.8.1/src/mesa' make[2]: *** [subdirs] Error 1 make[2]: Leaving directory `/usr/src/sorcery/MesaLib/Mesa-7.8.1/src' make[1]: *** [default] Error 1 make[1]: Leaving directory `/usr/src/sorcery/MesaLib/Mesa-7.8.1' make: *** [linux-dri-x86] Error 2 ! Problem Detected !
The build is probably picking up /usr/include/drm/i915_drm.h over /usr/include/libdrm/i915_drm.h, and /usr/include/drm/i915_drm.h doesn't have I915_MADV_DONTNEED. This is likely fixed by drm commit 245d6957794648d7fd83279c680fed6e4c262147, which isn't part of a released libdrm yet. Patching your pkgconfig/libdrm.pc with the equivalent fix may solve your build issue. commit 894c86e8400f13f1ee0dfe23ca4b5f98c32d9223 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Fri Apr 9 16:33:38 2010 -0400 Revert "Fix pkgconfig includes for /usr/include/drm" This reverts commit 245d6957794648d7fd83279c680fed6e4c262147. libdrm now install headers in ${includedir}/libdrm and /usr/include/drm is reserved for the kernel headers. We should only ever add one of these to the CFLAGS. diff --git a/libdrm.pc.in b/libdrm.pc.in index b218d12..b46e2a6 100644 --- a/libdrm.pc.in +++ b/libdrm.pc.in @@ -7,4 +7,4 @@ Name: libdrm Description: Userspace interface to kernel DRM services Version: @PACKAGE_VERSION@ Libs: -L${libdir} -ldrm -Cflags: -I${includedir} -I${includedir}/drm -I${includedir}/libdrm +Cflags: -I${includedir} -I${includedir}/libdrm
Neither of these versions are supported anymore.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.