Just moved the #include <math.h> in src/xsettings.c from Xft section into the global section, build is running