[Bug 287706] devel/cpprestsdk: broken on llvm 19

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 21 Jun 2025 12:17:01 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287706

            Bug ID: 287706
           Summary: devel/cpprestsdk: broken on llvm 19
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: sigsegv@radiotube.org

Cpprestsdk is using std::basic_string<uint8_t> in a header file
Release/include/cpprest/streams.h. This no longer compiles on llvm 19 because
std::char_traits<uint8_t> is not available and is not required to be available
by the C++ standard. This is an issue in FreeBSD 13.5 and 14.3 due to the llvm
upgrade.

There are probably a number of ways to fix this and I am currently testing a
patch to have it compile. If successful I'll upload it (probably within a day
or two).

Upstream bug:
https://github.com/microsoft/cpprestsdk/issues/1812

Note that cpprestsdk does not compile for other reasons as well and both
websocketpp and cpprestsdk also need a boost 1.87-patch to be unbroken.


I'll just copy in part of the very lengthy error message when compiling:
/usr/include/c++/v1/string:820:42: error: implicit instantiation of undefined
template 'std::char_traits<unsigned char>'
  820 |   static_assert(is_same<_CharT, typename
traits_type::char_type>::value,
      |                                          ^
/wrkdirs/usr/ports/devel/cpprestsdk/work/cpprestsdk-2.10.19/Release/include/cpprest/streams.h:79:39:
note: in instantiation of template class 'std::basic_string<unsigned char>'
requested here
   79 |     static std::basic_string<uint8_t> format(const T& val)

-- 
You are receiving this mail because:
You are the assignee for the bug.