Bug 59364

Summary: [bisected] Mesa build fails: clientattrib.c:33:22: fatal error: indirect.h: No such file or directory
Product: Mesa Reporter: Tom Stellard <tstellar>
Component: OtherAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: mattst88
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Tom Stellard 2013-01-14 15:25:33 UTC
With the configure flags:
 ./configure --prefix=/usr --enable-gallium-g3dvl --enable-debug --disable-glu --disable-egl --disable-opengl --with-dri-drivers= --with-gallium-drivers=r600

The Mesa build fails with this error:

Mesa build fails: clientattrib.c:33:22: fatal error: indirect.h: No such file or directory

indirect.h is a generated file and it is not being generated with these configure options.

I think the fix is to either generate this file with these configure options or disable building of src/mesa/glx with these configure options.  I am not sure which one is best.
Comment 1 Tom Stellard 2013-01-16 19:15:01 UTC
Note that in order to reproduce this, you will have to run make clean or even make distclean, because the indirect.h file might be left over from a previous build.
Comment 2 Andreas Boll 2013-01-18 15:15:20 UTC
This is not a regression caused by the automake merge.
I can reproduce this with 4e42e569dd5643ff948ab4ee31dd16b1683f21fa.
(one commit before the automake merge)
Comment 3 Andreas Boll 2013-01-18 15:52:49 UTC
32e8ce6d24d43b03edb1be0156813a8ec2657732 is the first bad commit
commit 32e8ce6d24d43b03edb1be0156813a8ec2657732
Author: Matt Turner <mattst88@gmail.com>
Date:   Fri Aug 17 14:05:56 2012 -0700

    build: Set sensible DRI/X11/OSMesa defaults
    
    Tested-by: Brian Paul <brianp@vmware.com>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Comment 4 Matt Turner 2013-01-18 17:45:42 UTC
This is because

        DRI drivers:     no
        DRI driver dir:  ${libdir}/dri
        GLX:             DRI-based

i.e., trying not to build OpenGL, which turns off DRI drivers, but GLX is still implicitly enabled.

We need a check in configure.ac that turns off GLX if OpenGL is disabled. (There's no use in glx otherwise, is there?)

To work-around, add --disable-glx to configure.
Comment 5 Michel Dänzer 2013-02-01 11:09:37 UTC
commit 3b888f534cd42065b01ede8b9c646a2be0015509
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jan 31 11:47:55 2013 +0100

    configure.ac: GLX cannot work without OpenGL
    
    GLX uses mapi/glapi/libglapi.la, which is only built for OpenGL.
    
    If the user specified --enable-xlib-glx --disable-opengl, error out, as these
    cannot be both observed at the same time. If the user just specified
    --disable-opengl but not --disable-glx, print a warning and disable GLX as
    well.

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.