Opened 2 years ago
Last modified 17 months ago
#71090 assigned defect
kicad @7.0.11: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>'
| Reported by: | mpbb77 (Miguel Branco) | Owned by: | ra1nb0w |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.10.2 |
| Keywords: | sequoia haspatch | Cc: | Dave-Allured (Dave Allured) |
| Port: | kicad |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
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.
Attachments (1)
Change History (8)
Changed 2 years ago by mpbb77 (Miguel Branco)
| Attachment: | attachment.html added |
|---|
comment:1 Changed 2 years ago by mpbb77 (Miguel Branco)
| Description: | modified (diff) |
|---|
comment:2 Changed 2 years ago by mpbb77 (Miguel Branco)
| Description: | modified (diff) |
|---|
comment:3 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)
| Description: | modified (diff) |
|---|---|
| Keywords: | sequoia haspatch added; kicad clang-19 libc++ 19 removed |
| Owner: | set to ra1nb0w |
| Status: | new → assigned |
| Summary: | Kicad @7.0.11: fails to build with clang-19 and libc++ 19, after upgrade to macos 15 → kicad @7.0.11: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>' |
comment:4 Changed 2 years ago by markemer (Mark Anderson)
Should we maybe upgrade to kicad 8? It's been out for a bit. Might solve this issue.
comment:5 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)
Yes, we should upgrade to kicad 8, but an update to kicad 8 was submitted and languished for awhile before being closed without being accepted. I updated the port to the latest version of 7 instead. Updating to kicad 8, and even getting kicad 7 working, is difficult in part because upstream only supports using their fork of wxWidgets, not the standard wxWidgets we have in MacPorts, and in part because their software appears to have a design flaw that makes it not work on Intel Macs running macOS 10.x. The last time I attempted to communicate with the developers of kicad they were unhelpful and unfriendly so I won't be communicating with them again and I don't know if anybody else has reported the design flaw to them.
comment:6 Changed 18 months ago by mojca (Mojca Miklavec)
This was fixed is version 9.0.2 (still in rc for now)
comment:7 Changed 17 months ago by Dave-Allured (Dave Allured)
| Cc: | Dave-Allured added |
|---|

Patches from FreeBsd Bugzilla readily applicable to this port