On Mon, 2005-01-17 at 07:02, Graham Leggett wrote: > Very weird: > > bash-2.03$ ar -tv /udd001/app/spread/usr/lib/libapr-0.a > rw-r--r-- 501/ 501 12156 Dec 21 13:42 2004 #1 > rw-r--r-- 501/ 501 4860 Dec 21 13:41 2004 apr_cpystrn.o > rw-r--r-- 501/ 501 5352 Dec 21 13:41 2004 apr_fnmatch.o > rw-r--r-- 501/ 501 30852 Dec 21 13:41 2004 apr_snprintf.o > rw-r--r-- 501/ 501 10008 Dec 21 13:41 2004 apr_strings.o > rw-r--r-- 501/ 501 5204 Dec 21 13:41 2004 apr_strnatcmp.o > [snip] > > Is the file #1 supposed to be there? I assume not, thus the message > "archive subfile #1 is a file of unknown type". Anyone know what could > have caused this file?
The ar file format permits only 15 characters per file name in its file header. To get around this, on BSD type implementations of ar, the special file name "#1/" followed by a sequence of digits ([0-9]*) indicates that the long file name occurs immediately after the file header (but before the file content) and its length is given by the sequence of digits. Since all short file names are terminated with a slash, here's what I expect is going on: 1. The archive was created with a BSD style "ar" implementation and the first member has a long (>15 chars) file name. 2. The archive is being read with an SVR4 style "ar" which doesn't grok the #1/[0-9]* file name notation. Consequently it is reading the #1 as a file name and stopping at the /. Either that or the archive header of the first member is corrupt. Here's some more details: SVR4 Format: http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/files/aixfiles/ar_IA64.htm BSD Format: http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/ar.5.html Hope that helps. Reid Spencer.
signature.asc
Description: This is a digitally signed message part
