switch to dynamically build pte lib