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 · 2 comments · May be fixed by #1228
Open

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

kraj opened this issue Feb 14, 2024 · 2 comments · May be fixed by #1228
Assignees
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
@SaschaWillems
Copy link
Collaborator

SaschaWillems commented Oct 11, 2024

I can reproduce this while trying to update the Android builds tools. We'll look into this.

See #1188

SaschaWillems added a commit to SaschaWillems/Vulkan-Samples that referenced this issue Oct 13, 2024
@SaschaWillems SaschaWillems self-assigned this Nov 16, 2024
@SaschaWillems SaschaWillems linked a pull request Nov 16, 2024 that will close this issue
12 tasks
@SaschaWillems
Copy link
Collaborator

Should be fixed with #1228

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

Successfully merging a pull request may close this issue.

2 participants