Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 951353 - media-libs/libsfml-2.6.2: [llvm] error: implicit instantiation of undefined template 'std::char_traits<unsigned int>'
Summary: media-libs/libsfml-2.6.2: [llvm] error: implicit instantiation of undefined t...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2025-03-14 17:56 UTC by NHO
Modified: 2025-04-02 23:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (libsfml-2.6.2.build.log,60.87 KB, text/x-log)
2025-03-14 17:58 UTC, NHO
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NHO 2025-03-14 17:56:32 UTC
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
Comment 1 NHO 2025-03-14 17:58:59 UTC
Created attachment 920810 [details]
Build log
Comment 2 NHO 2025-03-14 18:22:45 UTC
https://github.com/SFML/SFML/issues/2670
May be fixed upstream in 3.0
Comment 4 NHO 2025-03-15 11:53:47 UTC
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.
Comment 5 Neko-san 2025-04-02 23:17:50 UTC
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 :/