OpenWrt Forum Archive

Topic: can't build openwrt with tar 1.15.91

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

Tar 1.15.91 has removed a useful feature (wildcard matching) [1], used by openwrt build script.

Therefore, it is not possible to install openwrt on a machine with tar 1.15.91 sad

tar: Pattern matching characters used in file names. Please,
tar: use --wildcards to enable pattern matching, or --no-wildcards to
tar: suppress this warning.
tar: *.config: Not found in archive
tar: Error exit delayed from previous errors

[1] http://lists.gnu.org/archive/html/bug-t … 00001.html

(Last edited by mangoo on 1 Jul 2006, 21:28)

As far as I can see it only matters in buildroot-ng/openwrt/toolchain/kernel-headers/Makefile

Line 35 from a new checkout

Changing the line to read

bzcat $(DL_DIR)/$(PKG_SOURCE) | tar --wildcards -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - \

(i.e just adding --wildcards) allows the rest of the build to go fine (at least with buildroot-ng)

Yes, buildroot-ng fails at the very beginning.

But with kamikaze svn it also failed for mae at some point.

I'm seeing the same problem. I've added TAR_OPTIONS="--wildcards" environment variable and the build proceeds fine... up to a point where it says:

root@llama:~/buildroot-ng/openwrt# make V=99
scripts/config/conf -D .config Config.in >/dev/null 2>/dev/null
make toolchain/install
make[1]: Entering directory `/root/buildroot-ng/openwrt'
make -C toolchain install
make[2]: Entering directory `/root/buildroot-ng/openwrt/toolchain'
make[3]: Entering directory `/root/buildroot-ng/openwrt/toolchain/kernel-headers'
mkdir -p /root/buildroot-ng/openwrt/toolchain_build_mipsel
bzcat /root/buildroot-ng/openwrt/dl/linux-2.4.32.tar.bz2 | tar ---wildcards -C /root/buildroot-ng/openwrt/toolchain_build_mipsel -xf - linux-2.4.32/include linux-2.4.32/Makefile linux-2.4.32/Rules.make linux-2.4.32/arch/mips/Makefile linux-2.4.32/scripts linux-2.4.32/arch/mips/config*.in linux-2.4.32/*/*/Config.in linux-2.4.32/*/Config.in
tar: Multiple archive files require `-M' option
Try `tar --help' or `tar --usage' for more information.
make[3]: *** [/root/buildroot-ng/openwrt/toolchain_build_mipsel/linux-2.4.32/.prepared] Error 2
make[3]: Leaving directory `/root/buildroot-ng/openwrt/toolchain/kernel-headers'
make[2]: *** [kernel-headers-prepare] Error 2
make[2]: Leaving directory `/root/buildroot-ng/openwrt/toolchain'
make[1]: *** [toolchain/install] Error 2
make[1]: Leaving directory `/root/buildroot-ng/openwrt'
make: *** [world] Error 2

What exactly is wrong here?

Hm. I unset TAR_OPTIONS and modified stuff as h3sp4wn described. It worked up to a point where ipkg-make-index started complaining about tar and --wildcards option. So, i modified trunk/openwrt/staging_dir_i386/usr/bin/ipkg.py. Here's the diff:

root@llama:/usr/src/trunk/openwrt/staging_dir_i386/usr/bin# diff ipkg.py-original ipkg.py
98c98
<                 control = os.popen("tar xfzO "+fn+" '*control.tar.gz' | tar xfzO - '*control'","r")
---
>                 control = os.popen("tar --wildcards -xzOf "+fn+" '*control.tar.gz' | tar --wildcards -xzOf - '*control'","r")
125c125
<                 data = os.popen("tar xfzO "+fn+" '*data.tar.gz' | tar tfz -","r")
---
>                 data = os.popen("tar --wildcards -xzOf "+fn+" '*data.tar.gz' | tar tfz -","r")

Oh.. and btw, this was done on an oldish Kamikaze (3750), not buildroot-ng.

And another thing: is it possible that Kamikaze uses TAR_OPTIONS variable internally? I've seen something like this in a Makefile somewhere.

@frak: TAR_OPTIONS is defined in $TOPLEVEL/rules.mk,
and you should "unset TAR_OPTIONS" when getting "tar: Multiple archive files require `-M' option"
after using it to pass the first steps...

You also had "---wildcards", one to many '-' here...

Ugh, I think I'll have a look at all those Makefiles, there is a slight need for work there, to untangle all that mess...
And I may have time for that, waiting for my max233-serial-cable to materialize...

Forgot to mention I got that with up-to-date buildroot-ng

(Last edited by VinceLe on 23 Aug 2006, 00:16)

I just downloaded the WhiteRussian RC5 tarball and tried to compile it - I had all the same problems the others had.  Does anyone know if this will be fixed in the next release?

Hi guys, new on the forums, I too had this problem, however using bsdtar instead (Coming from a *BSD background), solved the problem.  Was simply a case of apt-get install bsdtar for me (Ubuntu edgy).

Thanks,
Joe

(Last edited by Joe on 27 Dec 2006, 21:47)

The discussion might have continued from here.