Errors while building OpenWRT firmware

While I am building an image in ubuntu 20.04 for virtual box. I am getting below error.
make[4]: Entering directory '/home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt/build_dir/host/autoconf-2.71'
make[4]: Nothing to be done for 'install-man1'.
make[4]: Leaving directory '/home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt/build_dir/host/autoconf-2.71'
CFLAGS="-O2 -I/home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt/staging_dir/host/include " CPPFLAGS="-I/home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt/staging_dir/host/include " CXXFLAGS="" LDFLAGS="-L/home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt/staging_dir/host/lib " make -j1 -C /home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt/build_dir/host/autoconf-2.71
make[4]: Entering directory '/home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt/build_dir/host/autoconf-2.71'
make all-am
make[5]: Entering directory '/home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt/build_dir/host/autoconf-2.71'
autom4te_perllibdir='.'/lib AUTOM4TE_CFG='lib/autom4te.cfg' bin/autom4te -B ''lib -B '.'/lib --language M4sh --cache ''
--melt ./bin/ -o bin/
Possible unintended interpolation of @networks in string at bin/autom4te line 282.
make[5]: *** [Makefile:2128: bin/] Error 1
make[5]: Leaving directory '/home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt/build_dir/host/autoconf-2.71'
make[4]: *** [Makefile:928: all] Error 2
make[4]: Leaving directory '/home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt/build_dir/host/autoconf-2.71'
make[3]: *** [Makefile:33: /home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt/build_dir/host/autoconf-2.71/.built] Error 2
make[3]: Leaving directory '/home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt/tools/autoconf'
time: tools/autoconf/compile#0.10#0.02#0.12
ERROR: tools/autoconf failed to build.
make[2]: *** [tools/Makefile:226: tools/autoconf/compile] Error 1
make[2]: Leaving directory '/home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt'
make[1]: *** [tools/Makefile:222: /home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt/staging_dir/host/stamp/.tools_compile_nyyynyynnnyyynynyyyyyyynyyynnynyynnynnyyyyyyyyyyyyyyyyynynnyyyyyyy] Error 2
make[1]: Leaving directory '/home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt'
make: *** [/home/gokulreddyp@networks.lan/Documents/OpenWRT/openwrt/include/ world] Error 2

Just make sure you "sandwich" your text between two rows of backtick characters ` (which themselves will be invisible in the preview) looking in something like this in the editor:
Your Pasted Text as preformatted text with fixed width font
1111 (note with fixed-width fonts the numbers are right-aligned)
but looking like this in the rendered forum:

Your Pasted Text as preformatted text with fixed width font
1111 (note with fixed-width fonts the numbers are right-aligned)
1 Like

The problem might be related to the name of your home directory (with the @ in the name)


Yeah, I'd say that's causing make to throw a fit. Curious choice to use a fictitious e-mail address as your home directory.


1 Like

As other pointed out, this message is concerning:


I've seen this happen when using AD authentication: /home/<Username@AD-Domain>/

1 Like

I've encountered the same problems using Ubuntu, so I switched to Debian.

Install Debian 10

# Add a user to the sudoers group
# Replace username with the real user's name
usermod -aG sudo username

sudo apt update
sudo apt install linux-headers-amd64 make sudo \
ccache ecj fastjar file g++ gawk \
gettext git java-propose-classpath libelf-dev libncurses5-dev \
libncursesw5-dev libssl-dev python python2.7-dev python3 unzip wget \
python3-distutils python3-setuptools python3-dev rsync subversion \
swig time xsltproc zlib1g-dev \
build-essential clang flex bison \
gcc-multilib g++-multilib libncurses-dev \
rsync unzip zlib1g-dev

Although Debian is kind of the reference for the buildroot (I believe the buildbots run it as well), this issue has nothing to do with it.


My apologies. Would you be so kind as to teach us how to fix these Error 1 & 2 messages? That would be greatly appreciated by all.

Quite possibly the answer is like already suggested by tl71 and eduperez above: from Makefile perspective an invalid character @ in the username and path causing make to interpret commands wrongly...

Posts 3-5 already covered that.

Yes, so adhereing to modifications as suggested in post 3-5 will solve those errors correct?