That was your problem … and then apparently you went and removed gcc and kept the AUR gcc-11 ?
Thats very broken.
sudo pacman -Syu gcc gcc-libs
sudo pacman -Rns gcc11 gcc11-libs
Or maybe the other way around if they dont conflict.
( only slightly different than this thread with gcc10 Gcc10-libs conflict with gcc12 during update - #3 by cscs … why is everyone replacing their gcc? … either there is a general psychosis going around … or maybe its pamac at it again
)