Skip to content

Fix Linux GCC 16 build: add missing <mutex> include - #48

Draft
jmossymoss wants to merge 1 commit into
mainfrom
cursor/fix-mutex-include-104c
Draft

Fix Linux GCC 16 build: add missing <mutex> include#48
jmossymoss wants to merge 1 commit into
mainfrom
cursor/fix-mutex-include-104c

Conversation

@jmossymoss

@jmossymoss jmossymoss commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

core/src/meshers.cpp uses std::mutex / std::lock_guard but was missing #include <mutex>. On older toolchains this often compiled via a transitive include; GCC 16 / newer libstdc++ (e.g. Nobara) fails with:

error: ‘mutex’ in namespace ‘std’ does not name a type
note: ‘std::mutex’ is defined in header ‘<mutex>’

Change

Add the direct #include <mutex> next to the other standard headers in meshers.cpp.

Test plan

  • Reproduce failure signature from user build_log.txt (missing <mutex> on main)
  • Minimal repro: #include <thread> alone fails to see std::mutex; adding <mutex> fixes it
  • cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -jweft_core, weft, weft_tests, weft_app all built

Nobara note

./build.sh auto-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.

Open in Web Open in Cursor 

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants