The real error from your log:
sage/algebras/quatalg/quaternion_algebra_element.cpp:22735:3: error: 'fmpz_poly_scalar_mul_mpz' is deprecated. Use 'fmpz_poly_scalar_mul_fmpz' instead.
fmpz_poly_scalar_mul_mpz(__pyx_v_self->x, __pyx_v_self->x, __pyx_v_4sage_8algebras_7quatalg_26quaternion_algebra_element_T1);
^
///usr/local/include/flint/fmpz_poly.h:1263:34: note: expanded from macro 'fmpz_poly_scalar_mul_mpz'
#define fmpz_poly_scalar_mul_mpz _Pragma("GCC error \"'fmpz_poly_scalar_mul_mpz' is deprecated. Use 'fmpz_poly_scalar_mul_fmpz' instead.\"")
^
<scratch space>:433:6: note: expanded from here
GCC error "'fmpz_poly_scalar_mul_mpz' is deprecated. Use 'fmpz_poly_scalar_mul_fmpz' instead."
^
Your config.log says that you are using flint from SPKG. Above refers to a FLINT installation in /usr/local, likely incompatible FLINT 3. Best to uninstall that