resolve lib dependency.