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

piquemal michel michel_piquemal at yahoo.fr
Thu Jun 20 21:03:10 UTC 2013


Hi Rob, Dietmar,

I finally and painfully found a way to build my own cross-compile toolchain based on uClibc 0.9.28 (was quite an effort, using older buildroot, patching stuff, etc...). I learnt a lot in that tedious process, it's a good thing I guess!!

I built few own sample apps, static and dynamic: they all work on target.

Then I gave busybox tar another chance as a dynamically-linked binary: same problem on target than when built with Aboriginal, same strace output!...
So I think we can pretty much eliminate the uClibc 0.9.28 & headers compatibility issue.
I double checked both libc.so (toolchain, and target) have lstat exported.

I can't tell for sure its' a busbox-only issue at this stage, but one of my own app that uses glob() runs without ay issue on my target, using same toolchain.
I checked glob.c from uClibC calls into lstat, so this should prove lstat dynamic linking works.

Any idea about the possible reason for this lstat issue within tar applet according to strace?


Thanks!

PS I enclose my busybox .config file, in case there's something wrong inside.




----- Mail original -----
De : Rob Landley <rob at landley.net>
À : piquemal michel <michel_piquemal at yahoo.fr>
Cc : "dietmar.schindler at manroland-web.com" <dietmar.schindler at manroland-web.com>; "busybox at busybox.net" <busybox at busybox.net>
Envoyé le : Dimanche 16 juin 2013 9h06
Objet : Re: AW: Issue with tar (Busybox 1.20.2): unknown file type

On 06/13/2013 01:24:41 PM, piquemal michel wrote:
> Thanks Rob,
> 
> Indeed static linking works great, but BB tar-gzip binary is about  
> 120K whereas only 60k dynamic: it makes some meaningful difference to  
> install my target which has quite limited flash storage.
> 
> I was wondering if within current Aboriginal, I could build BB (and  
> other projects) using earlier .h from uClibc and kernel, and link  
> with that older uClibc lib?
> Not sure if it's possible, how complex it might be.

You can probably build the old uClibc natively, but getting the  
toolchain to use it is sort of black magic. (Look at ccwrap.c in the  
aboriginal source if you want to go there.)

> Or... I need to find an alternate solution than tar-gzip (I need some
> compress/decompress SW) that would lead to a smaller static binary: I
> could not find so far... (zlib, miniz, ...). Any suggestion welcome.

You could build a tar without gzip support, use the existing busybox's  
gzip, and do something like:

   gunzip < filename | tar xv

Rob 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config_tgz
Type: application/octet-stream
Size: 31457 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20130620/2a673563/attachment-0001.obj>


More information about the busybox mailing list