Ab initio phase stabilities and mechanical properties of multicomponent alloys