Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Mar 2012 16:53:50 +0400
From:      Boris Samorodov <bsam@passap.ru>
To:        Tim Kientzle <tim@kientzle.com>
Cc:        freebsd-current@freebsd.org, Dimitry Andric <dim@freebsd.org>
Subject:   Re: /usr/bin/tar creates invalid lib file
Message-ID:  <4F6F155E.30902@passap.ru>
In-Reply-To: <4F34E618-DB66-464D-B5B2-900960D6C16B@kientzle.com>
References:  <4F6CD93D.70109@passap.ru> <4F6CEB1F.4040300@FreeBSD.org> <4F6D52DF.7080105@passap.ru> <4F34E618-DB66-464D-B5B2-900960D6C16B@kientzle.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On 24.03.2012 21:00, Tim Kientzle wrote:
>
> On Mar 23, 2012, at 9:51 PM, Boris Samorodov wrote:
>
>> On 24.03.2012 01:29, Dimitry Andric wrote:
>>> On 2012-03-23 21:12, Boris Samorodov wrote:
>>>> I'm not sure but it seems to me that the question is more about
>>>> -current that -ports.
>>>>
>>>> While updating devel/nspr I get this:
>>> ...
>>>> /usr/bin/strip: /usr/local/lib/libnspr4.so.1: File format not recognized
>>>
>>> It builds and installs fine here, both on i386 and amd64, using both gcc
>>> and clang.
>>>
>>> What is the output of: "file /usr/local/lib/libnspr4.so.1" on your
>>> system?
>>
>> I've done some steps to diagnose the case. Seems that /usr/bin/tar
>> does not create correct library:
>> -----
>> % file /usr/ports/devel/nspr/work/nspr-4.9/mozilla/nsprpub/build/dist/lib/../../pr/src/./libnspr4.so.1
>> /usr/ports/devel/nspr/work/nspr-4.9/mozilla/nsprpub/build/dist/lib/../../pr/src/./libnspr4.so.1: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), dynamically linked, not stripped
>> % file /usr/local/lib/libnspr4.so.1
>> /usr/local/lib/libnspr4.so.1: data
>> % hd -C /usr/local/lib/libnspr4.so.1
>> 00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
>> 00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
>> *
>> % tar --version
>> bsdtar 3.0.3 - libarchive 3.0.3
>> -----
>>
>> The library (/usr/local/lib/libnspr4.so.1) is created by the command:
>> -----
>> /usr/bin/tar -C /usr/ports/devel/nspr/work/nspr-4.9/mozilla/nsprpub/build/dist/lib --dereference -cf - . |  /usr/bin/tar -C /usr/local/lib -xof -
>> -----
>
> Can you send me the output of:
>
> tar -cvf /tmp/test.tar /usr/ports/devel/nspr/work/nspr-4.9/mozilla/nsprpub/build/dist/lib/../../pr/src/./libnspr4.so.1
>
> (A tar archive containing only that one source file.)
>
> This looks similar to a bug that we found in libarchive recently
> I didn't think that bug impacted FreeBSD, but I may have been
> wrong….  if it did, it will be obvious from the structure of the
> created archive.

The following file is extracted after tarring:
-----
% hd libnspr4.so.1
00000000  32 0a 30 0a 30 0a 32 34  31 39 37 31 0a 30 0a 00 
|2.0.0.241971.0..|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
|................|
*
00000200
-----

The tar file itself attached (3KB in length).

-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve

[-- Attachment #2 --]
ports/devel/nspr/work/nspr-4.9/mozilla/nsprpub/build/dist/lib/../../pr/src/./PaxHeader/libnspr4.so.1000755 000000 000000 00000000427 11733251051 033572 xustar00rootwheel000000 000000 usr30 mtime=1332564521.821752794
30 ctime=1332564521.822752434
30 atime=1332678793.212516812
22 GNU.sparse.major=1
22 GNU.sparse.minor=0
115 GNU.sparse.name=usr/ports/devel/nspr/work/nspr-4.9/mozilla/nsprpub/build/dist/lib/../../pr/src/./libnspr4.so.1
30 GNU.sparse.realsize=241971
devel/nspr/work/nspr-4.9/mozilla/nsprpub/build/dist/lib/../../pr/src/./GNUSparseFile/libnspr4.so.1000755 000000 000000 00000001000 11733251051 034214 0ustar00rootwheel000000 000000 usr/ports2
0
0
241971
0
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F6F155E.30902>