google / google/shaderc

Build problem for cross-compiling Linux -> Windows.

Open
#1,176 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.2k
Forks
445
Avg merge
11h 6m
Merged PRs (30d)
6

Description

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](https://github.com/google/shaderc/files/6145737/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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.