<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/122701>122701</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang-17 can't find cassert on Ubuntu 22.04 with libstdc++-11-dev installed
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ggladilov
      </td>
    </tr>
</table>

<pre>
    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?


</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJycVMGS4jYQ_Rpx6YKy5fEYDj4wbDyharM5JJvrlmy17U6E5EgtKP4-JdtMdiapHHICQev1e69fS4VAg0WsRfkiyk8bFXl0vh4GozQZd920Tt_rn38RxRG-ttFyBCl32ZPIjiI7nns4QxvJaLjc4STki5AveQWTd79jx3AjHqEzyg5bJn3f5hUoq8FQG1h3S_k2z7car0A2sDIGNZxhQIbeGeNuZAdA750XxXHpKZ4zkR0fv4GQVadCQM9CVtCTQbAu3Y5Wgyhflu6a1GBdYOq2y83y0xvU8qWnVC-bGLyQDdnORI2w5fuE0MPWqgvCo9FzlhTq2GH4QOsjgJBN61xgIZvOXSbF1JIhvqfzNH3r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