Issue 122701
Summary clang-17 can't find cassert on Ubuntu 22.04 with libstdc++-11-dev installed
Labels new issue
Assignees
Reporter ggladilov
    OS: Ubuntu 22.04

If I build my C++17 project with clang-tidy-17 and libstdc++-11-dev installed I get following error:

`
error: 'cassert' file not found [clang-diagnostic-error]
`

`find /usr/include -type f -name cassert` produces:

`
/usr/include/boost/compatibility/cpp_c_headers/cassert
/usr/include/c++/11/cassert
`

I found similar [GitHub issue](https://github.com/llvm/llvm-project/issues/59738) filed before that describes the same issue using clang directly, so I conclude it's not about clang-tidy, but rather clang.

Note: build works perfectly fine with GCC.

The same solution as in the issue above works for me: installing libstdc++-12-dev. Even though libstdc++ is GNU/GCC project and outside of LLVM control, I don't understand why clang can find a system header file in one version of libstdc++ and can't in another, even though the file is present in both.

Is there a requirement to use specific version(s) of libstdc++ with particular release of clang?


_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to