FAILED: src/SFML/System/CMakeFiles/sfml-system.dir/String.cpp.o /usr/lib/llvm/19/bin/clang++ -DSFML_SYSTEM_EXPORTS -I/var/tmp/portage/media-libs/libsfml-2.6.2/work/SFML-2.6.2/include -I/var/tmp/portage/media-libs/libsfml-2.6.2/work/SFML-2.6.2/src -O2 -pipe -fPIC -fvisibility=hidden -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wcast-align -Wunused -Woverloaded-virtual -Wconversion -Wsign-conversion -Wdouble-promotion -Wformat=2 -Wnull-dereference -Wold-style-cast -Wpedantic -Wno-unknown-warning-option -MD -MT src/SFML/System/CMakeFiles/sfml-system.dir/String.cpp.o -MF src/SFML/System/CMakeFiles/sfml-system.dir/String.cpp.o.d -o src/SFML/System/CMakeFiles/sfml-system.dir/String.cpp.o -c /var/tmp/portage/media-libs/libsfml-2.6.2/work/SFML-2.6.2/src/SFML/System/String.cpp In file included from /var/tmp/portage/media-libs/libsfml-2.6.2/work/SFML-2.6.2/src/SFML/System/String.cpp:28: In file included from /var/tmp/portage/media-libs/libsfml-2.6.2/work/SFML-2.6.2/include/SFML/System/String.hpp:32: In file included from /var/tmp/portage/media-libs/libsfml-2.6.2/work/SFML-2.6.2/include/SFML/System/Utf.hpp:33: In file included from /usr/include/c++/v1/locale:205: In file included from /usr/include/c++/v1/__locale:24: /usr/include/c++/v1/string:820:42: error: implicit instantiation of undefined template 'std::char_traits<unsigned int>' 820 | static_assert(is_same<_CharT, typename traits_type::char_type>::value, | ^ /var/tmp/portage/media-libs/libsfml-2.6.2/work/SFML-2.6.2/include/SFML/System/String.hpp:52:18: note: in instantiation of template class 'std::basic_string<unsigned int>' requested here 52 | typedef std::basic_string<Uint32>::iterator Iterator; //!< Iterator type | ^ /usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared here 23 | struct _LIBCPP_TEMPLATE_VIS char_traits; | ^ In file included from /var/tmp/portage/media-libs/libsfml-2.6.2/work/SFML-2.6.2/src/SFML/System/String.cpp:28: In file included from /var/tmp/portage/media-libs/libsfml-2.6.2/work/SFML-2.6.2/include/SFML/System/String.hpp:32: In file included from /var/tmp/portage/media-libs/libsfml-2.6.2/work/SFML-2.6.2/include/SFML/System/Utf.hpp:33: Build failed in clang-glibc image Portage 3.0.67 (python 3.12.9-final-0, default/linux/amd64/23.0/llvm, gcc-13, glibc-2.40-r8, 6.13.7-gentoo x86_64) ================================================================= System uname: Linux-6.13.7-gentoo-x86_64-AMD_Ryzen_7_5700U_with_Radeon_Graphics-with-glibc2.40 KiB Mem: 15720652 total, 3333740 free KiB Swap: 33554428 total, 31563388 free sh bash 5.2_p37 ld GNU ld (Gentoo 2.42 p3) 2.42.0 app-misc/pax-utils: 1.3.8::gentoo app-shells/bash: 5.2_p37::gentoo dev-build/autoconf: 2.72-r1::gentoo dev-build/automake: 1.17-r1::gentoo dev-build/cmake: 3.30.6::gentoo dev-build/libtool: 2.5.4::gentoo dev-build/make: 4.4.1-r100::gentoo dev-build/meson: 1.6.1::gentoo dev-lang/perl: 5.40.0-r1::gentoo dev-lang/python: 3.12.9::gentoo, 3.13.0::gentoo dev-lang/rust-bin: 1.83.0::gentoo llvm-core/clang: 19.1.7::gentoo llvm-core/lld: 19.1.7::gentoo llvm-core/llvm: 19.1.7::gentoo sys-apps/baselayout: 2.17::gentoo sys-apps/openrc: 0.56::gentoo sys-apps/sandbox: 2.39::gentoo sys-devel/binutils: 2.42-r1::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/gcc: 13.3.1_p20241025::gentoo sys-devel/gcc-config: 2.11::gentoo sys-kernel/linux-headers: 6.12::gentoo (virtual/os-headers) sys-libs/glibc: 2.40-r8::gentoo Reproducible: Always
Created attachment 920810 [details] Build log
https://github.com/SFML/SFML/issues/2670 May be fixed upstream in 3.0
Relevant upstream patches: https://github.com/SFML/SFML/commit/f371a99b398f8cd2eedb79c6d68ee00ddea0a9cb https://github.com/SFML/SFML/commit/9022d9564de071e944d20f3419bb6203c46b7a2b
And those patches are ABI-breaking, because C++ mangling. So, only solution: Limit current consumers to 2.6.2, and someone needs to port them to 3.0.0 if they want them to work on clang.
What should users like myself do in the event we need this package to build (for at least 2.6.2) but can't? Those Gentoo github pull requests were closed, so I don't see any relevant patches to resolve this in the meantime :/