Boost logo

Boost Users :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2004-04-30 11:31:18


Richard Hadsell wrote in a first mail:

> When the build gets to this point:
>
> tru64cxx65-C++-action bin/boost/libs/regex/build/libboost_regex.so/tru64cxx65/release/cregex.o
>
> it hangs. I have run into this situation with other large files, and my usual remedy is to decrease the optimization level.

and in a second mail:

> 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>

You might want to try the appended tools file for true64cxx65. I
recently started to use boost on this platform and this is what I have
come up with so far.

These were the major issues with the toolset description:

- The "flags tru64cxx65 CFLAGS <inlining>full : -inline all ;" hangs the
compiler when compiling with full inlining. Leaving this at the default
value solves the problem.

- The command line for the archive action exceeds its maximum length
when used with certain libs. On recommendation from Ralf
Grosse-Kunstleve I removed the whole cxx repository stuff and added
"-tlocal" to the C++ compiler options. This avoids the need for
repositories completely.

- The Cc-action was refering to a non existant cxx-Cc-action.

- The use of "-std strict_ansi -nopure_cname" was causing all kinds of
troubles for me. I replaced that with "-D__USE_STD_IOSTREAM
-nousing_std" which seems to work far better.

Maybe the maintainers should consider to replace the current toolset
with the one attached.

There are other issues to be aware of:

- When compiling boost you will see several warnings (and one error!)
about the use of assert on pointer types. These are caused by a bug in
the system header files which force the argument for assert() to int.
This can be fixed by editing the header file "/usr/include/assert.h".

- When the macro _XOPEN_SOURCE is defined to something greater or equal
to 500, you will encounter errors when compiling code which involes
iostreams because of a bug in the iotraits header file. This happended
to me when compiling boost.python because python forces the
_XOPEN_SOURCE to 600. You need to fix the iotraits header file for this.

- There are several statements in the form of

# if (defined(__DECCXX_VER) && __DECCXX_VER <= 60590031)

sprincled through boost to work around compiler deficencies. As we are
using 60590040 I patched these to the new revision number. I didn't
check if the bugs were fixed in the compiler but you might want to do
the same.

Thats all I can remember off the top of my head. I did some tweaking to
the boost.python source but that might not be necessary for you.

HTH, Markus


# (C) Copyright David Abrahams 2001. Permission to copy, use,
# modify, sell and distribute this software is granted provided this
# copyright notice appears in all copies. This software is provided
# "as is" without express or implied warranty, and with no claim as
# to its suitability for any purpose.

#
# Jam tools information for :
# Compaq Alpha CXX compiler
#

# No static linking as far as I can tell.
# flags cxx LINKFLAGS <runtime-link>static : -bstatic ;
flags cxx CFLAGS <debug-symbols>on : -g ;
flags tru64cxx65 LINKFLAGS <debug-symbols>on : -g ;
flags tru64cxx65 LINKFLAGS <debug-symbols>off : -s ;
flags tru64cxx65 LINKFLAGS <target-type>$(SHARED_TYPES) : -shared -expect_unresolved 'Py*' -expect_unresolved '_Py*' ;
flags tru64cxx65 CFLAGS <optimization>off : -O0 ;
flags tru64cxx65 CFLAGS <optimization>speed/<inlining>on : -O2 ;
flags tru64cxx65 CFLAGS <optimization>speed : -O2 ;

# Added for threading support
flags tru64cxx65 CFLAGS <threading>multi : -pthread ;
flags tru64cxx65 LINKFLAGS <threading>multi : -pthread ;

flags tru64cxx65 CFLAGS <optimization>space/<inlining>on : <inlining>size ;
flags tru64cxx65 CFLAGS <optimization>space : -O1 ;
flags tru64cxx65 CFLAGS <inlining>off : -inline none ;
#flags tru64cxx65 CFLAGS <inlining>full : -inline all ;

flags tru64cxx65 CFLAGS <profiling>on : -pg ;
flags tru64cxx65 LINKFLAGS <profiling>on : -pg ;

flags tru64cxx65 CFLAGS <cflags> ;
flags tru64cxx65 C++FLAGS <cxxflags> ;
flags tru64cxx65 DEFINES <define> ;
flags tru64cxx65 UNDEFS <undef> ;
flags tru64cxx65 HDRS <include> ;
flags tru64cxx65 STDHDRS <sysinclude> ;
flags tru64cxx65 LINKFLAGS <linkflags> ;
flags tru64cxx65 ARFLAGS <arflags> ;

if ! $(ARFLAGS)
{
    flags tru64cxx65 ARFLAGS : "" ;
}

#### Link ####

rule Link-action ( target : sources + : target-type )
{
   tru64cxx65-Link-action $(target) : $(sources) ;
}

# for tru64cxx, we repeat all libraries so that dependencies are always resolved
actions tru64cxx65-Link-action bind NEEDLIBS
{
   cxx -noimplicit_include $(LINKFLAGS) -o "$(<)" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) -lrt -lm
}

actions tru64cxx65-Link-shared bind NEEDLIBS
{
    cxx -qrtti -noimplicit_include $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) -lm
}

#### Cc #####

rule Cc-action
{
   tru64cxx65-Cc-action $(<) : $(>) ;
}

actions tru64cxx65-Cc-action
{
   cc -std1 -msg_display_number -msg-disable 186,450,1115 -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
}

#### C++ ####
rule C++-action
{
   tru64cxx65-C++-action $(<) : $(>) ;
}

# Note: DON'T disable warning 1133 -- the compiler is buggy and you
# really can't ignore this one!
actions tru64cxx65-C++-action
{
   cxx -tlocal -noimplicit_include -c -D__USE_STD_IOSTREAM -nousing_std -msg_display_number -msg_disable 186,450,1115 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
}

#### Archive ####

rule Archive-action
{
  tru64cxx65-Archive-action $(<) : $(>) ;
}

actions updated together piecemeal tru64cxx65-Archive-action
{
  rm -f $(<)
  ar r$(ARFLAGS) $(<) $(>)
}


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