Skip to content

#include <glslang/SPIRV/SpvTools.h> fails finding ../glslang/MachineIndependent/localintermediate.h #2007

Closed
@haasn

Description

In version 7.13, you moved the header files from SPIRV/SpvTools.h to glslang/SPIRV/SpvTools.h, which broke several downstream projects. In commit 199d115, you then fixed this again by installing the files to both directories, with a deprecation notice in the README.

However, even on current master, trying to actually include SpvTools.h from the new path results in this error:

In file included from /usr/include/glslang/SPIRV/GlslangToSpv.h:42,
                 from ../src/glsl/glslang.cc:30:
/usr/include/glslang/SPIRV/SpvTools.h:49:10: fatal error: ../glslang/MachineIndependent/localintermediate.h: No such file or directory
   49 | #include "../glslang/MachineIndependent/localintermediate.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This relative include only makes sense when including from SPIRV/SpvTools.h, not from glslang/SPIRV/SpvTools.h.

In other words, as of right now, it's actually impossible to include this header successfully in version 7.13 - the only way to build projects against glslang currently is to either downgrade to 7.12 or upgrade to git master and use the old include path.

I highly recommend you make sure the new include path actually works before deprecating/removing the old one.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions