Fix Linux GCC 16 build: add missing <mutex> include - #48
Draft
jmossymoss wants to merge 1 commit into
Draft
Conversation
meshers.cpp uses std::mutex and std::lock_guard but relied on a transitive include. Newer libstdc++ (e.g. GCC 16 on Nobara) no longer pulls <mutex> in transitively, so the Linux build fails without the direct include. Co-authored-by: jmossymoss <jmossymoss@users.noreply.github.com>
5 tasks
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.
Summary
core/src/meshers.cppusesstd::mutex/std::lock_guardbut was missing#include <mutex>. On older toolchains this often compiled via a transitive include; GCC 16 / newer libstdc++ (e.g. Nobara) fails with:Change
Add the direct
#include <mutex>next to the other standard headers inmeshers.cpp.Test plan
build_log.txt(missing<mutex>on main)#include <thread>alone fails to seestd::mutex; adding<mutex>fixes itcmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j—weft_core,weft,weft_tests,weft_appall builtNobara note
./build.shauto-installs Debian/Ubuntu package names. On Nobara/Fedora, install OCCT/GLFW/OpenGL deps with dnf (e.g.opencascade-devel,glfw-devel,mesa-libGL-devel) and run./build.sh --no-deps.