Boost logo

Boost Users :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2004-04-29 16:21:12


Richard Hadsell wrote:

> Having persuaded everything to compile in the 1.31.0 Regex library, it
> runs into another problem in building the .a archive libraries:
>
> tru64cxx65-Archive-action
> bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/libboost_regex-tru-1_31.a
>
> /bin/sh: /bin/ar: arg list too long

[snip]

> The problem is due to the number of instantiations in the template
> repository and the lengths of their names. There are 492
> instantiations, and many of them have 90-character file names, which
> looks like the compiler's maximum allowed.
>
> I solved the problem in previous versions of boost by breaking up the
> build into separate steps. This was the way I modified the make file:
>
> AR:= ar -cq
> IIDIR:= $(LIBDIR)/cxx_repository
>
> $(DIRNAME)/lib$(LIBNAME).a : $(ALL_O)
> @echo "*** creating lib$(LIBNAME).a"
> rm -f $@
> $(AR) $@ $^
> @echo "*** adding template instantiations"
> $(AR) $@ $(IIDIR)/[_A-Z]*
> $(AR) $@ $(IIDIR)/[a-z]*
>
>
> It builds the library from just the object files and then adds the
> instantiations in two steps. (Apparently, adding all of them exceeded
> the same shell arg list limit.)
>
> How can I do something equivalent with bjam to build the library?

Solving this will require changing the archive action in the
tru64cxx65-tools.jam file. The most generic way I can think of is to
change it to something like so:

actions updated together piecemeal tru64cxx65-Archive-action
{
   rm -f $(<)
   ar r$(ARFLAGS) $(<) $(>)
   for i in "$(<[1]:D)"/cxx_repository/* ; do ar r$(ARFLAGS) $(<) $i ; done
}

Tell me what works for you and I'll update the toolset in CVS.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net