I have some problem when making openwrt(cc) with msg " recipe for target '../build_dir/host/automake-1.15'.. failed

I have some problem when making openwrt(cc) on ubuntu16.04, with error massege as follow :

. /home/fan/openwrt_CC_mt76xx_omj_source/include/shell.sh; xzcat /home/fan/openwrt_CC_mt76xx_omj_source/dl/automake-1.15.tar.xz | tar -C /home/fan/openwrt_CC_mt76xx_omj_source/build_dir/host/automake-1.15/.. -xf -
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
Makefile:50: recipe for target '/home/fan/openwrt_CC_mt76xx_omj_source/build_dir/host/automake-1.15/.prepared6ce139bc95b17c2eb34eb1c015ec4bfd' failed
make[3]: *** [/home/fan/openwrt_CC_mt76xx_omj_source/build_dir/host/automake-1.15/.prepared6ce139bc95b17c2eb34eb1c015ec4bfd] Error 2
make[3]: Leaving directory '/home/fan/openwrt_CC_mt76xx_omj_source/tools/automake'
tools/Makefile:122: recipe for target 'tools/automake/compile' failed
make[2]: *** [tools/automake/compile] Error 2
make[2]: Leaving directory '/home/fan/openwrt_CC_mt76xx_omj_source'
tools/Makefile:121: recipe for target '/home/fan/openwrt_CC_mt76xx_omj_source/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynnnyy' failed
make[1]: *** [/home/fan/openwrt_CC_mt76xx_omj_source/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynnnyy] Error 2
make[1]: Leaving directory '/home/fan/openwrt_CC_mt76xx_omj_source'
/home/fan/openwrt_CC_mt76xx_omj_source/include/toplevel.mk:181: recipe for target 'world' failed
make: *** [world] Error 2

I guessed the reason tha is tar automake-1.15.tar.xz flaied.
I checked the directory of " ./build_dir/host/automake-1.15/" as cmd:
ls -la build_dir/host/automake-1.15/
total 8
drwxr-xr-x 2 fan fan 4096 Jul 6 10:19 .
drwxrwxrw- 45 fan fan 4096 Jul 6 10:19 ..
As my guesswork, the directory is none.
Then I tried to tar "automake-1.15.tar.xz" agin :
tar -xvf dl/automake-1.15.tar.xz -C build_dir/host/
I checked the directory of " ./build_dir/host/automake-1.15/"
ls -la build_dir/host/automake-1.15/
total 1532
drwxr-xr-x 11 fan fan 4096 Jan 6 2015 .
drwxr-xr-x 45 fan fan 4096 Jul 6 09:22 ..
-rw-r--r-- 1 fan fan 1514 Jan 6 2015 aclocal.m4
-rw-r--r-- 1 fan fan 553 Dec 31 2014 AUTHORS
drwxr-xr-x 2 fan fan 4096 Jan 6 2015 bin
-rwxr-xr-x 1 fan fan 3849 Dec 31 2014 bootstrap.sh
-r--r--r-- 1 fan fan 808180 Jan 6 2015 ChangeLog
-rwxr-xr-x 1 fan fan 232833 Jan 6 2015 configure
-rw-r--r-- 1 fan fan 22831 Dec 31 2014 configure.ac
drwxr-xr-x 4 fan fan 4096 Jan 6 2015 contrib
-rw-r--r-- 1 fan fan 17987 Jul 22 2013 COPYING
drwxr-xr-x 3 fan fan 4096 Jan 6 2015 doc
-rwxr-xr-x 1 fan fan 13940 Dec 31 2014 gen-testsuite-part
-rw-r--r-- 1 fan fan 439 Dec 14 2012 .git-log-fix
-rw-r--r-- 1 fan fan 3303 Dec 31 2014 GNUmakefile
-rw-r--r-- 1 fan fan 17850 Dec 31 2014 HACKING
-rw-r--r-- 1 fan fan 15752 Dec 28 2014 INSTALL
drwxr-xr-x 4 fan fan 4096 Jan 6 2015 lib
drwxr-xr-x 4 fan fan 4096 Jan 6 2015 m4
drwxr-xr-x 2 fan fan 4096 Jan 6 2015 maintainer
-rw-r--r-- 1 fan fan 4281 Dec 31 2014 Makefile.am
-rw-r--r-- 1 fan fan 133297 Jan 6 2015 Makefile.in
-rw-r--r-- 1 fan fan 123685 Jan 6 2015 NEWS
drwxr-xr-x 2 fan fan 4096 Jan 6 2015 old
drwxr-xr-x 4 fan fan 4096 Jan 6 2015 PLANS
-rw-r--r-- 1 fan fan 2713 Dec 31 2014 README
drwxr-xr-x 6 fan fan 61440 Jan 6 2015 t
-rw-r--r-- 1 fan fan 22938 Jan 6 2015 THANKS

that showing tar it OK.

I maked openwrt soure agin, but aslo I haved the problem.

Cloud you tell me how can I do for the problem?

Update Ubuntu.

There are problems in compiling new OpenWrt versions with ancient OS.
(And similarly, trying to compile antique OpenWrt version with too new OS might fail)

Automake had that kind of problems some time ago, so I guess that this might be something like that.

However, if you are trying to build old OpenWrt chaos calmer (cc), be aware that there was no mt76xx target in cc. If you are trying that, you are likely using somebody's hack for applying that to old OpenWrt cc. And you should ask the author.

1 Like

Thank you for your reply!
The author build openwrt chaos calmer (cc) sucesse.
We had a projescts with a lib that had no source code. The projects build on openwrt chaos calmer (cc). We build the project on a newer version openwrt, but we failed to build the project.
So we would try opwen (CC) agin.

I build openwrt (CC) on ubuntu20, but also had problem with message as follow:
. /home/fan/openwrt_CC_mt76xx_omj_source/include/shell.sh; xzcat /home/fan/openwrt_CC_mt76xx_omj_source/dl/patch-2.7.5.tar.xz | tar -C /home/fan/openwrt_CC_mt76xx_omj_source/build_dir/host/patch-2.7.5/.. -xf -
bash: /home/fan/openwrt_CC_mt76xx_omj_source/staging_dir/host/bin/xzcat: cannot execute binary file: Exec format error
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
make[3]: *** [Makefile:24: /home/fan/openwrt_CC_mt76xx_omj_source/build_dir/host/patch-2.7.5/.preparedd41d8cd98f00b204e9800998ecf8427e] Error 2
make[3]: Leaving directory '/home/fan/openwrt_CC_mt76xx_omj_source/tools/patch'
make[2]: *** [tools/Makefile:123: tools/patch/compile] Error 2
make[2]: Leaving directory '/home/fan/openwrt_CC_mt76xx_omj_source'
make[1]: *** [tools/Makefile:121: /home/fan/openwrt_CC_mt76xx_omj_source/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynnnyy] Error 2
make[1]: Leaving directory '/home/fan/openwrt_CC_mt76xx_omj_source'
make: *** [/home/fan/openwrt_CC_mt76xx_omj_source/include/toplevel.mk:183: world] Error 2

I guess that the shell has error

if shell is like this:
/home/fan/openwrt_CC_mt76xx_omj_source/dl/patch-2.7.5.tar.xz | tar -C /home/fan/openwrt_CC_mt76xx_omj_source/build_dir/host/patch-2.7.5/.. -xf -
......

If you insist on using a (modified) version of (or rather loosely based on-) OpenWrt that is EoL and out of support for over six years, you'll have to consider that any potential issues with that might be your problem, your homework, not ours. hnyman has already given you good/ generic advice, anything beyond that will end up on your todo list (only).

Thank you for your reply!
I tried to :
make distclean
Then build it agin.
That has no the problem.