Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build with libc++ and clang 18.x #912

Open
kraj opened this issue Feb 14, 2024 · 0 comments
Open

Fails to build with libc++ and clang 18.x #912

kraj opened this issue Feb 14, 2024 · 0 comments
Labels
bug Something isn't working build This is relevant to the build system

Comments

@kraj
Copy link
Contributor

kraj commented Feb 14, 2024

When building with clang and using llvm c++ runtime ( libc++ ), the builds fail with

| In file included from /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/vulkan-samples/git/git/framework/platform/platform.cpp:18:
| In file included from /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/vulkan-samples/git/git/framework/platform/platform.h:21:
| In file included from /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/vulkan-samples/git/recipe-sysroot/usr/include/c++/v1/string:62
5:
| In file included from /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/vulkan-samples/git/recipe-sysroot/usr/include/c++/v1/string_vi
ew:213:
| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/vulkan-samples/git/recipe-sysroot/usr/include/c++/v1/__fwd/string_view.h:22:41: erro
r: 'char_traits<fmt::detail::char8_type>' is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t i
s non-standard and is provided for a temporary period. It will be removed in LLVM 19, so please migrate off of it. [-Werror,-Wdeprecated-
declarations]
|    22 | template <class _CharT, class _Traits = char_traits<_CharT> >
|       |                                         ^
| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/vulkan-samples/git/git/third_party/fmt/include/fmt/core.h:357:26: note: in instantia
tion of default argument for 'basic_string_view<fmt::detail::char8_type>' required here
|   357 | template <typename Char> using std_string_view = std::basic_string_view<Char>;
|       |                          ^~~~~
| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/vulkan-samples/git/git/third_party/fmt/include/fmt/core.h:448:50: note: in instantia
tion of template type alias 'std_string_view' requested here
|   448 |                                       S, detail::std_string_view<Char>>::value)>
|       |                                                  ^
| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/vulkan-samples/git/git/third_party/fmt/include/fmt/format.h:781:57: note: in instant
iation of template class 'fmt::basic_string_view<fmt::detail::char8_type>' requested here
|   781 | inline auto compute_width(basic_string_view<char8_type> s) -> size_t {
|       |                                                         ^
| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/vulkan-samples/git/recipe-sysroot/usr/include/c++/v1/__string/char_traits.h:81:8: no
te: 'char_traits<fmt::detail::char8_type>' has been explicitly marked deprecated here
|    81 | struct _LIBCPP_DEPRECATED_(
|       |        ^
| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/vulkan-samples/git/recipe-sysroot/usr/include/c++/v1/__config:975:53: note: expanded
 from macro '_LIBCPP_DEPRECATED_'
|   975 | #      define _LIBCPP_DEPRECATED_(m) __attribute__((__deprecated__(m)))
|       |                                                     ^
| 1 error generated.

For now the workaround is to use -Wno-error=deprecated-declarations in cppflags but it will be a hard error starting llvm-19 so this needs to be fixed to not use char_traits

@SaschaWillems SaschaWillems added bug Something isn't working build This is relevant to the build system labels Feb 15, 2024
@SaschaWillems SaschaWillems changed the title Fails to bild with libc++ and clang 18.x Fails to build with libc++ and clang 18.x Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build This is relevant to the build system
Projects
None yet
Development

No branches or pull requests

2 participants