It is known that ceph pacific (16.2.*) fails to build from source (FTBFS) when compiling with gcc 12 Upstream bug report: https://tracker.ceph.com/issues/53896