Boost logo

Boost Users :

From: Richard Hadsell (hadsell_at_[hidden])
Date: 2004-04-29 15:55:01


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

  rm -f bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/libboost_regex-tru-1_31.a
  ar r bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/libboost_regex-tru-1_31.a bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/c_regex_traits.o bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/c_regex_traits_common.o bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/cpp_regex_traits.o bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/cregex.o bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/fileiter.o bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/posix_api.o bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/regex.o bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/regex_debug.o bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/regex_synch.o bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/w32_regex_traits.o bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/wide_posix_api.o bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/insta
nces.o bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/winstances.o "bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release"/cxx_repository/*

...failed tru64cxx65-Archive-action bin/boost/libs/regex/build/libboost_regex.a/tru64cxx65/release/libboost_regex-tru-1_31.a...

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?

-- 
Dick Hadsell			914-259-6320  Fax: 914-259-6499
Reply-to:			hadsell_at_[hidden]
Blue Sky Studios                http://www.blueskystudios.com
44 South Broadway, White Plains, NY 10601

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