shaderc
shaderc copied to clipboard
Build problem for cross-compiling Linux -> Windows.
I'm trying to build "rend3", a user of shaderc, on Linux with target Windows:
cargo build --target x86_64-pc-windows-gnu
This is a supported target for shaderc, per https://github.com/google/shaderc section 4c
It almost works. Several layers of builds down, the build of shaderrc fails:
The following warnings were emitted during compilation:
warning: System installed library not found. Falling back to build from source
error: failed to run custom build command for `shaderc-sys v0.6.3`
(The full listing from the build is attached). gslang-build-fail.txt
The actual failure is in a build of Kronos' glslang. That fails because they try to use <mutex< with build options for min-gw that don't support threading. So I reported that to the gslang developers:
https://github.com/KhronosGroup/glslang/issues/2572
They say it's not their problem. It's really a compile option problem. Their build needs to be invoked with the correct options. See:
https://stackoverflow.com/questions/14191566/c-mutex-in-namespace-std-does-not-name-a-type
for how to fix this class of problem. There are three suggested approaches, all minor changes to compile options.
So, somewhere the compile options for building glslang for this target need to be changed. I'm reluctant to muck up someone else's build process, considering the comments on bug #1162 regarding modifying the build files.
I suspect this is an easy one-line change somewhere, but I'm not sure where. Advice? Fix?