Unfortunately this still appears to be a problem with Swift Log, and is tracked as an active issue on the official GitHub repo.
I ran into the same problem running Ubuntu 24.04 while trying to install Swift 6.0.1. I ended up downgrading my target instance to Ubuntu 22 to compile successfully.