This is a simple way to compile some stuff in an image/chroot:
https://www.mobileread.com/forums/sho...9&postcount=30
It uses qemu-static so you can chroot right in and then apt-get what you need.
once you have built it, you can use ldd to see the dependencies and export the ones needed on you system.