**I compile LEDE for TLWR941V5 in DEBIAN 8
I used some command as root user git clone https://git.lede-project.org/source.git
_ cd source_ /scripts/feeds update -a ./scripts/feeds install -a make defconfig make menuconfig
then i choose
"Target System" => "Atheros AR7xxx/AR9xxx"
"Target Profile" => "TP-LINK TL-WR941N/ND v5"
then command make
appear error then i run command make -j1 V=s
I had run make check make download
an the same error
"checking whether mkfifo rejects trailing slashes... yes
checking whether mknod can create fifo without root privileges... configure: error: in /home/huy/Downloads/source/build_dir/host/tar-1.29': configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check) Seeconfig.log' for more details
Makefile:30: recipe for target '/home/huy/Downloads/source/build_dir/host/tar-1.29/.configured' failed
make[3]: *** [/home/huy/Downloads/source/build_dir/host/tar-1.29/.configured] Error 1
make[3]: Leaving directory '/home/huy/Downloads/source/tools/tar'
tools/Makefile:149: recipe for target 'tools/tar/compile' failed
make[2]: *** [tools/tar/compile] Error 2
make[2]: Leaving directory '/home/huy/Downloads/source'
tools/Makefile:147: recipe for target '/home/huy/Downloads/source/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyyyyyyyyyyyyyyyyyynyynynyyyynnny' failed
make[1]: *** [/home/huy/Downloads/source/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyyyyyyyyyyyyyyyyyynyynynyyyynnny] Error 2
make[1]: Leaving directory '/home/huy/Downloads/source'
/home/huy/Downloads/source/include/toplevel.mk:199: recipe for target 'world' failed
make: *** [world] Error 2"
Please tell me how to do
There is no need to download source, compile, or build images for OpenWrt as root.
"Best practice" for any use of computers, building OpenWrt or otherwise, is to never use elevated privileges unless absolutely necessary.
Even when building on and for a desktop Linux distro, one almost always can build the source with user privilege; only when installing is elevated privilege required.
Any errors seen by the OP were most likely due to misconfiguration of their system, unrelated to OpenWrt, or to running something in the build directories as root, "tainting" the files' or directories' ownership.
Fact 1: there is no need to build as root
Fact 2: there are multiple consequences (real problems) that might (and often do) arise when ignoring this advice.
Fact 3: no one sane, or just non-stupid, ever tries building as root, so problems (including grave ones) will go unnoticed when trying
An incomplete list of consequences could be:
data loss
unintended changes of ownership/ access rights (ACLs, SElinux labels, etc.)
clobbered filesystems, leading to bricked installations (a real example, in the past buggy gcc versions would replace /dev/null with a file, leading to very 'funny' results)
not all packages are necessarily sufficiently self-contained, so files (libraries, binaries, headers, etc.) might escape the build root and overwrite system files (which will have funny results, given the differing target arch and base libc involved).
building OpenWrt might fail, because no one sane (neither upstream nor OpenWrt developers) will build as root
the chances for miscompiled firmware images or individual packages rises significantly
Counter question, if I'd shoot myself into the foot - is the only consequence of doing so the resulting hole in the foot?! After all, that might come in handy for the funeral director, to hang the corpses in a row.