Emit proper error message when trying to build a sourceLibrary.