Print compile/link logs to stderr#4138
Open
emersion wants to merge 1 commit intoKhronosGroup:mainfrom
Open
Conversation
externalmirrors-syncer bot
pushed a commit
to external-mirrors/wlroots
that referenced
this pull request
Jan 5, 2026
Currently, the glslang check is run every time ninja is invoked, even with an up-to-date build directory when GLSL shaders haven't been modified. This is due to glslang not creating any output file: the _check file never exists so ninja keeps trying to generate it by running the command. Unfortunately Meson doesn't support running commands with no outputs [1]. Create an empty output file to fix this by setting `capture: true`. This doesn't work out-of-the-box, because glslang prints messages to stdout, and provides no way to change this [2]. As a result, shader errors are not surfaced back to the user - they end up in the _check file. Workaround this with a thin wrapper which redirects stdout to stderr when invoking glslang. [1]: mesonbuild/meson#11506 [2]: KhronosGroup/glslang#4138
26aaff0 to
df48165
Compare
dnovillo
requested changes
Jan 6, 2026
Collaborator
dnovillo
left a comment
There was a problem hiding this comment.
This may be confusing tests expecting output on stdout, though. They will need to be adapted. I think you may find failures in the testsuite with this.
When glslang is integrated into a build system (like Meson), stdout is stored in an output file and stderr is printed to the user. This hides error messages from the user. See: mesonbuild/meson#11506 stderr is the standard stream errors should get printed to, always use that.
Author
|
Ah, I attempted a fix but it only fixed a few tests. Tried a more general fix in the last push. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When glslang is integrated into a build system (like Meson), stdout is stored in an output file and stderr is printed to the user. This hides error messages from the user. See: mesonbuild/meson#11506
stderr is the standard stream errors should get printed to, always use that.