[MacPorts] #71090: kicad @7.0.11: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>' (was: Kicad @7.0.11: fails to build with clang-19 and libc++ 19, after upgrade to macos 15)
MacPorts
noreply at macports.org
Sun Oct 13 08:01:00 UTC 2024
#71090: kicad @7.0.11: error: implicit instantiation of undefined template
'std::char_traits<unsigned short>'
---------------------+------------------------------
Reporter: mpbb77 | Owner: ra1nb0w
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.10.2
Resolution: | Keywords: sequoia haspatch
Port: kicad |
---------------------+------------------------------
Changes (by ryandesign):
* status: new => assigned
* owner: (none) => ra1nb0w
* keywords: kicad clang-19 libc++ 19 => sequoia haspatch
Old description:
> Building Kicad will fail while building thirdparty/nanodbc due to
> deprecation of std::char_traits<> for types other than char, char8_t,
> char16_t, char32_t and wchar_t, with errors like:
> .../thirdparty/nanodbc/nanodbc/nanodbc.cpp:261:25: error: implicit
> instantiation of undefined template 'std::char_traits<unsigned short>'
> 261 | auto const n =
> std::char_traits<NANODBC_SQLCHAR>::length(array);
> | ^
> /usr/include/c++/v1/__string/char_traits.h:45:8: note: template is
> declared here
> 45 | struct char_traits;
> | ^
> .../thirdparty/nanodbc/nanodbc/nanodbc.cpp:3576:52: error: implicit
> instantiation of undefined template 'std::char_traits<unsigned short>'
> 3576 | dsn.name = string(&name[0],
> &name[std::char_traits<NANODBC_SQLCHAR>::length(name)]);
> | ^
> /usr/include/c++/v1/__string/char_traits.h:45:8: note: template is
> declared here
> 45 | struct char_traits;
> | ^
> .../thirdparty/nanodbc/nanodbc/nanodbc.cpp:3578:49: error: implicit
> instantiation of undefined template 'std::char_traits<unsigned short>'
> 3578 | string(&driver[0],
> &driver[std::char_traits<NANODBC_SQLCHAR>::length(driver)]);
> | ^
> /usr/include/c++/v1/__string/char_traits.h:45:8: note: template is
> declared here
> 45 | struct char_traits;
> | ^
> .../thirdparty/nanodbc/nanodbc/nanodbc.cpp:3629:54: error: implicit
> instantiation of undefined template 'std::char_traits<unsigned short>'
> 3629 | drv.name = string(&descr[0],
> &descr[std::char_traits<NANODBC_SQLCHAR>::length(descr)]);
> | ^
> /usr/include/c++/v1/__string/char_traits.h:45:8: note: template is
> declared here
> 45 | struct char_traits;
> | ^
>
> and
>
> /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,
> | ^
> .../thirdparty/compoundfilereader/compoundfilereader.h:226:21: note: in
> instantiation of template class 'std::basic_string<unsigned short>'
> requested here
> 226 | utf16string dir;
> | ^
> /usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared
> here
> 23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
> |
>
> The same failure can be found on the freebsd bugzilla @
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281886 and
> their fix also applies to Macports, as I've applied their patches and the
> build resumed with no further issues.
New description:
Building Kicad will fail while building thirdparty/nanodbc due to
deprecation of `std::char_traits<>` for types other than `char`,
`char8_t`, `char16_t`, `char32_t` and `wchar_t`, with errors like:
{{{
.../thirdparty/nanodbc/nanodbc/nanodbc.cpp:261:25: error: implicit
instantiation of undefined template 'std::char_traits<unsigned short>'
261 | auto const n =
std::char_traits<NANODBC_SQLCHAR>::length(array);
| ^
/usr/include/c++/v1/__string/char_traits.h:45:8: note: template is
declared here
45 | struct char_traits;
| ^
.../thirdparty/nanodbc/nanodbc/nanodbc.cpp:3576:52: error: implicit
instantiation of undefined template 'std::char_traits<unsigned short>'
3576 | dsn.name = string(&name[0],
&name[std::char_traits<NANODBC_SQLCHAR>::length(name)]);
| ^
/usr/include/c++/v1/__string/char_traits.h:45:8: note: template is
declared here
45 | struct char_traits;
| ^
.../thirdparty/nanodbc/nanodbc/nanodbc.cpp:3578:49: error: implicit
instantiation of undefined template 'std::char_traits<unsigned short>'
3578 | string(&driver[0],
&driver[std::char_traits<NANODBC_SQLCHAR>::length(driver)]);
| ^
/usr/include/c++/v1/__string/char_traits.h:45:8: note: template is
declared here
45 | struct char_traits;
| ^
.../thirdparty/nanodbc/nanodbc/nanodbc.cpp:3629:54: error: implicit
instantiation of undefined template 'std::char_traits<unsigned short>'
3629 | drv.name = string(&descr[0],
&descr[std::char_traits<NANODBC_SQLCHAR>::length(descr)]);
| ^
/usr/include/c++/v1/__string/char_traits.h:45:8: note: template is
declared here
45 | struct char_traits;
| ^
}}}
and
{{{
/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,
| ^
.../thirdparty/compoundfilereader/compoundfilereader.h:226:21: note: in
instantiation of template class 'std::basic_string<unsigned short>'
requested here
226 | utf16string dir;
| ^
/usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared
here
23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
|
}}}
The same failure can be found on the freebsd bugzilla @
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281886 and
their fix also applies to Macports, as I've applied their patches and the
build resumed with no further issues.
--
--
Ticket URL: <https://trac.macports.org/ticket/71090#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list