Client and server builds fail with Clang 19 due to std::char_traits changes

Using Clang/LLVM 19 on FreeBSD 15-CURRENT (for testing) and seeing errors building both the UrBackup Server and Client. It appears to be related to changes in Clang 19 for std::char_traits’ base template being removed.

UrBackup Server version 2.5.33
UrBackup Client version 2.5.25.0
Clang / LLVM version 19.1.2

I’ve attached logs for both build attempts. Unfortunately, I don’t have a patch to provide (yet.)

urbackup-client.log (33.5 KB)
urbackup-server.log (30.2 KB)

Here’s a link to the Clang 19 changes regarding the char_traits base template. I tried linking in the original post but it wouldn’t allow it.

Libc++ 19.0.0 (In-Progress) Release Notes — libc++ documentation

Here are the patches I created that allowed me to successfully build and run both client and server on FBSD 15.0-CURRENT (clang version 19.1.7). It also still builds on older versions of clang (such as version 18.1.6):

urbackup-client-2.5.25.0-llvm19.patch (67.2 KB)
urbackup-server-2.5.33-llvm19.patch (96.9 KB)

Hopefully, these can help out getting things moving as LLVM/LIBC gets updated across many platforms.

Thanks!

Perhaps it should compile with -std=c++11 or even -std=c++98 ? Would that fix the issues?

In the dev branch it uses std::unique_ptr.