As noted in the libc++ 19 release notes [1], std::char_traits<> is now only provided for char, char8_t, char16_t, char32_t and wchar_t, and any instantiation for other types will fail. This causes emulators/open-vm-tools to fail to compile with clang 19 and libc++ 19, resulting in errors similar to: /usr/include/c++/v1/string:820:42: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>' 820 | static_assert(is_same<_CharT, typename traits_type::char_type>::value, | ^ ./stringxx/string.hh:270:18: note: in instantiation of template class 'std::basic_string<unsigned short>' requested here 270 | return string(lhs) + rhs; | ^ /usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared here 23 | struct _LIBCPP_TEMPLATE_VIS char_traits; | ^ This can be fixed by using the standard type std::u16string for UTF-16 strings, instead of (effectively) std::basic_string<uint16_t>. [1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals
Created attachment 254854 [details] emulators/open-vm-tools: fix build with libc++ 19
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=e291bf88f70671902bc5d79ac89f74bba0222069 commit e291bf88f70671902bc5d79ac89f74bba0222069 Author: Renato Botelho <garga@FreeBSD.org> AuthorDate: 2024-11-05 17:58:08 +0000 Commit: Renato Botelho <garga@FreeBSD.org> CommitDate: 2024-11-05 18:00:49 +0000 emulators/open-vm-tools: Update to 12.5.0 While here, fix build with llvm 19 [1] PR: 282277, 282476 [1] Submitted by: dim [1] Sponsored by: Rubicon Communications, LLC ("Netgate") emulators/open-vm-tools/Makefile | 2 +- emulators/open-vm-tools/distinfo | 6 +++--- emulators/open-vm-tools/files/patch-lib_guestApp_guestApp.c | 4 ++-- .../open-vm-tools/files/patch-lib_procMgr_procMgrPosix.c | 4 ++-- .../patch-services_plugins_dndcp_stringxx_string.hh (new) | 11 +++++++++++ .../open-vm-tools/files/patch-services_vmtoolsd_Makefile.am | 4 ++-- 6 files changed, 21 insertions(+), 10 deletions(-)
A commit in branch 2024Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=26427e1cd23444656b761691916feffcf3d324e1 commit 26427e1cd23444656b761691916feffcf3d324e1 Author: Renato Botelho <garga@FreeBSD.org> AuthorDate: 2024-11-05 17:58:08 +0000 Commit: Renato Botelho <garga@FreeBSD.org> CommitDate: 2024-11-05 18:03:43 +0000 emulators/open-vm-tools: Update to 12.5.0 While here, fix build with llvm 19 [1] PR: 282277, 282476 [1] Submitted by: dim [1] Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit e291bf88f70671902bc5d79ac89f74bba0222069) emulators/open-vm-tools/Makefile | 2 +- emulators/open-vm-tools/distinfo | 6 +++--- emulators/open-vm-tools/files/patch-lib_guestApp_guestApp.c | 4 ++-- .../open-vm-tools/files/patch-lib_procMgr_procMgrPosix.c | 4 ++-- .../patch-services_plugins_dndcp_stringxx_string.hh (new) | 11 +++++++++++ .../open-vm-tools/files/patch-services_vmtoolsd_Makefile.am | 4 ++-- 6 files changed, 21 insertions(+), 10 deletions(-)