Build shared lib
Rebase from 'upstream'