Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having some build issues with glslc on Arch #237

Closed
holycleugh opened this issue Jun 19, 2020 · 2 comments
Closed

Having some build issues with glslc on Arch #237

holycleugh opened this issue Jun 19, 2020 · 2 comments

Comments

@holycleugh
Copy link
Contributor

Hi,
As always thank you for your work and effort into this game!

Recently I've had some build issues - I've tried both the taisei-git package from the AUR as well as compiling it from source. When I run ninja, I get

~/code/taisei/build (master) ninja
[35/317] Generating SPIRV_resources_00_taisei_pkgdir_shader_extra_tower_apply_mask_frag_glsl with a custom command
FAILED: resources/00-taisei.pkgdir/shader/extra_tower_apply_mask.frag.spv
/usr/bin/glslc --target-env=opengl -DSPIRV -Werror -MD -MF resources/00-taisei.pkgdir/shader/resources_00_taisei_pkgdir_shader_extra_tower_apply_mask_frag_glsl.d -fshader-stage=frag -DFRAG_STAGE ../resources/00-taisei.pkgdir/shader/extra_tower_apply_mask.frag.glsl -o resources/00-taisei.pkgdir/shader/extra_tower_apply_mask.frag.spv
../resources/00-taisei.pkgdir/shader/extra_tower_apply_mask.frag.glsl:47: error: 'smoothstep' : ambiguous function signature match: multiple signatures match under implicit type conversion
../resources/00-taisei.pkgdir/shader/extra_tower_apply_mask.frag.glsl:47: error: 'assign' :  cannot convert from ' global double' to ' temp float'
../resources/00-taisei.pkgdir/shader/extra_tower_apply_mask.frag.glsl:49: error: 'mix' : ambiguous function signature match: multiple signatures match under implicit type conversion
../resources/00-taisei.pkgdir/shader/extra_tower_apply_mask.frag.glsl:49: error: 'assign' :  cannot convert from ' global double' to ' temp float'
../resources/00-taisei.pkgdir/shader/extra_tower_apply_mask.frag.glsl:50: error: 'mix' : ambiguous function signature match: multiple signatures match under implicit type conversion
../resources/00-taisei.pkgdir/shader/extra_tower_apply_mask.frag.glsl:50: error: 'assign' :  cannot convert from ' global double' to ' temp float'
../resources/00-taisei.pkgdir/shader/extra_tower_apply_mask.frag.glsl:54: error: 'mix' : ambiguous function signature match: multiple signatures match under implicit type conversion
../resources/00-taisei.pkgdir/shader/extra_tower_apply_mask.frag.glsl:54: error: 'assign' :  cannot convert from ' global double' to ' temp float'
8 errors generated.
[48/317] Compiling C object 'subprojects/glad/587b900@@glad@sta/src_gl.c.o'
ninja: build stopped: subcommand failed.

I'm not sure if this is relevant, but my shaderc version is 2020.0-1.

This output from meson might be relevant as well. I ran git submodule init/update.

|Executing subproject glad method meson
|
|Project name: glad
|Project version: undefined
|C compiler for the host machine: cc (gcc 10.1.0 "cc (GCC) 10.1.0")
|C linker for the host machine: cc ld.bfd 2.34.0
|Program glad found: NO
|Build targets in project: 3
|Subproject glad finished.

Any pointers appreciated. Are one of my dependencies the wrong version, maybe?
Let me know if any more information would be helpful. Thank you!

@Akaricchi
Copy link
Member

This is a known glslang regression. I have already reported it and it was fixed upstream, but the fix didn't make it into a new release yet. See KhronosGroup/glslang#2206

Some workarounds you can employ meanwhile:

  • Disable build-time shader validation with meson configure -Dvalidate_glsl=false.
  • Force building known-good vendored versions of the relevant shader tools with meson configure -Dforce_vendored_shader_tools=true.
  • Downgrade glslang to version 8.13.3559 systemwide. This is needed if you're using -Dshader_transpiler=true (for GLES backends and legacy OpenGL versions below 3.3). I would recommend distributions not to ship 8.13.3743 as the regression is quite serious and potentially affects every project that needs glslang to consume "legacy" GLSL versions.

The glad subproject output is not relevant. glad is an OpenGL function loader generator. The subproject contains pre-generated code. The glad tool is not needed at build time, it's only there for the developers' convenience.

@holycleugh
Copy link
Contributor Author

Great, I tried the second option and the build worked for me. Thank you for the quick reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants