[FixPermissions] fix compiler warnings
Revamp build process