Bug 24334

Summary: mesa git fails to build with xf86vidmodeproto 2.3
Product: Mesa Reporter: Aidan Marks <aidan>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: medium CC: ernestoguevara
Version: git   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Aidan Marks 2009-10-05 14:53:53 UTC
mesa git builds fine with xf86vidmodeproto 2.2 however in 2.3 xf86vmode.h was renamed to xf86vm.h.

see: 

http://cgit.freedesktop.org/xorg/proto/xf86vidmodeproto/commit/?id=50fe2de4abe06bcf9e38e7dcd5005538e0ba3ce1

build failure:

[snip]
x86_64-pc-linux-gnu-gcc -c -I. -I../../../include -I../../../include/GL/internal -I../../../src/mesa -I../../../src/mesa/glapi -I/usr/include/drm     -march=native -msse4 -msse4.1 -msse4.2 -mcx16 -msahf -O2 -pipe -ffast-math -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing  -fPIC  -DUSE_X86_64_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DGLX_USE_TLS -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER -DDEFAULT_DRIVER_DIR=\"/usr/lib64/dri\" indirect.c -o indirect.o
glxcmds.c:43:38: error: X11/extensions/xf86vmode.h: No such file or directory
x86_64-pc-linux-gnu-gcc -c -I. -I../../../include -I../../../include/GL/internal -I../../../src/mesa -I../../../src/mesa/glapi -I/usr/include/drm     -march=native -msse4 -msse4.1 -msse4.2 -mcx16 -msahf -O2 -pipe -ffast-math -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing  -fPIC  -DUSE_X86_64_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DGLX_USE_TLS -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER -DDEFAULT_DRIVER_DIR=\"/usr/lib64/dri\" indirect_init.c -o indirect_init.o
glxcmds.c: In function '__driGetMscRateOML':
glxcmds.c:2336: error: 'XF86VidModeModeLine' undeclared (first use in this function)
glxcmds.c:2336: error: (Each undeclared identifier is reported only once
glxcmds.c:2336: error: for each function it appears in.)
glxcmds.c:2336: error: expected ';' before 'mode_line'
glxcmds.c:2342: warning: implicit declaration of function 'XF86VidModeQueryVersion'
glxcmds.c:2343: warning: implicit declaration of function 'XF86VidModeGetModeLine'
glxcmds.c:2343: error: 'mode_line' undeclared (first use in this function)
gmake[2]: *** [glxcmds.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: Leaving directory `/ebuild/tmp/portage/media-libs/mesa-9999/work/Mesa-9999/src/glx/x11'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/ebuild/tmp/portage/media-libs/mesa-9999/work/Mesa-9999/src'
make: *** [default] Error 1
Comment 1 Dan Nicholson 2009-10-08 12:17:28 UTC
I guess there needs to be some magic to either use xf86vidmodeproto < 2.2.99.1 or libXxf86vm >= 1.0.99.1. That should work since the symbols needed are all in xf86vmode.h. Or we could just demand a newer libXxf86vm.
Comment 2 Aidan Marks 2009-10-09 00:55:26 UTC
Perhaps just demand a newer libXxf86vm.  On gentoo I emerged libXxf86vm-1.1.0 and it's all working again.
Comment 3 Marek Olšák 2011-03-01 18:40:49 UTC
Is this still an issue with current Mesa git?
Comment 4 Aidan Marks 2011-03-02 10:37:29 UTC
I'm not seeing the issue anymore because I meet the dependency (libXxf86vm >= 1.0.99.1).  I would guess this issue is still present if you don't meet it.  mesa should probably demand libXxf86vm >= 1.0.99.1 if it doesn't already.

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.