Code Monkey home page Code Monkey logo

Comments (11)

sbc100 avatar sbc100 commented on July 17, 2024 2

Thanks! I was able to reproduce now. Uploading a fix now.

from emsdk.

sbc100 avatar sbc100 commented on July 17, 2024

@dschuff should we start including this? This tool doesn't seem to exist on my debian-based system, is it new?

 $ which clang-scan-deps
 $ apt-cache search clang-scan-deps

from emsdk.

sbc100 avatar sbc100 commented on July 17, 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?

from emsdk.

dschuff avatar dschuff commented on July 17, 2024

Yes, clang-scan-deps is used with C++20 modules.
Actually we got a recent request for this, emscripten-core/emscripten#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.

from emsdk.

sbc100 avatar sbc100 commented on July 17, 2024

I think maybe we don't build "clang/tools" at all yet on our builder.

from emsdk.

dschuff avatar dschuff commented on July 17, 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-asserts

from emsdk.

sxstd001 avatar sxstd001 commented on July 17, 2024

Can you provide a simple example, including CMake configuration? I always encounter errors when compiling modules!

from emsdk.

sbc100 avatar sbc100 commented on July 17, 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

from emsdk.

Boris-Rasin avatar Boris-Rasin commented on July 17, 2024

Just to note, this problem prevents using CMake 3.28 (or later) with C++20 (or later), even in a project without modules.

from emsdk.

sbc100 avatar sbc100 commented on July 17, 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:

./emcmake cmake -S . -B out/test/ 
configure: cmake -S . -B out/test/  -DCMAKE_TOOLCHAIN_FILE=/usr/local/google/home/sbc/dev/wasm/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/usr/local/google/home/sbc/dev/wasm/emsdk/node/18.20.3_64bit/bin/node
-- Configuring done (1.5s)
-- Generating done (0.0s)
-- Build files have been written to: /usr/local/google/home/sbc/dev/wasm/emscripten/out/test
$ cmake --version
cmake version 3.28.3

What problems do you see when you don't use modules?

from emsdk.

Boris-Rasin avatar Boris-Rasin commented on July 17, 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.

from emsdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.