You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CMake 3.28 and C++20, error: CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS-NOTFOUND #22305
Ah, I found it via sudo apt-get install clang-tools-17. Does that mean that CMake 3.28 with C++20 depends not just on the clang package but also on the clang-tools package?
Yes, clang-scan-deps is used with C++20 modules.
Actually we got a recent request for this, #21042 and I thought I fixed it. But looking at that change, it maybe that it only affected non-release builds. Let me check on that some more.
I went ahead and did a minimal fix for this in https://chromium-review.googlesource.com/c/emscripten-releases/+/5402952 so the next release should be good. By the way, the non-LTO builds of emscripten-releases should have this binary in them already, so if you wanted to try it out you could use emsdk to install one of them, e.g. emsdk install 3.1.56-asserts
emscripten doesn't really have support for C++20 modules yet. Its something we should probably add tests for, but for now its not something that is easy to do. Just FYI
C:\Users\daego\Desktop\Projects\emsdk (main -> origin)
λ .\emsdk list
The *recommended* precompiled SDK download is 4.0.2 (cc8eba40de8235f9c33d92463018f87b3edaa09e).
To install/activate it use:
latest
This is equivalent to installing/activating:
4.0.2 INSTALLED
All recent (non-legacy) installable versions are:
4.0.2 INSTALLED
Activity
sbc100 commentedon Mar 27, 2024
@dschuff should we start including this? This tool doesn't seem to exist on my debian-based system, is it new?
sbc100 commentedon Mar 27, 2024
Ah, I found it via
sudo apt-get install clang-tools-17. Does that mean that CMake 3.28 with C++20 depends not just on the clang package but also on the clang-tools package?dschuff commentedon Mar 27, 2024
Yes, clang-scan-deps is used with C++20 modules.
Actually we got a recent request for this, #21042 and I thought I fixed it. But looking at that change, it maybe that it only affected non-release builds. Let me check on that some more.
sbc100 commentedon Mar 27, 2024
I think maybe we don't build "clang/tools" at all yet on our builder.
dschuff commentedon Mar 29, 2024
I went ahead and did a minimal fix for this in https://chromium-review.googlesource.com/c/emscripten-releases/+/5402952 so the next release should be good. By the way, the non-LTO builds of emscripten-releases should have this binary in them already, so if you wanted to try it out you could use emsdk to install one of them, e.g.
emsdk install 3.1.56-assertssxstd001 commentedon May 22, 2024
Can you provide a simple example, including CMake configuration? I always encounter errors when compiling modules!
sbc100 commentedon May 22, 2024
emscripten doesn't really have support for C++20 modules yet. Its something we should probably add tests for, but for now its not something that is easy to do. Just FYI
Boris-Rasin commentedon May 22, 2024
Just to note, this problem prevents using CMake 3.28 (or later) with C++20 (or later), even in a project without modules.
sbc100 commentedon May 22, 2024
@Boris-Rasin I'm not seeing any iseeu with simply using C++20. For example, with the above CMakeLists.txt file I can run cmake 3.2.8 just fine:
What problems do you see when you don't use modules?
Boris-Rasin commentedon May 23, 2024
The problem I see is listed in this bug report title: "error: CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS-NOTFOUND".
This happens with provided CMake file and empty "test.cpp" file.
Which means it happens with a project that does not use modules.
The error is during build, not during CMake config.
sbc100 commentedon May 23, 2024
Thanks! I was able to reproduce now. Uploading a fix now.
jpvanoosten commentedon Jul 25, 2024
Is this issue fixed on Windows?
I'm using Emscripten 3.1.64 and using CMake 3.29 and with
I'm still getting the
CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS-NOTFOUNDerror.Is this tool included in the Windows distributions?
Note: I am not using modules, but CMake doesn't seem to care.
sbc100 commentedon Jul 31, 2024
The fix for this has not yet landed.
Reverting to Cmake 3.27 as 3.28 is bugged.
11 remaining items
Add `export CC=...` in LLVM Clang python-bindings tests
Add `export CC=...` in LLVM Clang python-bindings tests
Add `export CC=...` in LLVM Clang python-bindings tests
Add `export CC=...` in LLVM Clang python-bindings tests
Add emscan-deps tool
Add emscan-deps tool
[cmake] Add emscan-deps tool to enable C++20 (#21987)
dschuff commentedon Jan 30, 2025
This should be fixed by #21987
hsdk123 commentedon Jan 30, 2025
@dschuff The issue seems to persist
hsdk123 commentedon Jan 30, 2025
Actually,
When will we 4.0.3 be available?
sbc100 commentedon Jan 30, 2025
Likely in a week or two. However you can try it today using
emsdk install totAdd `export CC=...` in LLVM Clang python-bindings tests
hsdk123 commentedon May 26, 2025
The implemented fix to this issue seems to cause another issue here:
#24410
Add `export CC=...` in LLVM Clang python-bindings tests