Score:1

Todays Ubuntu 22.04 updates seem to break Clang compiler

ke flag

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.

user535733 avatar
cn flag
"today's updates" is vague. Review your /var/log/apt/history.log to see *exactly* which packages were upgraded and when. If you are unsure which packages might be responsible for the problem, then [edit your question](https://askubuntu.com/posts/1441844/edit) to include the list of packages.
Dan avatar
sc flag
Dan
Also seeing this issue with clang after the update "gcc-12:amd64 12.1.0-2ubuntu1~22.04". Removing gcc-12 as suggested below is not possible because dkms depends on it. Currently stuck unable to build any of our software.
Score:4
sc flag
Dan

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.

Andreas Matthies avatar
ke flag
That helped. Thanks.
Score:1
cn flag

I did not find Stack Exchange's policy on cross-posting answers (there is a little something here), but I wrote this answer here that is actually a direct answer to the question. I won't copy paste it since I might edit it, and I don't want to edit in two different places.

Score:0
am flag

Removing gcc-12 and cpp-12 followed by autoremove helped. It's not exactly a solution, though.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.