PVR (hts) not building

When I am trying to build a new version of Kodi form source the build stops with underneath error.
I did not change anything on my system (as far as I am aware).

Code:
[  3%] Creating directories for 'p8-platform'
[  6%] Performing download step (git clone) for 'p8-platform'
Cloning into 'p8-platform'...
Note: checking out '38343e0acd6a636ac46139aa666aee4a8d1f13db'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 38343e0... bump to 2.0.1
[  9%] Performing patch step for 'p8-platform'
/bin/sh: 1: GIT_SHALLOW: not found
depends/CMakeFiles/p8-platform.dir/build.make:98: recipe for target 'build/p8-platform/src/p8-platform-stamp/p8-platform-patch' failed
make[4]: *** [build/p8-platform/src/p8-platform-stamp/p8-platform-patch] Error 127
make[4]: Leaving directory '/home/htpc01/src/Kodi/xbmc/tools/depends/target/binary-addons/native'
CMakeFiles/Makefile2:329: recipe for target 'depends/CMakeFiles/p8-platform.dir/all' failed
make[3]: *** [depends/CMakeFiles/p8-platform.dir/all] Error 2
make[3]: Leaving directory '/home/htpc01/src/Kodi/xbmc/tools/depends/target/binary-addons/native'
CMakeFiles/Makefile2:175: recipe for target 'CMakeFiles/pvr.hts.dir/rule' failed
make[2]: *** [CMakeFiles/pvr.hts.dir/rule] Error 2
make[2]: Leaving directory '/home/htpc01/src/Kodi/xbmc/tools/depends/target/binary-addons/native'
Makefile:157: recipe for target 'pvr.hts' failed
make[1]: *** [pvr.hts] Error 2
make[1]: Leaving directory '/home/htpc01/src/Kodi/xbmc/tools/depends/target/binary-addons/native'
Following Addons failed to build:
touch .installed-native
make: Leaving directory '/home/htpc01/src/Kodi/xbmc/tools/depends/target/binary-addons'