Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 2553  / 2 Years ago, sun, september 11, 2022, 5:49:48

After installing todays updates in my Ubuntu 22.04 machines compiling with Clang fails. Standard header files are not found anymore. E.g.
evaluate.cpp:19:10: fatal error: 'algorithm' file not found
Tested with two different applications that support Clang compilation (e.g.https://github.com/official-stockfish/Stockfish ) and two different machines.


Edit: Will look at the update history later (no time now) but while updating I saw a package "cpp-12" being installed/updated. This is probably gcc-12 and maybe it mixes some header files that are also used by Clang. Just a guess...


Edit2: Meanwhile I removed cpp-12 (which also removed nvidia-dkms packages) but no luck. Clang still doesn't find standard headers.


Edit3: Installing g++-12 did it. Clang compilations works again.


More From » compiling

 Answers
5

Installing g++-12, which in turn installs libstdc++-12-dev appears to fix the issue.


clang-14 depends on libgcc-11-dev and libstdc++-11-dev though so not sure why this worked.


[#141] Monday, September 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
imberst

Total Points: 370
Total Questions: 107
Total Answers: 123

Location: French Polynesia
Member since Tue, Jul 7, 2020
4 Years ago
imberst questions
;