Boost logo

Boost :

From: Richard Hadsell (hadsell_at_[hidden])
Date: 2002-03-26 13:59:31


I am trying to build the boost libraries with Compaq C++ V6.5-011 for Digital UNIX V4.0F. At the moment, I am only interested in the regex library. I had similar problems when building this library from a copy downloaded directly from John Maddock's web site.

(1) The archive library fails to build, because there are too many files in the template instantiation directory:

----
74% tools/build/jam_src/bin.digital/jam -sBOOST_ROOT=. -sTOOLS=tru64cxx65 -sBUILD=debug 
...patience...
...found 1369 targets...
...updating 234 targets...
tru64cxx65-C++-action libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/c_regex_traits.o 
tru64cxx65-C++-action libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/c_regex_traits_common.o 
... 
tru64cxx65-C++-action libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/wide_posix_api.o 
tru64cxx65-Archive-action libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/libboost_regex.a 
/bin/sh: /bin/ar: arg list too long
  rm -f libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/libboost_regex.a 
  ar r  libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/libboost_regex.a  libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/c_regex_traits.o libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/c_regex_traits_common.o libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/cpp_regex_traits.o libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/cregex.o libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/fileiter.o libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/posix_api.o libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/regex.o libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/regex_debug.o libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/regex_synch.o libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/w32_regex_traits.o libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/wide_posix_api.o  cxx_repository/*
...failed tru64cxx65-Archive-action libs/regex/build/bin/libboost_regex.a/tru64cxx65/debug/libboost_regex.a ...
----
The problem lies in the "cxx_repository/*" argument for ar.  I fixed the makefile in the non-Jam version of this library this way:
AR:= ar -cq
LIBNAME:= boost_regex
DIRNAME:= generic
LIBDIR:= $(DIRNAME)/$(LIBNAME)
IIDIR:= $(LIBDIR)/ptrepository
CXXFLAGS:= $(CXXFLAGS) -ptr $(IIDIR)
$(DIRNAME)/lib$(LIBNAME).a : $(ALL_O)
	rm -f $@
	$(AR) $@ $^
	@for i in $(shell ls -1 $(IIDIR)); \
	do \
		echo $(AR) $@ $(IIDIR)/$$i; \
		$(AR) $@ $(IIDIR)/$$i; \
	done
It takes a long time to add each instantiation with a separate call to 'ar', but it gets the job done.  If anyone knows a better way to handle this, I'm interested.  Meanwhile, the Jam rule for building an archive library needs a fix for this compiler.
(2) The default cxx_repository used by this compiler should be located in the build area for each version (debug, release, archive, shared, etc.) rather than in the boost root directory.  As each version gets built, it currently looks in the common repository and either gets confused or possibly adds a bunch of instantiations from a previous build into each successive library.  In my fix for the first problem, I used the -ptr option to relocate the template repository.
-- 
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 list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk