AW: AW: AW: AW: Issue with tar (Busybox 1.20.2): unknown file type

piquemal michel michel_piquemal at yahoo.fr
Mon Jun 24 14:09:10 UTC 2013


HI Dietmar,

I did rebuilt the whole uclibc and toolchain with long file support: same result (see below the extended printf of stat structure): it's definitely an alignment issue.
Could that come from some GCC optimization? I've not set any in busybox config. It seems default buildroot toochain build has some GGC optimizations.

It really seems a related busybox issue (probably something in .config), since other own-applications I compiled work without issues: including those working with stat/lstat (through glob() for instance).

I could not upload cross-compiled uClibc on target, since if I touch the target's one in /lib (ram mapped), the target won't work anymore, and I can not build/flash a new firmware.



# busybox_dyn tar -cf toto.tar tst
tar: status=0 flags=1  statbuf.st_ino=117074 statbuf.st_mode=838
tar: sizeof(statbuf.st_ino)=4   offsetof(struct stat, st_mode)=20
device    : 0x1
inode     : 117074
mode      : 0x346
nlink     : 16877
uid       : 2
gid       : 0
rdev      : 0x0
size      : 0
blksize   : 0
blocks    : 4096
atime     : 796000001
mtime     : 796000001
ctime     : 796000001
tar: tst: unknown file type
tar: error exit delayed from previous errors

# busybox_stat tar -cf toto.tar tst

tar: status=0 flags=1  statbuf.st_ino=838 statbuf.st_mode=16877
tar: sizeof(statbuf.st_ino)=4   offsetof(struct stat, st_mode)=20
device    : 0x1
inode     : 838
mode      : 0x41ed
nlink     : 2
uid       : 0
gid       : 0
rdev      : 0x0
size      : 0
blksize   : 4096
blocks    : 0
atime     : 1372079482
mtime     : 1371975600
ctime     : 1371975600
tar: status=0 flags=1  statbuf.st_ino=861 statbuf.st_mode=33188
tar: sizeof(statbuf.st_ino)=4   offsetof(struct stat, st_mode)=20
device    : 0x1
inode     : 861
mode      : 0x81a4
nlink     : 1
uid       : 0
gid       : 0
rdev      : 0x0
size      : 0
blksize   : 4096
blocks    : 0
atime     : 1371975600
mtime     : 1371975600
ctime     : 1371975600
tar: status=0 flags=1  statbuf.st_ino=857 statbuf.st_mode=33188
tar: sizeof(statbuf.st_ino)=4   offsetof(struct stat, st_mode)=20
device    : 0x1
inode     : 857
mode      : 0x81a4
nlink     : 1
uid       : 0
gid       : 0
rdev      : 0x0
size      : 0
blksize   : 4096
blocks    : 0
atime     : 1371975596
mtime     : 1371975596
ctime     : 1371975596









----- Mail original -----
De : "dietmar.schindler at manroland-web.com" <dietmar.schindler at manroland-web.com>
À : 
Cc : busybox at busybox.net
Envoyé le : Lundi 24 juin 2013 14h36
Objet : AW: AW: AW: AW: Issue with tar (Busybox 1.20.2): unknown file type

> Von: piquemal michel [mailto:michel_piquemal at yahoo.fr]
> Gesendet: Montag, 24. Juni 2013 12:47
> ...
> Is there a way to check with which option target's uClibc has been built? Obviously I only
> have .so files on the target, so it's hard to know if it was built with LFS, or any other
> important option.
> My toolchain was build with default uClibc buildroot's options, so no LFS it seems.
> If there is a way to know which options my target's lib has, then I'll rebuild tools with
> corresponding ones for sure. Or if not, what should be the safest options then?

I meant the CONFIG_LFS option of busybox only... just a thought, whether this would have an impact, but probably not. (What config options uClibc might have, I don't know.)
Didn't you transfer a newly built libc to the target? Perhaps there was a misunderstanding: I wouldn't primarily have recommended re-building the whole toolchain, but the libc, and use the new one on the target.

> ----- Mail original -----
> De : "dietmar.schindler at manroland-web.com" <dietmar.schindler at manroland-web.com>
> À :
> Cc : busybox at busybox.net
> Envoyé le : Lundi 24 juin 2013 10h31
> Objet : AW: AW: AW: Issue with tar (Busybox 1.20.2): unknown file type
>
> > Von: piquemal michel [mailto:michel_piquemal at yahoo.fr]
> > Gesendet: Sonntag, 23. Juni 2013 09:40
> > ...
> > Did add printf (bb_error_msg) in libbb/recursive_action.c:recursive_action(), after
> > status = (follow ? stat : lstat)(fileName, &statbuf)
> >
> > bb_error_msg("status=%d flags=%x  statbuf.st_ino=%d statbuf.st_mode=%d", status, flags,
> > statbuf.st_ino, statbuf.st_mode);
> >
> > and compiled 2 versions: one static (that works), and one dynamic.
> >
> >
> > I tryied to tar tst directory (which contains 2 files) with the 2 compiled versions:
> >
> > # busybox_stat tar -cf toto.tar tst
> > tar: status=0 flags=1  statbuf.st_ino=838 statbuf.st_mode=16877
> > tar: status=0 flags=1  statbuf.st_ino=861 statbuf.st_mode=33188
> > tar: status=0 flags=1  statbuf.st_ino=857 statbuf.st_mode=33188
> >
> > # busybox_dyn tar -cf toto.tar tst
> >
> > tar: status=0 flags=1  statbuf.st_ino=0 statbuf.st_mode=838
> > tar: tst: unknown file type
> > tar: error exit delayed from previous errors
>
> Apparently there is a mismatch between the expected and the effective layout of "struct
> stat". Are you sure that when compiling busybox, the same (or a compatible) definition of
> "struct stat" was used as in the target library? You could also print "sizeof statbuf.st_ino"
> and "offsetof(struct stat, st_mode)" or a dump of the bytes in "statbuf". Or you could try if
> changing the option CONFIG_LFS makes any difference.
> Another approach: You wrote that the dynamic busybox works on your aboriginal system image;
> you could copy the shared object from there to your target.
________________________________________
manroland web systems GmbH -- Managing Director: Eckhard Hoerner-Marass
Registered Office: Augsburg -- Trade Register: AG Augsburg -- HRB-No. 26816 -- VAT: DE281389840

Confidentiality note:
This eMail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited. If you have received this eMail in error, then please delete this eMail.

! Please consider your environmental responsibility before printing this eMail
________________________________________
_______________________________________________
busybox mailing list
busybox at busybox.net
http://lists.busybox.net/mailman/listinfo/busybox 


More information about the busybox mailing list