The hwloc15 library is required for XMRig. For Debian based systems use the command below to install the library.
hwloc15
sudo apt install libhwloc15
Compiling XMRig requires the libhwloc-dev package:
libhwloc-dev
sudo apt install libhwloc-dev