LibGL compile errors
Before you compile KDE, make sure you have your OpenGL environment set to Xfree and not the Nvidia OpenGL libraries. You will get an error and be unable to compile it.
Usually there is a script to run. For Suse it is switch2nvida, Gentoo is 'opengl-update xfree'.
Sorry, I don't use other distros, so I do not know what theirs is. But I hit upon the same issue with KDE when recompiling the KDEGraphics package.
Also follow the other gents suggestion to force a reinstall of KDE using the --force --nodeps options.