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.

Thank you for the reply!

I tried different std’s on FBSD 15 but they did not work without some (or all?) of these changes. I haven’t tried the dev branch yet, but it would certainly be worth a shot.

Is there a way to pull the dev branch to test from? If so, where would I find it?

Thanks!

EDIT:
I ran some more tests just to follow up with your suggestions and here’s what I found (with respective logs attached below.) Again, this is with clang v19.1.7:

With just replacing std::auto_ptr with std::unique_ptr:
c++11 - fail
c++14 - fail
c++98 - fail

With replacing std::auto_ptr with std::unique_ptr and also std::char_traits and std::basic_string with std::vector:
c++11 - success
c++14 - success
c++98 - fail

urbackup-client-2.5.25-cpp11-unique.log (3.7 KB)
urbackup-client-2.5.25-cpp14-unique.log (3.7 KB)
urbackup-client-2.5.25-cpp98-unique.log (5.3 KB)
urbackup-client-2.5.25-cpp98-unique-vector.log (3.1 KB)