OpenWrt Forum Archive

Topic: [solved]complie problem:recipe for target 'world' failed

The content of this topic has been archived on 4 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

make world
make[1] world
make[2] tools/install
make[3] -C tools/flock compile
make[3] -C tools/flock install
make[3] -C tools/tar compile
make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
/home/debian8/openwrt/include/toplevel.mk:192: recipe for target 'world' failed
make: *** [world] Error 1

make  -j1 V=s
checking whether mkdir handles trailing dot... yes
checking for mkdtemp... yes
checking whether mkfifo rejects trailing slashes... yes
checking whether mknod can create fifo without root privileges... configure: error: in `/home/debian8/openwrt/build_dir/host/tar-1.28':
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/debian8/openwrt/build_dir/host/tar-1.28/.configured' failed
make[3]: *** [/home/debian8/openwrt/build_dir/host/tar-1.28/.configured] Error 1
make[3]: Leaving directory '/home/debian8/openwrt/tools/tar'
tools/Makefile:134: recipe for target 'tools/tar/compile' failed
make[2]: *** [tools/tar/compile] Error 2
make[2]: Leaving directory '/home/debian8/openwrt'
tools/Makefile:133: recipe for target '/home/debian8/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy' failed
make[1]: *** [/home/debian8/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy] Error 2
make[1]: Leaving directory '/home/debian8/openwrt'
/home/debian8/openwrt/include/toplevel.mk:192: recipe for target 'world' failed
make: *** [world] Error 2

How to fix it?

(Last edited by elearn2014 on 8 Jun 2016, 15:06)

configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)

First you built with normal user
and you need for openwrt builtroot this installed debian8 = Debian 8 ?

apt-get install python python2.7 perl imagemagick subversion git gcc g++ binutils autoconf automake libtool-bin make bzip2 libncurses5-dev libreadline-dev zlib1g-dev flex bison patch texinfo tofrodos gettext pkg-config realpath libstring-crc32-perl gawk libusb-dev unzip intltool libacl1-dev libcap-dev libc6-dev libglib2.0-dev unzip wget curl zip libssl-dev

than try make dirclean ; make defconfig ; make V=s -j1

I change from root  into normal user `debian8` ,then retry it.

debian8@hwy:~/openwrt$  make dirclean
rm: cannot remove '/home/debian8/openwrt/tmp/info/.overrides-packageinfo-15166': Permission denied
make[2]: *** No rule to make target '/home/debian8/openwrt/tmp/info/.files-packageinfo-4410'.  Stop.
cat: /home/debian8/openwrt/tmp/info/.files-packageinfo-4410: No such file or directory
cat: /home/debian8/openwrt/tmp/info/.overrides-packageinfo-4410: No such file or directory
rm: cannot remove '/home/debian8/openwrt/tmp/info/.files-packageinfo.stamp.bdd461cbc7eeb7e2573b84d126569674': Permission denied
touch: cannot touch '/home/debian8/openwrt/tmp/info/.files-packageinfo.stamp.d41d8cd98f00b204e9800998ecf8427e': Permission denied
touch: cannot touch '/home/debian8/openwrt/tmp/info/.files-packageinfo.stamp': Permission denied
include/scan.mk:84: recipe for target '/home/debian8/openwrt/tmp/info/.files-packageinfo.stamp' failed
make[1]: *** [/home/debian8/openwrt/tmp/info/.files-packageinfo.stamp] Error 1
/home/debian8/openwrt/include/toplevel.mk:80: recipe for target 'prepare-tmpinfo' failed
make: *** [prepare-tmpinfo] Error 2

debian8@hwy:~/openwrt$ make
rm: cannot remove '/home/debian8/openwrt/tmp/info/.overrides-packageinfo-15166': Permission denied
make[3]: *** No rule to make target '/home/debian8/openwrt/tmp/info/.files-packageinfo-4008'.  Stop.
cat: /home/debian8/openwrt/tmp/info/.files-packageinfo-4008: No such file or directory
cat: /home/debian8/openwrt/tmp/info/.overrides-packageinfo-4008: No such file or directory
rm: cannot remove '/home/debian8/openwrt/tmp/info/.files-packageinfo.stamp.bdd461cbc7eeb7e2573b84d126569674': Permission denied
touch: cannot touch '/home/debian8/openwrt/tmp/info/.files-packageinfo.stamp.d41d8cd98f00b204e9800998ecf8427e': Permission denied
touch: cannot touch '/home/debian8/openwrt/tmp/info/.files-packageinfo.stamp': Permission denied
include/scan.mk:84: recipe for target '/home/debian8/openwrt/tmp/info/.files-packageinfo.stamp' failed
make[2]: *** [/home/debian8/openwrt/tmp/info/.files-packageinfo.stamp] Error 1
/home/debian8/openwrt/include/toplevel.mk:80: recipe for target 'prepare-tmpinfo' failed
make[1]: *** [prepare-tmpinfo] Error 2
/home/debian8/openwrt/include/toplevel.mk:192: recipe for target 'world' failed
make: *** [world] Error 2

Fix permissions you broke using root before.

sudo chown -R debian8:debian8 /home/debian8/openwrt

Edit: apparently debian8 is the username and hwy the host, fixed above command.

(Last edited by sera on 5 Jun 2016, 09:16)

The discussion might have continued from here.