Re: [mini headsup] updating from 7.x to -CURRENT after lzma import

From: Kai Wang <kaiwang27_at_gmail.com>
Date: Sun, 16 May 2010 21:53:20 +0200
On Sun, May 16, 2010 at 11:36:29AM -0700, Tim Kientzle wrote:
> Xin LI wrote:
> > The recent lzma import has enabled libarchive's lzma support.  However,
> > it have come to our attention that building -HEAD on earlier FreeBSD
> > versions (specifically, 7.x after 700044 through 8.x before 800022) have
> > been broken.
> > 
> > The reason behind this is that 'make buildworld' will build a new ar(1)
> > binary which links to libarchive, causing build to break on these systems.
> 
> The following patch partially fixes this problem by just
> disabling all compression support in ar.  (There's definitely
> no gain in compressing static libraries unless ld can
> read them. ;-)

I agree compressed ar(1) archive is not so useful without a ld(1) can
read it. Also, the current ar(1) compression scheme is not well
designed... Inside the elftoolchain project we are planning to rework
the ar(1) compression part to make it only compress the member data
while leave the member header intact. If the archive is compressed
this way, ld(1) can still random access the archive members.  In order
to implement this compression scheme, we will probably need to use a
separate compressor since libarchive always compress the whole
archive/stream (if I undertand correctly). So if we are going down
this road, removing ar(1) libarchive compression bits right now would
not be a bad idea, in my opinion.

> I don't think this totally fixes the problem.  I'd
> appreciate if someone could try this and let me
> know how far you get.

We also need to remove the compression stuff in the write part.
I made a modified patch based on yours, it's available here:

  http://people.freebsd.org/~kaiw/ar.patch


Thanks,
Kai
Received on Sun May 16 2010 - 18:18:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:03 UTC