update spec,fix warnnings and fix static library compile problem