Bug 92506 - [regression, bisected] mesa glsl fails to compile
Summary: [regression, bisected] mesa glsl fails to compile
Status: CLOSED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: highest blocker
Assignee: Rob Clark
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-17 03:18 UTC by Mark Janes
Modified: 2015-10-18 19:18 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Mark Janes 2015-10-17 03:18:17 UTC
The following commit broke mesa compilation for the Intel CI:

Author:     Rob Clark <robclark@freedesktop.org>
AuthorDate: Sat Oct 10 13:55:07 2015 -0400
Commit:     Rob Clark <robclark@freedesktop.org>
CommitDate: Fri Oct 16 19:33:38 2015 -0400

    nir: remove dependency on glsl
    
    Move glsl_types into NIR, now that the dependency on glsl_symbol_table
    has been split out.
    
    Possibly makes sense to rename things at this point, but if we do that
    I'd like to keep it split out into a separate patch to make git history
    easier to follow (IMHO).
    
    v2: fix android build
    v3: I f***ing hate scons.. but at least it builds
    
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
    Signed-off-by: Rob Clark <robclark@freedesktop.org>


   /home/majanes/src/mesa_jenkins/repos/mesa/src/glsl/ir.h:33:24: fatal error:  glsl_types.h: No such file or directory
compilation terminated.

glsl_types.h is gone, but the build still needs types that were declared in that file.  Removing the #include gives:

/home/majanes/src/mesa_jenkins/repos/mesa/src/glsl/ir.h: In member function 'bool ir_variable::is_interface_instance() const':
/home/majanes/src/mesa_jenkins/repos/mesa/src/glsl/ir.h:484:24: error: invalid use of incomplete type 'const struct glsl_type'
       return this->type->without_array() == this->interface_type;

FWIW, here is my configure parameters, on Debian testing:
> mesa/configure PKG_CONFIG_PATH=/tmp/build_root/m64/lib/x86_64-linux-gnu/pkgconfig:/tmp/build_root/m64/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig -m64 --prefix=/tmp/build_root/m64 CFLAGS=-m64 -O2 -DNDEBUG CXXFLAGS=-m64 -O2 -DNDEBUG --enable-gbm --with-egl-platforms=x11,drm,surfaceless --enable-glx-tls --enable-gles1 --enable-gles2 --with-dri-drivers=i965,swrast,i915 --disable-xvmc --disable-vdpau --without-gallium-drivers
Comment 1 Mark Janes 2015-10-17 04:22:09 UTC
Changing src/glsl/ir.h:33 to 
#include "nir/glsl_types.h"

fixes compilation for most of mesa. 

`make check` still fails with link errors:
<janesma> jekstrand: make check fails also: glcpp-parse.c:(.text+0x3d4):
          undefined reference to `hash_table_find'  [20:56]
Comment 2 Rob Clark 2015-10-17 13:55:28 UTC
Ok, the following two commits should fix things for make-check and out of tree builds respectively.  Please let me know what configure args you use if you still see issues, but I *think* that should catch everything.

commit 7e6aafd6ab89ad8bc113f67eb666a90b979cdb8e
Author:     Rob Clark <robclark@freedesktop.org>
AuthorDate: Sat Oct 17 09:49:19 2015 -0400

    build: fix make-check after a6a6a71

commit b7963b6926c06666b24453344c47f12e369e8fd1
Author:     Rob Clark <robclark@freedesktop.org>
AuthorDate: Sat Oct 17 09:28:23 2015 -0400

    build: fix out-of-tree build after b9b40ef


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.