i've ubuntu 16.10 i think. possibly an issue related to that.
how long to compile on a vm ?!? virtual disk are so slow that it slows down the compilation a lot.
you can run the genimage and isolate the issue to found a solution :
target_dir is output/target
binaries_dir is probably output/images
outputpath is probably output/images/recalbox
for tmppath i remember i put something like output/genimage or ouput/build/genimage (you can found values in the script)
genimage --rootpath="${TARGET_DIR}" --inputpath="${BINARIES_DIR}" --outputpath="${RECALBOX_BINARIES_DIR}" --config="${BINARIES_DIR}/genimage.cfg" --tmppath="${GENIMAGE_TMP}" || exit 1