make - build compilation of tools fails due to tar config
On the build host (an unprivilged lxc container running debian derivate kali-linux on kernel 5.0.0-13-generic) the following was undertaken:
[1] cd /srv
[2] git clone https://gitlab.labs.nic.cz/turris/turris-build
[3] mkdir -p /srv/test
[4] cd /srv/test
[5] /srv/turris-build/compile_pkgs prepare_tools -t omnia
However, the build compilation fails with:
make -r tools/compile: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what’s going on
make: *** [/srv/test/include/toplevel.mk:218: tools/compile] Error 1
In order to debug/investigate the issue this been then tested in a git clone of upstream with
make -j1 V=sc tools/install
which produced
checking whether mknod can create fifo without root privileges... configure: error: in
/srv/openwrt/build_dir/host/tar-1.32': configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check) See
config.log' for more details
make[2]: *** [Makefile:32: /srv/openwrt/build_dir/host/tar-1.32/.configured] Error 1
make[2]: Leaving directory '/srv/openwrt/tools/tar'
time: tools/tar/compile#23.22#14 (closed).78#40 (closed).21
make[1]: *** [tools/Makefile:159: tools/tar/compile] Error 2
make[1]: Leaving directory '/srv/openwrt'
make: *** [/srv/openwrt/include/toplevel.mk:218: tools/install] Error 2
cross reference to forum https://forum.turris.cz/t/build-environment-not-working/10034/7
cross reference upstream https://github.com/openwrt/packages/issues/8752