My main machine runs Archlinux which has alot of problems building PLi since it always has the latest packages.
Don't bother fixing build issues, just use the recommended disto(ubuntu 18.04 in this case).
If your main machine runs linux that is not compatible then you shouldn't use virtualization, instead use something like chroot/debootstrap or lxc/lxd(linux container) to have the full machine power available to bitbake, that's what I do anyway.
Regards