Does anyone get this error while building the Engine?

[ ERROR ] schema.sh: FATAL: Cannot execute sql command: --command=select 1;
[ ERROR ] Failed to execute stage 'Misc configuration': Engine schema refresh failed

Happened in a completely new setup, rebased from master, new database, even build directory manually deleted before running make.

Any help would be appreciated,

thanks