Sudo make toolchain/install failed

Greetings,
For some days, I'm looking for why I've this issue.
I setuped a Laptop with Ubuntu.
I followed the " Build system – Installation " developer guide.
Then the " "Hello, world!" for OpenWrt ".
The Hello world program works on my laptop, but before that, the sudo make toolchain/install command doesnt work, I've an issue :

ace@ubuntu:/home/buildbot/source$ sudo make toolchain/install
 make[1] toolchain/install
 make[2] tools/install
 make[3] -C tools/flock compile
 make[3] -C tools/flock install
 make[3] -C tools/sed compile
 make[3] -C tools/sed install
 make[3] -C tools/patch compile
 make[3] -C tools/patch install
 make[3] -C tools/xz compile
 make[3] -C tools/xz install
 make[3] -C tools/tar compile
make -r toolchain/install: build failed. Please re-run make with -j1 V=s to see what's going on
/home/buildbot/source/include/toplevel.mk:205: recipe for target 'toolchain/install' failed
make: *** [toolchain/install] Error 1

So, what can I do for help you to help me :slight_smile:
I test with -j1 V=s, and I've this :

checking for mkdtemp... yes
checking whether mkfifo rejects trailing slashes... yes
checking whether mknod can create fifo without root privileges... configure: error: in `/home/buildbot/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)
See `config.log' for more details
Makefile:30: recipe for target '/home/buildbot/source/build_dir/host/tar-1.29/.configured' failed
make[3]: *** [/home/buildbot/source/build_dir/host/tar-1.29/.configured] Error 1
make[3]: Leaving directory '/home/buildbot/source/tools/tar'
tools/Makefile:147: recipe for target 'tools/tar/compile' failed
make[2]: *** [tools/tar/compile] Error 2
make[2]: Leaving directory '/home/buildbot/source'
tools/Makefile:145: recipe for target '/home/buildbot/source/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnny' failed
make[1]: *** [/home/buildbot/source/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
make[1]: Leaving directory '/home/buildbot/source'
/home/buildbot/source/include/toplevel.mk:205: recipe for target 'toolchain/install' failed
make: *** [toolchain/install] Error 2

Thanks
Rémi

All OpenWrt toolchain related commands should be run without sudo.
If you need that (=root account rights), there is something wrong with your setup.

1 Like

Okay, thanks, I'll look that way and keep you informed.
Thanks again.
Happy New Year.
Rémi

Hi hnyman!
I used sudo passwd root then su root for become a root account.
Right now, I can enter commands without sudo.
But I've still the same issue.

root@ubuntu:/home/buildbot/source# make toolchain/install
 make[1] toolchain/install
 make[2] tools/install
 make[3] -C tools/flock compile
 make[3] -C tools/flock install
 make[3] -C tools/sed compile
 make[3] -C tools/sed install
 make[3] -C tools/patch compile
 make[3] -C tools/patch install
 make[3] -C tools/xz compile
 make[3] -C tools/xz install
 make[3] -C tools/tar compile
make -r toolchain/install: build failed. Please re-run make with -j1 V=s to see what's going on
/home/buildbot/source/include/toplevel.mk:198: recipe for target 'toolchain/install' failed
make: *** [toolchain/install] Error 1
root@ubuntu:/home/buildbot/source# 

With make toolchain/install -j1 V=s

checking for mkdtemp... yes
checking whether mkfifo rejects trailing slashes... yes
checking whether mknod can create fifo without root privileges... configure: error: in `/home/buildbot/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)
See `config.log' for more details
Makefile:30: recipe for target '/home/buildbot/source/build_dir/host/tar-1.29/.configured' failed
make[3]: *** [/home/buildbot/source/build_dir/host/tar-1.29/.configured] Error 1
make[3]: Leaving directory '/home/buildbot/source/tools/tar'
tools/Makefile:147: recipe for target 'tools/tar/compile' failed
make[2]: *** [tools/tar/compile] Error 2
make[2]: Leaving directory '/home/buildbot/source'
tools/Makefile:145: recipe for target '/home/buildbot/source/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnny' failed
make[1]: *** [/home/buildbot/source/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
make[1]: Leaving directory '/home/buildbot/source'
/home/buildbot/source/include/toplevel.mk:198: recipe for target 'toolchain/install' failed
make: *** [toolchain/install] Error 2
root@ubuntu:/home/buildbot/source# 

I always the same issue for some days !
I followed this steps : https://openwrt.org/docs/guide-developer/helloworld/chapter1
I was unders ubuntu then I change my laptop and I'm under ubuntu with kubuntu.
I deleted the source directory before restart from the beginning.

If you have an idea about what happen ?
Thanks a lot
Rémi

Again, you do not build anything (and OpenWrt in particular) as root, never - neither through su, sudo nor some weird other method of attaining root rights.

Just delete whatever you have done, leave root - clone it fresh as ordinary user and get started (again, everything as normal non-root user, without any kind of elevated rights).

2 Likes

Ok, thanks, I will try tomorrow.. (22:50 here)

what is wrong with use root only ?
it is a virtual tempopary mashine no one gonna hack it

Don't do it.
It's bad practice, dangerous to the buildsystem and untested.
Most of all, there's no need to do so.

thanks i got it now
it is ok to use root if i just need 1 firmware

It.Is.NOT.OK.

i dont care if my virtual system brakes i have a clone

What's wrong with not using root!?

Nothing wrong with it just one more command at every command
but now i try to make firmware under user
here because under root didnt work out
https://forum.openwrt.org/t/setting-up-a-build-server-in-virtualbox-cant-understand/120609/19?u=zebraonpc

It's not.

useradd whateverusername
su - whateverusername
1 Like