In some cases media-libs/mesa needs rustfmt to build, otherwise it fails. I believe, the troubles started because of VIDEO_CARDS='nouveau', but I may be wrong. In this case Mesa should require dev-lang/rust[rustfmt] or dev-lang/rust-bin[rustfmt]. Observed for media-libs/mesa-24.3.4-r1 and media-libs/mesa-25.0.4, probably affects other versions too. The flags for Mesa, which build fails with dev-lang/rust[-rustfmt], but succeeds with dev-lang/rust[rustfmt] are: USE='X llvm opencl opengl osmesa proprietary-codecs vaapi vdpau vulkan wayland zstd', VIDEO_CARDS='nouveau nvk r600 radeon radeonsi zink'.
A build.log would be helpful. One may well argue that it shouldn't need a linting tool at all and we should instead stop it doing that.
Created attachment 925158 [details] Log of the unsuccessful build Compressed log of the unsuccessful build.
Pretty sure it's nvk that requires rust, not nouveau. https://gitlab.freedesktop.org/mesa/mesa/-/blame/main/src/nouveau/headers/meson.build#L73 https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/meson.build?ref_type=heads#L755qq