From 44a506dbaae174363267aacc43aadef5c463448d Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Tue, 25 Apr 2023 14:37:33 +0000 Subject: [PATCH] Installation: recommend Clang 17 for best libc++ compatibility Clang/libc++ 16 requires CXXFLAGS += -fexperimental-library Clang < 16 fails with libc++ >= 16: In file included from ../src/protocols/GlobalShortcuts.cpp:1: In file included from /wrkdirs/usr/ports/x11-wm/hyprland/work/Hyprland-0.34.0/_build/../src/pch/pch.hpp:1: In file included from ../src/protocols/../Compositor.hpp:3: In file included from /usr/include/c++/v1/memory:898: In file included from /usr/include/c++/v1/__memory/shared_ptr.h:31: /usr/include/c++/v1/__memory/unique_ptr.h:686:30: error: no matching constructor for initialization of 'SShortcutClient' return unique_ptr<_Tp>(new _Tp(_VSTD::forward<_Args>(__args)...)); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/protocols/GlobalShortcuts.cpp:56:34: note: in instantiation of function template specialization 'std::make_unique' requested here m_vClients.emplace_back(std::make_unique(client)); ^ ../src/protocols/GlobalShortcuts.hpp:12:8: note: candidate constructor (the implicit copy constructor) not viable: cannot convert argument of incomplete type 'wl_client *' to 'const SShortcutClient' for 1st argument struct SShortcutClient { ^ ../src/protocols/GlobalShortcuts.hpp:12:8: note: candidate constructor (the implicit move constructor) not viable: cannot convert argument of incomplete type 'wl_client *' to 'SShortcutClient' for 1st argument ../src/protocols/GlobalShortcuts.hpp:12:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided In file included from ../src/protocols/XDGOutput.cpp:1: In file included from /wrkdirs/usr/ports/x11-wm/hyprland/work/Hyprland-0.34.0/_build/../src/pch/pch.hpp:1: In file included from ../src/protocols/../Compositor.hpp:3: In file included from /usr/include/c++/v1/memory:898: In file included from /usr/include/c++/v1/__memory/shared_ptr.h:31: /usr/include/c++/v1/__memory/unique_ptr.h:686:30: error: no matching constructor for initialization of 'SXDGOutput' return unique_ptr<_Tp>(new _Tp(_VSTD::forward<_Args>(__args)...)); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/protocols/XDGOutput.cpp:79:62: note: in instantiation of function template specialization 'std::make_unique' requested here SXDGOutput* pXDGOutput = m_vXDGOutputs.emplace_back(std::make_unique(PMONITOR)).get(); ^ ../src/protocols/XDGOutput.hpp:8:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'CMonitor *const' to 'const SXDGOutput' for 1st argument struct SXDGOutput { ^ ../src/protocols/XDGOutput.hpp:8:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'CMonitor *const' to 'SXDGOutput' for 1st argument ../src/protocols/XDGOutput.hpp:8:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided In file included from ../src/render/decorations/DecorationPositioner.cpp:1: In file included from /wrkdirs/usr/ports/x11-wm/hyprland/work/Hyprland-0.34.0/_build/../src/pch/pch.hpp:1: In file included from ../src/render/decorations/../../Compositor.hpp:3: In file included from /usr/include/c++/v1/memory:898: In file included from /usr/include/c++/v1/__memory/shared_ptr.h:31: /usr/include/c++/v1/__memory/unique_ptr.h:686:30: error: no matching constructor for initialization of 'CDecorationPositioner::SWindowPositioningData' return unique_ptr<_Tp>(new _Tp(_VSTD::forward<_Args>(__args)...)); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/render/decorations/DecorationPositioner.cpp:80:67: note: in instantiation of function template specialization 'std::make_unique' requested here const auto DATA = m_vWindowPositioningDatas.emplace_back(std::make_unique(pWindow, pDecoration)).get(); ^ ../src/render/decorations/DecorationPositioner.hpp:75:12: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided struct SWindowPositioningData { ^ ../src/render/decorations/DecorationPositioner.hpp:75:12: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided ../src/render/decorations/DecorationPositioner.hpp:75:12: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 2 were provided Clang >= 16 fails with libc++ < 16: In file included from ../src/pch/pch.hpp:1: In file included from ../src/Compositor.hpp:7: In file included from ../src/defines.hpp:2: ../src/debug/Log.hpp:60:35: error: call to consteval function 'std::basic_format_string>, std::chrono::duration>, std::chrono::duration>>::basic_format_string' is not a constant expression logMsg += std::format("{:%H}:{:%M}:{:%S}", c.hours(), c.minutes(), c.subseconds()); ^ /usr/include/c++/v1/format:483:46: note: initializer of '__types_' is not a constant expression _Context{__types_.data(), __handles_.data(), sizeof...(_Args)}); ^ ../src/debug/Log.hpp:60:35: note: in call to 'basic_format_string("{:%H}:{:%M}:{:%S}")' logMsg += std::format("{:%H}:{:%M}:{:%S}", c.hours(), c.minutes(), c.subseconds()); ^ /usr/include/c++/v1/format:495:63: note: declared here static constexpr array<__format::__arg_t, sizeof...(_Args)> __types_{ ^ In file included from ../src/pch/pch.hpp:1: In file included from ../src/Compositor.hpp:7: In file included from ../src/defines.hpp:1: In file included from ../src/includes.hpp:149: In file included from ../src/helpers/Vector2D.hpp:4: /usr/include/c++/v1/format:496:7: error: call to deleted function '__determine_arg_t' __format::__determine_arg_t<_Context, remove_cvref_t<_Args>>()...}; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/v1/format:483:37: note: in instantiation of static data member 'std::basic_format_string>, std::chrono::duration>, std::chrono::duration>>::__types_' requested here _Context{__types_.data(), __handles_.data(), sizeof...(_Args)}); ^ ../src/debug/Log.hpp:60:35: note: in instantiation of function template specialization 'std::basic_format_string>, std::chrono::duration>, std::chrono::duration>>::basic_format_string' requested here logMsg += std::format("{:%H}:{:%M}:{:%S}", c.hours(), c.minutes(), c.subseconds()); ^ /usr/include/c++/v1/__format/format_arg_store.h:153:19: note: candidate function [with _Context = std::__format::__compile_time_basic_format_context, _Tp = std::chrono::duration>] has been explicitly deleted consteval __arg_t __determine_arg_t() = delete; ^ /usr/include/c++/v1/__format/format_arg_store.h:147:19: note: candidate function [with _Context = std::__format::__compile_time_basic_format_context, _Tp = std::chrono::duration>] consteval __arg_t __determine_arg_t() { ^ /usr/include/c++/v1/__format/format_arg_store.h:41:19: note: candidate template ignored: constraints not satisfied [with $0 = _Context, _Tp = remove_cvref_t>>] consteval __arg_t __determine_arg_t() { ^ /usr/include/c++/v1/__format/format_arg_store.h:40:18: note: because 'same_as >, _Bool>' evaluated to false template _Tp> ^ /usr/include/c++/v1/__concepts/same_as.h:29:19: note: because '__same_as_impl >, _Bool>' evaluated to false concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>; ^ /usr/include/c++/v1/__concepts/same_as.h:26:26: note: because '_IsSame >, _Bool>::value' evaluated to false concept __same_as_impl = _IsSame<_Tp, _Up>::value; ^ /usr/include/c++/v1/__format/format_arg_store.h:47:19: note: candidate template ignored: constraints not satisfied [with _Context = _Context, _Tp = remove_cvref_t>>] consteval __arg_t __determine_arg_t() { ^ /usr/include/c++/v1/__format/format_arg_store.h:46:27: note: because 'same_as >, typename __compile_time_basic_format_context::char_type>' evaluated to false template _Tp> ^ /usr/include/c++/v1/__concepts/same_as.h:29:19: note: because '__same_as_impl >, char>' evaluated to false concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>; ^ /usr/include/c++/v1/__concepts/same_as.h:26:26: note: because '_IsSame >, char>::value' evaluated to false concept __same_as_impl = _IsSame<_Tp, _Up>::value; ^ /usr/include/c++/v1/__format/format_arg_store.h:53:19: note: candidate template ignored: constraints not satisfied [with _Context = _Context, _CharT = remove_cvref_t>>] consteval __arg_t __determine_arg_t() { ^ /usr/include/c++/v1/__format/format_arg_store.h:52:12: note: because 'same_as::char_type, wchar_t>' evaluated to false requires(same_as && same_as<_CharT, char>) ^ /usr/include/c++/v1/__concepts/same_as.h:29:19: note: because '__same_as_impl' evaluated to false concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>; ^ /usr/include/c++/v1/__concepts/same_as.h:26:26: note: because '_IsSame::value' evaluated to false concept __same_as_impl = _IsSame<_Tp, _Up>::value; ^ /usr/include/c++/v1/__format/format_arg_store.h:60:19: note: candidate template ignored: constraints not satisfied [with $0 = _Context, _Tp = remove_cvref_t>>] consteval __arg_t __determine_arg_t() { ^ /usr/include/c++/v1/__format/format_arg_store.h:59:18: note: because 'std::chrono::duration>' does not satisfy '__libcpp_signed_integer' template ^ /usr/include/c++/v1/__concepts/arithmetic.h:44:35: note: because '__libcpp_is_signed_integer > >::value' evaluated to false concept __libcpp_signed_integer = __libcpp_is_signed_integer<_Tp>::value; ^ /usr/include/c++/v1/__format/format_arg_store.h:75:19: note: candidate template ignored: constraints not satisfied [with $0 = _Context, _Tp = remove_cvref_t>>] consteval __arg_t __determine_arg_t() { ^ /usr/include/c++/v1/__format/format_arg_store.h:74:18: note: because 'std::chrono::duration>' does not satisfy '__libcpp_unsigned_integer' template ^ /usr/include/c++/v1/__concepts/arithmetic.h:42:37: note: because '__libcpp_is_unsigned_integer > >::value' evaluated to false concept __libcpp_unsigned_integer = __libcpp_is_unsigned_integer<_Tp>::value; ^ /usr/include/c++/v1/__format/format_arg_store.h:90:19: note: candidate template ignored: constraints not satisfied [with $0 = _Context, _Tp = remove_cvref_t>>] consteval __arg_t __determine_arg_t() { ^ /usr/include/c++/v1/__format/format_arg_store.h:89:18: note: because 'same_as >, float>' evaluated to false template _Tp> ^ /usr/include/c++/v1/__concepts/same_as.h:29:19: note: because '__same_as_impl >, float>' evaluated to false concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>; ^ /usr/include/c++/v1/__concepts/same_as.h:26:26: note: because '_IsSame >, float>::value' evaluated to false concept __same_as_impl = _IsSame<_Tp, _Up>::value; ^ /usr/include/c++/v1/__format/format_arg_store.h:94:19: note: candidate template ignored: constraints not satisfied [with $0 = _Context, _Tp = remove_cvref_t>>] consteval __arg_t __determine_arg_t() { ^ /usr/include/c++/v1/__format/format_arg_store.h:93:18: note: because 'same_as >, double>' evaluated to false template _Tp> ^ /usr/include/c++/v1/__concepts/same_as.h:29:19: note: because '__same_as_impl >, double>' evaluated to false concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>; ^ /usr/include/c++/v1/__concepts/same_as.h:26:26: note: because '_IsSame >, double>::value' evaluated to false concept __same_as_impl = _IsSame<_Tp, _Up>::value; ^ /usr/include/c++/v1/__format/format_arg_store.h:98:19: note: candidate template ignored: constraints not satisfied [with $0 = _Context, _Tp = remove_cvref_t>>] consteval __arg_t __determine_arg_t() { ^ /usr/include/c++/v1/__format/format_arg_store.h:97:18: note: because 'same_as >, long double>' evaluated to false template _Tp> ^ /usr/include/c++/v1/__concepts/same_as.h:29:19: note: because '__same_as_impl >, long double>' evaluated to false concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>; ^ /usr/include/c++/v1/__concepts/same_as.h:26:26: note: because '_IsSame >, long double>::value' evaluated to false concept __same_as_impl = _IsSame<_Tp, _Up>::value; ^ /usr/include/c++/v1/__format/format_arg_store.h:105:19: note: candidate template ignored: constraints not satisfied [with _Context = _Context, _Tp = remove_cvref_t>>] consteval __arg_t __determine_arg_t() { ^ /usr/include/c++/v1/__format/format_arg_store.h:104:12: note: because 'same_as::char_type *, std::chrono::duration > >' evaluated to false requires(same_as || same_as) ^ /usr/include/c++/v1/__concepts/same_as.h:29:19: note: because '__same_as_impl > >' evaluated to false concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>; ^ /usr/include/c++/v1/__concepts/same_as.h:26:26: note: because '_IsSame > >::value' evaluated to false concept __same_as_impl = _IsSame<_Tp, _Up>::value; ^ /usr/include/c++/v1/__format/format_arg_store.h:104:59: note: and 'same_as::char_type *, std::chrono::duration > >' evaluated to false requires(same_as || same_as) ^ /usr/include/c++/v1/__concepts/same_as.h:29:19: note: because '__same_as_impl > >' evaluated to false concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>; ^ /usr/include/c++/v1/__concepts/same_as.h:26:26: note: because '_IsSame > >::value' evaluated to false concept __same_as_impl = _IsSame<_Tp, _Up>::value; ^ /usr/include/c++/v1/__format/format_arg_store.h:112:19: note: candidate template ignored: constraints not satisfied [with _Context = _Context, _Tp = remove_cvref_t>>] consteval __arg_t __determine_arg_t() { ^ /usr/include/c++/v1/__format/format_arg_store.h:111:12: note: because 'is_array_v > >' evaluated to false requires(is_array_v<_Tp> && same_as<_Tp, typename _Context::char_type[extent_v<_Tp>]>) ^ /usr/include/c++/v1/__format/format_arg_store.h:120:19: note: candidate template ignored: constraints not satisfied [with _Context = _Context, _Tp = remove_cvref_t>>] consteval __arg_t __determine_arg_t() { ^ /usr/include/c++/v1/__format/format_arg_store.h:118:64: note: because substituted constraint expression is ill-formed: no type named 'value_type' in 'std::chrono::duration>' requires(same_as && ^ /usr/include/c++/v1/__format/format_arg_store.h:129:19: note: candidate template ignored: constraints not satisfied [with _Context = _Context, _Tp = remove_cvref_t>>] consteval __arg_t __determine_arg_t() { ^ /usr/include/c++/v1/__format/format_arg_store.h:127:59: note: because substituted constraint expression is ill-formed: no type named 'value_type' in 'std::chrono::duration>' same_as && ^ /usr/include/c++/v1/__format/format_arg_store.h:136:19: note: candidate template ignored: constraints not satisfied [with $0 = _Context, _Ptr = remove_cvref_t>>] consteval __arg_t __determine_arg_t() { ^ /usr/include/c++/v1/__format/format_arg_store.h:135:12: note: because 'same_as >, void *>' evaluated to false requires(same_as<_Ptr, void*> || same_as<_Ptr, const void*> || same_as<_Ptr, nullptr_t>) ^ /usr/include/c++/v1/__concepts/same_as.h:29:19: note: because '__same_as_impl >, void *>' evaluated to false concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>; ^ /usr/include/c++/v1/__concepts/same_as.h:26:26: note: because '_IsSame >, void *>::value' evaluated to false concept __same_as_impl = _IsSame<_Tp, _Up>::value; ^ /usr/include/c++/v1/__format/format_arg_store.h:135:36: note: and 'same_as >, const void *>' evaluated to false requires(same_as<_Ptr, void*> || same_as<_Ptr, const void*> || same_as<_Ptr, nullptr_t>) ^ /usr/include/c++/v1/__concepts/same_as.h:29:19: note: because '__same_as_impl >, const void *>' evaluated to false concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>; ^ /usr/include/c++/v1/__concepts/same_as.h:26:26: note: because '_IsSame >, const void *>::value' evaluated to false concept __same_as_impl = _IsSame<_Tp, _Up>::value; ^ /usr/include/c++/v1/__format/format_arg_store.h:135:66: note: and 'same_as >, nullptr_t>' evaluated to false requires(same_as<_Ptr, void*> || same_as<_Ptr, const void*> || same_as<_Ptr, nullptr_t>) ^ /usr/include/c++/v1/__concepts/same_as.h:29:19: note: because '__same_as_impl >, std::nullptr_t>' evaluated to false concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>; ^ /usr/include/c++/v1/__concepts/same_as.h:26:26: note: because '_IsSame >, std::nullptr_t>::value' evaluated to false concept __same_as_impl = _IsSame<_Tp, _Up>::value; ^ --- pages/Getting Started/Installation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/Getting Started/Installation.md b/pages/Getting Started/Installation.md index 0939d7e..70a119e 100644 --- a/pages/Getting Started/Installation.md +++ b/pages/Getting Started/Installation.md @@ -201,9 +201,9 @@ wlroots installed, you can make sure you have them by installing wlroots separately (Hyprland doesn't mind) Also note that Hyprland uses the C++23 standard, so both your compiler -and your C++ library has to support that (`gcc>=13.0.0` or `clang>=15`). -On Clang-based systems libc++ may be used by default, so until libc++ -supports C++23 you have to pass `-stdlib=libstdc++` or switch to GCC. +and your C++ library has to support that (`gcc>=13.0.0` or `clang>=17`). +On Clang-based systems with old libc++ by default pass `-stdlib=libstdc++` +or switch to GCC. ### CMake (recommended)