Closed Dooez closed 1 month ago
@ptr1337 maybe you can take a look?
Can reproduce on macOS Sequioa 15.0 as well:
whisperity@mac ~ % /Applications/contour.app/Contents/MacOS/contour
Unhandled error caught. cannot switch from manual to automatic argument indexing
Ok, i can repro it, most likely this is something from fmt lib
fmt broke there api in fmt 11 https://godbolt.org/z/4xfMdoWa7
Created issue on fmt side https://github.com/fmtlib/fmt/issues/4171
This behavior seems to be intended and fmt closed the issue.
From my testing i've found that modifying ConfigDocumentation.h
format strings to include parameter numbers fixes the issue. I am not sure how to test if formatting is performed correctly.
I can make a PR, but it is a pretty small change.
This will be fixed soon
@whisperity I tried to build contour from commit of https://github.com/contour-terminal/contour/commit/62b749bc03d5823d2924bc3bd1a6dd2243b72863 with libunicode of https://github.com/contour-terminal/libunicode/commit/42494f9798148c67662a29de73daaf0273b1b1a3, it built with the following error. see: https://download.copr.fedorainfracloud.org/results/topazus/test/fedora-rawhide-x86_64/08090302-contour-terminal/builder-live.log.gz
[13/124] /usr/bin/g++ -DCONTOUR_STACKTRACE_ADDR2LINE=1 -DHAVE_BACKTRACE -DHAVE_BACKTRACE_SYMBOLS -DHAVE_CXXABI_H -DHAVE_DLADDR -DHAVE_DLFCN_H -DHAVE_DLSYM -DHAVE_EXECINFO_H -DHAVE_SYS_SELECT_H -DHAVE_UNWIND_H -DUTEMPTER=1 -DVTPTY_LIBSSH2 -DVTPTY_LIBSSH2=1 -I/builddir/build/BUILD/contour-terminal-0.5.0.7168-build/contour-62b749bc03d5823d2924bc3bd1a6dd2243b72863/src -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DNDEBUG -std=c++20 -fdiagnostics-color=always -fdiagnostics-color=always -DWITH_GZFILEOP -maes -MD -MT src/vtpty/CMakeFiles/vtpty.dir/SshSession.cpp.o -MF src/vtpty/CMakeFiles/vtpty.dir/SshSession.cpp.o.d -o src/vtpty/CMakeFiles/vtpty.dir/SshSession.cpp.o -c /builddir/build/BUILD/contour-terminal-0.5.0.7168-build/contour-62b749bc03d5823d2924bc3bd1a6dd2243b72863/src/vtpty/SshSession.cpp
FAILED: src/vtpty/CMakeFiles/vtpty.dir/SshSession.cpp.o
/usr/bin/g++ -DCONTOUR_STACKTRACE_ADDR2LINE=1 -DHAVE_BACKTRACE -DHAVE_BACKTRACE_SYMBOLS -DHAVE_CXXABI_H -DHAVE_DLADDR -DHAVE_DLFCN_H -DHAVE_DLSYM -DHAVE_EXECINFO_H -DHAVE_SYS_SELECT_H -DHAVE_UNWIND_H -DUTEMPTER=1 -DVTPTY_LIBSSH2 -DVTPTY_LIBSSH2=1 -I/builddir/build/BUILD/contour-terminal-0.5.0.7168-build/contour-62b749bc03d5823d2924bc3bd1a6dd2243b72863/src -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DNDEBUG -std=c++20 -fdiagnostics-color=always -fdiagnostics-color=always -DWITH_GZFILEOP -maes -MD -MT src/vtpty/CMakeFiles/vtpty.dir/SshSession.cpp.o -MF src/vtpty/CMakeFiles/vtpty.dir/SshSession.cpp.o.d -o src/vtpty/CMakeFiles/vtpty.dir/SshSession.cpp.o -c /builddir/build/BUILD/contour-terminal-0.5.0.7168-build/contour-62b749bc03d5823d2924bc3bd1a6dd2243b72863/src/vtpty/SshSession.cpp
In file included from /builddir/build/BUILD/contour-terminal-0.5.0.7168-build/contour-62b749bc03d5823d2924bc3bd1a6dd2243b72863/src/vtpty/ImageSize.h:5,
from /builddir/build/BUILD/contour-terminal-0.5.0.7168-build/contour-62b749bc03d5823d2924bc3bd1a6dd2243b72863/src/vtpty/Pty.h:4,
from /builddir/build/BUILD/contour-terminal-0.5.0.7168-build/contour-62b749bc03d5823d2924bc3bd1a6dd2243b72863/src/vtpty/Process.h:4,
from /builddir/build/BUILD/contour-terminal-0.5.0.7168-build/contour-62b749bc03d5823d2924bc3bd1a6dd2243b72863/src/vtpty/SshSession.cpp:18:
/usr/include/c++/14/format: In instantiation of ‘static std::__format::_Arg_store<_Context, _Args>::_Element_t std::__format::_Arg_store<_Context, _Args>::_S_make_elt(_Tp&) [with _Tp = const boxed::detail::boxed<int, vtpty::detail::tags::ColumnCount>; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>; _Args = {std::basic_string_view<char, std::char_traits<char> >, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle}; _Element_t = std::__format::_Arg_store<std::basic_format_context<std::__format::_Sink_iter<char>, char>, std::basic_string_view<char, std::char_traits<char> >, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle>::_Element_t]’:
/usr/include/c++/14/format:3752:23: required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, const boxed::detail::boxed<int, vtpty::detail::tags::ColumnCount>, const boxed::detail::boxed<int, vtpty::detail::tags::LineCount>}; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>; _Args = {std::basic_string_view<char, std::char_traits<char> >, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle}]’
3752 | : _M_args{_S_make_elt(__a)...}
| ~~~~~~~~~~~^~~~~
/usr/include/c++/14/format:3802:14: required from ‘auto std::make_format_args(_Args& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {const __cxx11::basic_string<char, char_traits<char>, allocator<char> >, const boxed::detail::boxed<int, vtpty::detail::tags::ColumnCount>, const boxed::detail::boxed<int, vtpty::detail::tags::LineCount>}]’
3802 | return _Store(__fmt_args...);
| ^~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/contour-terminal-0.5.0.7168-build/contour-62b749bc03d5823d2924bc3bd1a6dd2243b72863/src/crispy/logstore.h:111:59: required from ‘logstore::message_builder& logstore::message_builder::operator()(std::string_view, const Ts& ...) [with Ts = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, boxed::detail::boxed<int, vtpty::detail::tags::ColumnCount>, boxed::detail::boxed<int, vtpty::detail::tags::LineCount>}; std::string_view = std::basic_string_view<char>]’
111 | _buffer += std::vformat(fmt, std::make_format_args(args...));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/builddir/build/BUILD/contour-terminal-0.5.0.7168-build/contour-62b749bc03d5823d2924bc3bd1a6dd2243b72863/src/vtpty/SshSession.cpp:851:13: required from here
851 | sshLog()("({}) Resizing PTY to {}x{}.", crispy::threadName(), cells.columns, cells.lines);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/format:3730:25: error: static assertion failed: std::formatter must be specialized for the type of each format arg
3730 | static_assert(is_default_constructible_v<formatter<_Tq, _CharT>>,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/format:3730:25: note: ‘std::is_default_constructible_v<std::formatter<boxed::detail::boxed<int, vtpty::detail::tags::ColumnCount>, char> >’ evaluates to false
/usr/include/c++/14/format:3741:38: error: no matching function for call to ‘std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::basic_format_arg(const boxed::detail::boxed<int, vtpty::detail::tags::ColumnCount>&)’
3741 | basic_format_arg<_Context> __arg(__v);
| ^~~~~
/usr/include/c++/14/format:3477:9: note: candidate: ‘template<class _Tp> requires __formattable_with<_Tp, _Context, typename _Context::formatter_type<typename std::remove_const<_Tp>::type>, std::basic_format_parse_context<typename _Context::char_type> > std::basic_format_arg<_Context>::basic_format_arg(_Tp&) [with _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>]’
3477 | basic_format_arg(_Tp& __v) noexcept
| ^~~~~~~~~~~~~~~~
/usr/include/c++/14/format:3477:9: note: template argument deduction/substitution failed:
/usr/include/c++/14/format:3477:9: note: constraints not satisfied
In file included from /usr/include/c++/14/compare:40,
from /usr/include/c++/14/bits/char_traits.h:56,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/stdexcept:39,
from /usr/include/c++/14/system_error:43,
from /builddir/build/BUILD/contour-terminal-0.5.0.7168-build/contour-62b749bc03d5823d2924bc3bd1a6dd2243b72863/src/vtpty/SshSession.cpp:4:
/usr/include/c++/14/concepts: In substitution of ‘template<class _Tp> requires __formattable_with<_Tp, _Context, typename _Context::formatter_type<typename std::remove_const<_Tp>::type>, std::basic_format_parse_context<typename _Context::char_type> > std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::basic_format_arg(_Tp&) [with _Tp = std::basic_format_context<std::__format::_Sink_iter<char>, char>]’:
/usr/include/c++/14/format:3741:31: required from ‘static std::__format::_Arg_store<_Context, _Args>::_Element_t std::__format::_Arg_store<_Context, _Args>::_S_make_elt(_Tp&) [with _Tp = const boxed::detail::boxed<int, vtpty::detail::tags::ColumnCount>; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>; _Args = {std::basic_string_view<char, std::char_traits<char> >, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle}; _Element_t = std::__format::_Arg_store<std::basic_format_context<std::__format::_Sink_iter<char>, char>, std::basic_string_view<char, std::char_traits<char> >, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle>::_Element_t]’
3741 | basic_format_arg<_Context> __arg(__v);
| ^~~~~
/usr/include/c++/14/format:3752:23: required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, const boxed::detail::boxed<int, vtpty::detail::tags::ColumnCount>, const boxed::detail::boxed<int, vtpty::detail::tags::LineCount>}; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>; _Args = {std::basic_string_view<char, std::char_traits<char> >, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle}]’
3752 | : _M_args{_S_make_elt(__a)...}
| ~~~~~~~~~~~^~~~~
/usr/include/c++/14/format:3802:14: required from ‘auto std::make_format_args(_Args& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {const __cxx11::basic_string<char, char_traits<char>, allocator<char> >, const boxed::detail::boxed<int, vtpty::detail::tags::ColumnCount>, const boxed::detail::boxed<int, vtpty::detail::tags::LineCount>}]’
3802 | return _Store(__fmt_args...);
| ^~~~~~~~~~~~~~~~~~~~~
Contour Terminal version
0.5.0
Installer source
something else (please specify below)
Operating System
Arch Linux
Architecture
x86-64
Other Software
No response
Steps to reproduce
Install from AUR.
Expected Behavior
No response
Actual Behavior
contour does not launch and returns an error:
Unhandled error caught. cannot switch from manual to automatic argument indexing
Additional notes
No response