Hi, I'm trying to build boost (1.32.0) on an IBM SP2 under AIX5, using the 64-bit ABI. This is troublesome. I do: bjam "-sTOOLS=gcc" "-sGXX=g++ -maix64 -pthread" --prefix=$HOME --libdir=$HOME/lib64-gcc --includedir=$HOME/include-gcc install But it doesn't work. I get loads of errors like: gcc-Link-action bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true/libboost_date_time-gcc-d-1_32.so ld: 0711-738 ERROR: Input file bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true/greg_month.o: XCOFF32 object files are not allowed in 64-bit mode. collect2: ld returned 8 exit status set -e LIBPATH=bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true:$LIBPATH export LIBPATH "g++" -maix64 -pthread -g -fPIC -shared -o "bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true/libboost_date_time-gcc-d-1_32.so" "bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true/greg_month.o" "bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true/greg_weekday.o" "bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true/date_generators.o" ...failed gcc-Link-action bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true/libboost_date_time-gcc-d-1_32.so... ...skipped <@boost!lib64-gcc>libboost_date_time-gcc-d-1_32.so for lack of <@boost!libs!date_time!build/libboost_date_time.so/gcc/debug/shared-linkable-true>libboost_date_time-gcc-d-1_32.so... It seems it's using -maix64 ok when trying to build the library, but not when compiling... Can anyone tell me what the proper way of building boost under these conditions are? Thanks, /Patrik Jonsson
On Mon, 23 May 2005 22:38:25 -0700, Patrik Jonsson wrote:
Hi, I'm trying to build boost (1.32.0) on an IBM SP2 under AIX5, using the 64-bit ABI. This is troublesome. I do:
bjam "-sTOOLS=gcc" "-sGXX=g++ -maix64 -pthread" --prefix=$HOME --libdir=$HOME/lib64-gcc --includedir=$HOME/include-gcc install
But it doesn't work. I get loads of errors like:
gcc-Link-action bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true/libboost_date_time-gcc-d-1_32.so ld: 0711-738 ERROR: Input file bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true/greg_month.o: XCOFF32 object files are not allowed in 64-bit mode. collect2: ld returned 8 exit status
set -e
LIBPATH=bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true:$LIBPATH
export LIBPATH "g++" -maix64 -pthread -g -fPIC -shared -o "bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true/libboost_date_time-gcc-d-1_32.so" "bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true/greg_month.o" "bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true/greg_weekday.o" "bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true/date_generators.o"
...failed gcc-Link-action bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/shared-linkable-true/libboost_date_time-gcc-d-1_32.so... ...skipped <@boost!lib64-gcc>libboost_date_time-gcc-d-1_32.so for lack of <@boost!libs!date_time!build/libboost_date_time.so/gcc/debug/shared-linkable-true>libboost_date_time-gcc-d-1_32.so...
It seems it's using -maix64 ok when trying to build the library, but not when compiling... Can anyone tell me what the proper way of building boost under these conditions are?
Thanks,
/Patrik Jonsson
When you attempted to build the library, were there several 'gcc-C++-action' statements before the 'gcc-Link-action' statements? The messages above make it appear as if the compiling step was skipped. You could try using the '-a' option. It will force everything to be recompiled. Bart
Bart <bartmann.nsd@gmail.com> writes:
When you attempted to build the library, were there several 'gcc-C++-action' statements before the 'gcc-Link-action' statements?
The messages above make it appear as if the compiling step was skipped.
I don't think so; those were only a selection of the messages, not meant to be a complete dump. It seems clear to me that the command used to do the compilation, g++ ...whatever... is generating XCOFF32 object files, either because the g++ in the path is the wrong one, or because we ought to be passing some special flag to make it generate 64-bit object files. I don't see any architecture called "IBM SP2," as Patrik said he was targeting, at http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/, but I guess that -maix64 must be supported despite not being documented (Patrik, you should report that as a GCC bug!) Patrik, in order to address this, we (and thus you) will have to know what the proper compiler options are for targeting your platform. I suggest you pass "-odump.txt" as the first argument to bjam and look at the resulting "dump.txt" file to make sure the command-lines look right. Also, I guess you're not the only one who's had this problem: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10815. I suggest you read through that record --- I hope you'll either find the info we need there, or it will tell you that you have a buggy gcc toolset and need to upgrade. To the Boost.Build guys: should we be doing something explicit in gcc-tools.jam (and gcc.jam for v2) to support this architecture? Cheers, Dave -- Dave Abrahams Boost Consulting www.boost-consulting.com
David Abrahams wrote:
I don't think so; those were only a selection of the messages, not meant to be a complete dump.
It seems clear to me that the command used to do the compilation,
g++ ...whatever...
is generating XCOFF32 object files, either because the g++ in the path is the wrong one, or because we ought to be passing some special flag to make it generate 64-bit object files.
Yes. That flag is "-maix64", and it works.
I don't see any architecture called "IBM SP2," as Patrik said he was targeting, at http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/, but I guess that -maix64 must be supported despite not being documented (Patrik, you should report that as a GCC bug!)
No, it's in there. The architecture is "PowerPC and RS/6000".
Patrik, in order to address this, we (and thus you) will have to know what the proper compiler options are for targeting your platform. I suggest you pass "-odump.txt" as the first argument to bjam and look at the resulting "dump.txt" file to make sure the command-lines look
Thanks for the -o option, that made things easier to debug. I think I've got it mostly working now (with gcc 3.4, with 3.2 it fails with strange pthread errors), using the command bjam -a "-sTOOLS=gcc" "-sBUILD=<cxxflags>-maix64 <linkflags>-maix64 <arflags>-X 64" --prefix=$HOME --libdir=$HOME/lib64-gcc --includedir=$HOME/include-gcc install This seems to build most of the shared libraries, but some things won't build under 64-bit (see below). However, the <arflags> doesn't work. The resulting ar command looks something like "/usr/bin/ar" ru-X "bin/boost/libs/filesystem/build/libboost_filesystem.a/ gcc/64/libboost_filesystem-gcc-1_32.a" "bin/boost/libs/filesystem/build/libboos t_filesystem.a/gcc/64/exception.o" "bin/boost/libs/filesystem/build/libboost_fil esystem.a/gcc/64/operations_posix_windows.o" "bin/boost/libs/filesystem/build/li bboost_filesystem.a/gcc/64/path_posix_windows.o" "bin/boost/libs/filesystem/buil d/libboost_filesystem.a/gcc/64/convenience.o" The correct command line to get ar to process 64-bit files is "ar -X 64 ru ...". The -X option is put in the wrong place, and the 64 ended up completely wrong. I don't know how to specify this. One solution would be to replace "ar" with "ar -X 64", which I tried to do (on a hunch> with "<ar>ar -X 64" but that did no good either. Perhaps someone could tell me how to do this? Now, about the compiler errors: When compiling the python library, I'm getting gcc-C++-action bin/boost/libs/python/build/libboost_python.so/gcc/debug/shared-linkable-true/numeric.o In file included from /usr/common/usg/python/2.3.2/include/python2.3/Python.h:48, from /scratch/scratchdirs/patrik/boost_1_32_0/boost/python/detail/wrap_python.hpp:121, from /scratch/scratchdirs/patrik/boost_1_32_0/boost/python/detail/prefix.hpp:13, from /scratch/scratchdirs/patrik/boost_1_32_0/boost/python/numeric.hpp:8, from /scratch/scratchdirs/patrik/boost_1_32_0/libs/python/build/../src/numeric.cpp:6: /usr/common/usg/python/2.3.2/include/python2.3/pyport.h:554:2: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." set -e "g++" -c -Wall -ftemplate-depth-255 -DBOOST_PYTHON_DYNAMIC_LIB -DBOOST_PYTHON_SOURCE -g -O0 -fno-inline -fPIC -maix64 -I"bin/boost/libs/python/build" -I "/usr/common/usg/python/2.3.2/include/python2.3" -I "/scratch/scratchdirs/patrik/boost_1_32_0" -o "bin/boost/libs/python/build/libboost_python.so/gcc/debug/shared-linkable-true/numeric.o" "/scratch/scratchdirs/patrik/boost_1_32_0/libs/python/build/../src/numeric.cpp" ...failed gcc-C++-action bin/boost/libs/python/build/libboost_python.so/gcc/debug/shared-linkable-true/numeric.o... gcc-C++-action bin/boost/libs/python/build/libboost_python.so/gcc/debug/shared-linkable-true/list.o In file included from /usr/common/usg/python/2.3.2/include/python2.3/Python.h:48, from /scratch/scratchdirs/patrik/boost_1_32_0/boost/python/detail/wrap_python.hpp:121, from /scratch/scratchdirs/patrik/boost_1_32_0/boost/python/detail/prefix.hpp:13, from /scratch/scratchdirs/patrik/boost_1_32_0/boost/python/list.hpp:8, from /scratch/scratchdirs/patrik/boost_1_32_0/libs/python/build/../src/list.cpp:5: /usr/common/usg/python/2.3.2/include/python2.3/pyport.h:554:2: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." Could this be because the 64-bit option has changed the lengths of some types? I don't know what LONG_BIT does, but it's 32 in 32-bit mode and 64 in 64-bit mode. sizeof(long) is 8, but SIZEOF_LONG=4 in pyconfig.h. Maybe this is all because python was compiled as 32-bit and that means the python interface stuff won't work under 64-bit? Anyway, if that's the only thing that doesn't work, I'll be happy... In general, it seems it would make sense to have dedicated functionality to switch between 32 and 64-bit ABI on machines where this makes sense, especially since I guess this now affects AMD Athlon64 machines and not just us fringe RS/6000 users... ;-) /Patrik
Patrik Jonsson <patrik@ucolick.org> writes:
Thanks for the -o option, that made things easier to debug. I think I've got it mostly working now (with gcc 3.4, with 3.2 it fails with strange pthread errors), using the command
bjam -a "-sTOOLS=gcc" "-sBUILD=<cxxflags>-maix64 <linkflags>-maix64 <arflags>-X 64" --prefix=$HOME --libdir=$HOME/lib64-gcc --includedir=$HOME/include-gcc install
This seems to build most of the shared libraries, but some things won't build under 64-bit (see below). However, the <arflags> doesn't work. The resulting ar command looks something like
"/usr/bin/ar" ru-X "bin/boost/libs/filesystem/build/libboost_filesystem.a/ gcc/64/libboost_filesystem-gcc-1_32.a" "bin/boost/libs/filesystem/build/libboos t_filesystem.a/gcc/64/exception.o" "bin/boost/libs/filesystem/build/libboost_fil esystem.a/gcc/64/operations_posix_windows.o" "bin/boost/libs/filesystem/build/li bboost_filesystem.a/gcc/64/path_posix_windows.o" "bin/boost/libs/filesystem/buil d/libboost_filesystem.a/gcc/64/convenience.o"
Hm. Rene, this one's your line: 1.87 (grafik 05-Mar-04): "$(.AR[1])" ru$(ARFLAGS:J=) "$(<)" "$(>)" Do you know what's going on?
The correct command line to get ar to process 64-bit files is "ar -X 64 ru ...". The -X option is put in the wrong place, and the 64 ended up completely wrong. I don't know how to specify this.
Actually I think you need to do <arflags>-X <arflags>64 if you want it to work.
Now, about the compiler errors: When compiling the python library, I'm getting
gcc-C++-action bin/boost/libs/python/build/libboost_python.so/gcc/debug/shared-linkable-true/numeric.o In file included from /usr/common/usg/python/2.3.2/include/python2.3/Python.h:48, from /scratch/scratchdirs/patrik/boost_1_32_0/boost/python/detail/wrap_python.hpp:121, from /scratch/scratchdirs/patrik/boost_1_32_0/boost/python/detail/prefix.hpp:13, from /scratch/scratchdirs/patrik/boost_1_32_0/boost/python/numeric.hpp:8, from /scratch/scratchdirs/patrik/boost_1_32_0/libs/python/build/../src/numeric.cpp:6: /usr/common/usg/python/2.3.2/include/python2.3/pyport.h:554:2: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
set -e "g++" -c -Wall -ftemplate-depth-255 -DBOOST_PYTHON_DYNAMIC_LIB -DBOOST_PYTHON_SOURCE -g -O0 -fno-inline -fPIC -maix64 -I"bin/boost/libs/python/build" -I "/usr/common/usg/python/2.3.2/include/python2.3" -I "/scratch/scratchdirs/patrik/boost_1_32_0" -o "bin/boost/libs/python/build/libboost_python.so/gcc/debug/shared-linkable-true/numeric.o" "/scratch/scratchdirs/patrik/boost_1_32_0/libs/python/build/../src/numeric.cpp"
...failed gcc-C++-action bin/boost/libs/python/build/libboost_python.so/gcc/debug/shared-linkable-true/numeric.o... gcc-C++-action bin/boost/libs/python/build/libboost_python.so/gcc/debug/shared-linkable-true/list.o In file included from /usr/common/usg/python/2.3.2/include/python2.3/Python.h:48, from /scratch/scratchdirs/patrik/boost_1_32_0/boost/python/detail/wrap_python.hpp:121, from /scratch/scratchdirs/patrik/boost_1_32_0/boost/python/detail/prefix.hpp:13, from /scratch/scratchdirs/patrik/boost_1_32_0/boost/python/list.hpp:8, from /scratch/scratchdirs/patrik/boost_1_32_0/libs/python/build/../src/list.cpp:5: /usr/common/usg/python/2.3.2/include/python2.3/pyport.h:554:2: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
Could this be because the 64-bit option has changed the lengths of some types?
Could be, but normally this is because we've semehow failed to #include Python.h header before the standard header that defines LONG_BIT.
I don't know what LONG_BIT does, but it's 32 in 32-bit mode and 64 in 64-bit mode.
Tells you how many bits are in a long.
sizeof(long) is 8, but SIZEOF_LONG=4 in pyconfig.h.
Ah, that looks like your problem right there.
Maybe this is all because python was compiled as 32-bit and that means the python interface stuff won't work under 64-bit?
Sounds like it.
Anyway, if that's the only thing that doesn't work, I'll be happy...
In general, it seems it would make sense to have dedicated functionality to switch between 32 and 64-bit ABI on machines where this makes sense, especially since I guess this now affects AMD Athlon64 machines and not just us fringe RS/6000 users... ;-)
Well, we do have <address-model>64 -- Dave Abrahams Boost Consulting www.boost-consulting.com
David Abrahams wrote:
Patrik Jonsson <patrik@ucolick.org> writes:
Thanks for the -o option, that made things easier to debug. I think I've got it mostly working now (with gcc 3.4, with 3.2 it fails with strange pthread errors), using the command
bjam -a "-sTOOLS=gcc" "-sBUILD=<cxxflags>-maix64 <linkflags>-maix64 <arflags>-X 64" --prefix=$HOME --libdir=$HOME/lib64-gcc --includedir=$HOME/include-gcc install
This seems to build most of the shared libraries, but some things won't build under 64-bit (see below). However, the <arflags> doesn't work. The
Hm. Rene, this one's your line:
1.87 (grafik 05-Mar-04): "$(.AR[1])" ru$(ARFLAGS:J=) "$(<)" "$(>)"
Do you know what's going on?
It's the bjam "variable space split" behavior causing the -sBUILD to be split at an unintended place. By the way it's fairly easy to add support for this as we already support some of the other platform related options for gcc. For example doing: bjam ... "-sBUILD=<architecture>power/<address-model>64" Would give you the "-mpower64" option in most of the commands. Just need to know what the eventual complete commands are :-) But it's looks like I can get that from this post.
The correct command line to get ar to process 64-bit files is "ar -X 64 ru ...". The -X option is put in the wrong place, and the 64 ended up completely wrong. I don't know how to specify this.
Actually I think you need to do
<arflags>-X <arflags>64
if you want it to work.
Unfortunately, wouldn't work :-( The current gcc/ar invocation assumes that all the ar flags should come together as one argument. So it would end up with "ar ru-X64 ...". The gcc toolset needs to change to support options that are not part of the "ru.." command arg.
In general, it seems it would make sense to have dedicated functionality to switch between 32 and 64-bit ABI on machines where this makes sense, especially since I guess this now affects AMD Athlon64 machines and not just us fringe RS/6000 users... ;-)
Well, we do have <address-model>64
Yep.. And it was intended exactly for this situation.. Just didn't have anyone that actually exercised this until now. Well at least no one complained until now ;-) OK.. I've made some changes that will hopefully handle this particular situation. Patrik if you want to try them out, the two files that you need to replace are attached. Just put them into the */tools/build/v1 directory. And to get the functionality you need to invoke bjam something like: bjam ... "-sBUILD=<architecture>power/<address-model>64/<object-model>aix" ... Tell me if it works for you so I can commit the changes to CVS (for the next release). -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org #~ Copyright David Abrahams 2001. #~ Copyright Rene Rivera 2004. #~ Distributed under the Boost Software License, Version 1.0. #~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # A summary of features: # # - "feature" has a fixed list of values, of which the first is the default. # Affect link compatability. # # - "free-feature" has a variable or fixed list of values, default is empty. # Does not affect link compatability. # # - "path-feature" has a variable list of path values, default is empty. # Does not affect link compatability. # # - "dependency-feature" like "path-feature" but affects dependency rebuilds. # Profiling feature support by Toon Knapen <toon@si-lab.com>. feature profiling : off on ; # C/C++ alignment of structure members feature struct-alignment : auto 1 2 4 8 16 ; # Type of exceptions to use, Metrowerks/CodeWarrior only. feature eh-model : default fast msvc ; # ??, GCC only. feature vtable-thunks : default on off ; # Generate code to support, or not threading. feature threading : single multi ; # Link to the language runtime libraries as a shared object, or statically # link them into the produced object. feature runtime-link : dynamic static ; # Use either the debug or release versions of the language runtime, # when available. feature runtime-build : debug release ; # Compilation optimization level. feature optimization : off speed space ; # Inlining, "off" disables it, "on" enables with "inline" keywords, and # "full" enables it for specified functions and any others the compiler # deams inline-able. feature inlining : off on full ; # Generate and include debug symbol information. feature debug-symbols : on off ; # ??. free-feature debug-store : object database ; # What type of OS subsystem to target. Windows only. free-feature user-interface : console gui ; # ??. feature unicode-application : on off ; # Enable/disable exceptions. feature exception-handling : on off ; # Enable/disable C++ runtime type information. feature rtti : on off ; # Set the feature to "no" in order to skip the build of this target. # Useful to disable known non-working compilers or variants. feature build : yes no ; # ??. feature stdlib : "default" gcc stlport ; # Used to specify "default-BUILD" properties that will be used if not # overridden by the BUILD variable. free-feature "default" ; # Custom flags for the various build procedures. free-feature cflags ; free-feature linkflags ; free-feature cxxflags ; free-feature arflags ; # Preprocessor definitions. free-feature define ; # <define>PYTHON=foo free-feature undef ; # <undef>PYTHON=foo # Add a user include path (#include "x.h"). path-feature "include" ; # <include>../foo/bar/mumble # Add a system include path (#include <x.h>). path-feature sysinclude ; # <sysinclude>/fu/man/chu # Finding libraries needs a search path and a base library name. path-feature library-path ; free-feature find-library ; # Link in an external library file. dependency-feature library-file ; # The version of a shared object. <dllversion>1.27.0 (for use with soname-ing) free-feature dllversion ; # Add a name tag to a target, see Boost.Build documentation for details. free-feature tag ; # ??. free-feature version ; # Control warnings, to turn the on, off, how many, and which ones. # Values are toolset dependent, but the ones listed here must # be supported... # - "on", default has warnings enabled. # - "off", no warnings. # - "error", turn warnings into errors. # For toolsets that support it specifying a number # will limit the number of warnings produced. free-feature warnings ; # Control how many errors to tollerate. free-feature errors ; # Include file as prefix before all other includes. free-feature prefix ; # How to interpret relative paths in includes. # - "relative", as GCC search relative to inclusion point. # - "directory", relative to current directory. # - "source", realtive to original source file. # - "paths", only search given include and sysinclude paths. free-feature include-search : relative directory source paths ; # Can the target participate in a shared library? feature shared-linkable : false true ; # The addressing model to generate code for. # Currently a limited set only specifying the bit size of pointers. feature address-model : default 16 32 64 ; # Type of CPU architecture to compile for. feature architecture : # The default is the machine we are on, i.e. nothing native # x86 and compatible x86 # Sparc sparc # RS/6000 & PowerPC power # MIPS/SGI mips1 mips2 mips3 mips4 ; # The specific instruction set in an architecture to compile. feature instruction-set : # Default should probably always be the lowest common denominator. default # x86 and compatible i386 i486 i586 i686 pentium pentium-mmx pentiumpro pentium2 pentium3 pentium4 k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp # Sparc v7 cypress v8 supersparc sparclite hypersparc sparclite86x f930 f934 sparclet tsc701 v9 ultrasparc # RS/6000 & PowerPC rios rios1 rsc rios2 rs64a 601 602 603 603e 604 604e 620 630 740 750 power power2 powerpc power64 403 505 801 821 823 860 power-common # MIPS r2000 r3000 r3900 r4000 r4100 r4300 r4400 r4600 r4650 r5000 r6000 r8000 orion ; # The object model the compiler uses when compiling C++ code. Currently only # relevant for Compaq C++ V6.3 and newer. feature object-model : # Use the default object model which works best for boost. This most # probably should be 'ansi' in all cases. default # Explicitly select the 'arm' object model. Used for backward compatible # binaries. arm # Explicitly select the 'ansi' object model. Used to support the complete # standard. ansi # AIX has it's own ABI, this is available with the gcc -maix32/64 options. aix ; gLINK_COMPATIBLE = <shared-linkable>true <target-type> <inlining> ; gALWAYS_RELEVANT = <target-type> <tag> <default> <build> ; ##### Requirements by target type ##### gTARGET_TYPE_REQUIREMENTS(DLL) = <shared-linkable>true ; ##### Variant definitions #### variant common : <vtable-thunks>default <struct-alignment>auto <eh-model>default <threading>single <unicode-application>off <exception-handling>on <rtti>on <shared-linkable>false <address-model>default <architecture>native <instruction-set>default <profiling>off <object-model>default ; variant debug : common : <debug-symbols>on <runtime-build>debug <optimization>off <inlining>off ; if $(NT) { variant debug-python : debug : <define>BOOST_DEBUG_PYTHON <gcc><define>Py_DEBUG ; } else { variant debug-python : debug : <define>BOOST_DEBUG_PYTHON <define>Py_DEBUG ; } variant release : common : <debug-symbols>off <runtime-build>release <optimization>speed <inlining>full <define>NDEBUG ; # Profiling variant by Toon Knapen <toon@si-lab.com> variant profile : release : <profiling>on <debug-symbols>on ; # Copyright (c) 2001 David Abrahams. # Copyright (c) 2002-2003 Rene Rivera. # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # The following #// line will be used by the regression test table generation # program as the column heading for HTML tables. Must not include version number. #//<a href="http://gcc.gnu.org/">GNU<br>GCC</a> # compute directories for invoking GCC # # The gcc toolset can be user-configured using the following # variables: # # GCC_ROOT_DIRECTORY # The directory in which GCC was installed. Defaults to # unset. Usually, there is no need to set this variable at # all. However, if G++ is not in the path it is usually # sufficient to configure this one variable. More fine-grained # configuration is available by setting the following: # # GCC_BIN_DIRECTORY # the directory prefix used to find the gcc executables. Defaults to # $(GCC_ROOT_DIRECTORY)/bin/, or "" if GCC_ROOT_DIRECTORY is # not set. # # GCC_INCLUDE_DIRECTORY # the directory in which to find system includes. Defaults to # empty. # # GCC_STDLIB_DIRECTORY # the directory in which to find the standard library # objects associated with this build of gcc. Defaults to # $(GCC_ROOT_DIRECTORY)/lib. # # GXX # The name by which g++ is invoked. You can also use this in # lieu of setting the <cxxflags> property to force options such # as "-V3.0.4" into the g++ command line: "-sGXX=g++ -V3.0.4". # # GCC # Similar to GXX, the name by which gcc is invoked for "C" # language targets. # singleton variables... set-as-singleton GCC_ROOT_DIRECTORY GCC_BIN_DIRECTORY GCC_INCLUDE_DIRECTORY GCC_STDLIB_DIRECTORY ; flags gcc GCC_BIN_DIRECTORY : $(GCC_BIN_DIRECTORY) ; flags gcc GCC_INCLUDE_DIRECTORY : $(GCC_INCLUDE_DIRECTORY) ; flags gcc GCC_STDLIB_DIRECTORY : $(GCC_STDLIB_DIRECTORY) ; GCC_BIN_DIRECTORY ?= $(GCC_ROOT_DIRECTORY)$(SLASH)bin ; GCC_BIN_DIRECTORY ?= "" ; # Don't clobber tool names if GCC_ROOT_DIRECTORY not set GCC_STDLIB_DIRECTORY ?= $(GCC_ROOT_DIRECTORY)$(SLASH)lib ; # Make sure this gets set "on" the target flags gcc GCC_BIN_DIR : $(GCC_BIN_DIRECTORY) ; flags gcc LINKFLAGS <runtime-link>static : -static ; flags gcc CFLAGS <debug-symbols>on : -g ; flags gcc LINKFLAGS <debug-symbols>on : -g ; flags gcc CFLAGS <optimization>off : -O0 ; flags gcc CFLAGS <optimization>speed : -O3 ; # Other optimizations we might want for GCC # -fforce-mem -fomit-frame-pointer # -foptimize-sibling-calls -finline-functions -ffast-math -finline-limit=10000 flags gcc CFLAGS <optimization>space : -Os ; flags gcc CFLAGS <inlining>off : -fno-inline ; flags gcc CFLAGS <inlining>on : -Wno-inline ; flags gcc CFLAGS <inlining>full : -finline-functions -Wno-inline ; flags gcc .GXX : $(GXX) ; flags gcc .GCC : $(GCC) ; # # set threading options for various platforms: # local on-windows ; if $(NT) { on-windows = 1 ; } else if $(UNIX) { switch $(JAMUNAME) { case CYGWIN* : { on-windows = 1 ; } } } flags gcc ON_WINDOWS : $(on-windows) ; if $(on-windows) { flags gcc CFLAGS <threading>multi : -mthreads ; flags gcc LINKFLAGS <threading>multi : -mthreads ; } else if $(UNIX) { switch $(JAMUNAME) { case SunOS* : { flags gcc CFLAGS <threading>multi : -pthreads ; flags gcc LINKFLAGS <threading>multi : -pthreads ; flags gcc FINDLIBS <threading>multi : rt ; } case BeOS : { # BeOS has no threading options, don't set anything here. } case Darwin : { # MacOS X, doesn't need any threading options set # -lpthread is linked to by default. # There is no gcc/g++, we need to use cc/c++ instead: .GCC ?= cc ; .GXX ?= c++ ; } case *BSD : { flags gcc CFLAGS <threading>multi : -pthread ; flags gcc LINKFLAGS <threading>multi : -pthread ; # there is no -lrt on BSD } case DragonFly : { flags gcc CFLAGS <threading>multi : -pthread ; flags gcc LINKFLAGS <threading>multi : -pthread ; # there is no -lrt on BSD - DragonFly is a FreeBSD variant, # which anoyingly doesn't say it's a *BSD. } case IRIX : { # gcc on IRIX does not support multi-threading, don't set anything here. } case HP_UX : { # gcc on HP-UX does not support multi-threading, don't set anything here } case * : { flags gcc CFLAGS <threading>multi : -pthread ; flags gcc LINKFLAGS <threading>multi : -pthread ; flags gcc FINDLIBS <threading>multi : rt ; } } } # Some possibly supported, or not, linker flags. The support depends on the OS linker. # flags gcc RPATH_LINK ; flags gcc SONAME ; # Set/reset options for the linker of the platform. # if $(UNIX) { switch $(JAMUNAME) { case SunOS* : { NO_GNU_LN = true ; # sun seems not to use the GNU linker with gcc flags gcc OBJCOPY_FLAGS <debug-symbols>on : "--set-section-flags .debug_str=contents" ; } case Linux : { RPATH_LINK = -Wl,-rpath-link, ; SONAME = -Wl,-soname, ; flags gcc OBJCOPY_FLAGS <debug-symbols>on : "--set-section-flags .debug_str=contents,debug" ; } case OpenBSD : { SONAME = -Wl,-soname, ; } case AIX* : { NO_GNU_LN = true ; IMPLIB_FLAGS = "-Wl,-bI:" ; } } } # Set architecture/instruction-set options. # # x86 and compatible .ARCH = <architecture>x86 <architecture>native ; flags gcc CFLAGS <architecture>x86/<instruction-set>default : -mcpu=i386 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>i386 : -mcpu=i386 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>i486 : -mcpu=i486 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>i586 : -mcpu=i586 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>i686 : -mcpu=i686 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>pentium : -mcpu=pentium ; flags gcc CFLAGS $(.ARCH)/<instruction-set>pentium-mmx : -mcpu=pentium-mmx ; flags gcc CFLAGS $(.ARCH)/<instruction-set>pentiumpro : -mcpu=pentiumpro ; flags gcc CFLAGS $(.ARCH)/<instruction-set>pentium2 : -mcpu=pentium2 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>pentium3 : -mcpu=pentium3 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>pentium4 : -mcpu=pentium4 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>k6 : -mcpu=k6 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>k6-2 : -mcpu=k6-2 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>k6-3 : -mcpu=k6-3 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>athlon : -mcpu=athlon ; flags gcc CFLAGS $(.ARCH)/<instruction-set>athlon-tbird : -mcpu=athlon-tbird ; flags gcc CFLAGS $(.ARCH)/<instruction-set>athlon-4 : -mcpu=athlon-4 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>athlon-xp : -mcpu=athlon-xp ; flags gcc CFLAGS $(.ARCH)/<instruction-set>athlon-mp : -mcpu=athlon-mp ; # Sparc .ARCH = <architecture>sparc <architecture>native ; flags gcc CFLAGS <architecture>sparc/<instruction-set>default : -mcpu=v7 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>v7 : -mcpu=v7 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>cypress : -mcpu=cypress ; flags gcc CFLAGS $(.ARCH)/<instruction-set>v8 : -mcpu=v8 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>supersparc : -mcpu=supersparc ; flags gcc CFLAGS $(.ARCH)/<instruction-set>sparclite : -mcpu=sparclite ; flags gcc CFLAGS $(.ARCH)/<instruction-set>hypersparc : -mcpu=hypersparc ; flags gcc CFLAGS $(.ARCH)/<instruction-set>sparclite86x : -mcpu=sparclite86x ; flags gcc CFLAGS $(.ARCH)/<instruction-set>f930 : -mcpu=f930 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>f934 : -mcpu=f934 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>sparclet : -mcpu=sparclet ; flags gcc CFLAGS $(.ARCH)/<instruction-set>tsc701 : -mcpu=tsc701 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>v9 : -mcpu=v9 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>ultrasparc : -mcpu=ultrasparc ; flags gcc CFLAGS <architecture>sparc/<address-model>64 : -m64 ; flags gcc LINKFLAGS <architecture>sparc/<address-model>64 : -m64 ; # RS/6000 & PowerPC .ARCH = <architecture>power <architecture>native ; flags gcc CFLAGS <architecture>power/<instruction-set>default : -mcpu=power ; flags gcc CFLAGS $(.ARCH)/<instruction-set>rios : -mcpu=rios ; flags gcc CFLAGS $(.ARCH)/<instruction-set>rios1 : -mcpu=rios1 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>rsc : -mcpu=rsc ; flags gcc CFLAGS $(.ARCH)/<instruction-set>rios2 : -mcpu=rios2 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>rs64a : -mcpu=rs64a ; flags gcc CFLAGS $(.ARCH)/<instruction-set>601 : -mcpu=601 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>602 : -mcpu=602 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>603 : -mcpu=603 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>603e : -mcpu=603e ; flags gcc CFLAGS $(.ARCH)/<instruction-set>604 : -mcpu=604 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>604e : -mcpu=604e ; flags gcc CFLAGS $(.ARCH)/<instruction-set>620 : -mcpu=620 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>630 : -mcpu=630 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>740 : -mcpu=740 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>750 : -mcpu=750 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>power : -mcpu=power ; flags gcc CFLAGS $(.ARCH)/<instruction-set>power2 : -mcpu=power2 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>powerpc : -mcpu=powerpc ; flags gcc CFLAGS $(.ARCH)/<instruction-set>power64 : -mcpu=power64 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>403 : -mcpu=403 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>505 : -mcpu=505 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>801 : -mcpu=801 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>821 : -mcpu=821 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>823 : -mcpu=823 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>860 : -mcpu=860 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>power-common : -mcpu=common ; flags gcc CFLAGS <architecture>power/<address-model>64 : -mpowerpc64 ; # AIX variant of RS/6000 & PowerPC flags gcc CFLAGS <architecture>power/<address-model>32/<object-model>aix : -maix32 ; flags gcc LINKFLAGS <architecture>power/<address-model>32/<object-model>aix : -maix32 ; flags gcc CFLAGS <architecture>power/<address-model>64/<object-model>aix : -maix64 ; flags gcc LINKFLAGS <architecture>power/<address-model>64/<object-model>aix : -maix64 ; flags gcc AROPTIONS <architecture>power/<address-model>64/<object-model>aix : "-X 64" ; # MIPS-1-2-3-4 flags gcc MIPS <architecture>mips1 <architecture>mips2 <architecture>mips3 <architecture>mips4 : TRUE ; flags gcc MIPS <instruction-set>r2000 <instruction-set>r3000 <instruction-set>r3900 <instruction-set>r4000 <instruction-set>r4100 <instruction-set>r4300 <instruction-set>r4400 <instruction-set>r4600 <instruction-set>r4650 <instruction-set>r5000 <instruction-set>r6000 <instruction-set>r8000 <instruction-set>orion : TRUE ; if $(MIPS) { flags gcc CFLAGS <architecture>mips1 : -mips1 ; flags gcc CFLAGS <architecture>mips2 : -mips2 ; flags gcc CFLAGS <architecture>mips3 : -mips3 ; flags gcc CFLAGS <architecture>mips4 : -mips4 ; flags gcc CFLAGS <instruction-set>r2000 : -mcpu=r2000 ; flags gcc CFLAGS <instruction-set>r3000 : -mcpu=r3000 ; flags gcc CFLAGS <instruction-set>r3900 : -mcpu=r3900 ; flags gcc CFLAGS <instruction-set>r4000 : -mcpu=r4000 ; flags gcc CFLAGS <instruction-set>r4100 : -mcpu=r4100 ; flags gcc CFLAGS <instruction-set>r4300 : -mcpu=r4300 ; flags gcc CFLAGS <instruction-set>r4400 : -mcpu=r4400 ; flags gcc CFLAGS <instruction-set>r4600 : -mcpu=r4600 ; flags gcc CFLAGS <instruction-set>r4650 : -mcpu=r4650 ; flags gcc CFLAGS <instruction-set>r5000 : -mcpu=r5000 ; flags gcc CFLAGS <instruction-set>r6000 : -mcpu=r6000 ; flags gcc CFLAGS <instruction-set>r8000 : -mcpu=r8000 ; flags gcc CFLAGS <instruction-set>orion : -mcpu=orion ; # ...addressing model options flags gcc ADDRESS_MODEL_INVALID <address-model>16 : TRUE ; if $(ADDRESS_MODEL_INVALID) { EXIT "Error: Invalid addressing model for MIPS architecture (16)." ; } flags gcc CFLAGS <address-model>default : -mgp32 ; flags gcc CFLAGS <address-model>32 : -mgp32 ; flags gcc CFLAGS <address-model>64 : -mgp64 -mlong64 ; } #S390 if $(OSPLAT) = 390 { flags gcc CFLAGS <threading>multi : -D_REENTRANT ; } # # define compiler names if not set: .GCC ?= gcc ; .GXX ?= g++ ; flags gcc CFLAGS <profiling>on : -pg ; flags gcc LINKFLAGS <profiling>on : -pg ; flags gcc C++FLAGS <rtti>off : -fno-rtti ; flags gcc C++FLAGS <vtable-thunks>on : -fvtable-thunks ; flags gcc C++FLAGS <vtable-thunks>off : -fvtable-thunks=0 ; flags gcc CFLAGS <cflags> ; flags gcc C++FLAGS <cxxflags> ; flags gcc DEFINES <define> ; flags gcc UNDEFS <undef> ; flags gcc HDRS <include> ; flags gcc SYSHDRS <sysinclude> ; flags gcc LINKFLAGS <linkflags> ; flags gcc LINKFLAGS <debug-symbols>off : -s ; flags gcc ARFLAGS <arflags> ; flags gcc STDHDRS : $(GCC_INCLUDE_DIRECTORY) ; flags gcc STDLIBPATH : $(GCC_STDLIB_DIRECTORY) ; if ! $(ARFLAGS) { flags gcc ARFLAGS : "" ; } if ! $(on-windows) # The compiler complains about -fPIC on NT { flags gcc CFLAGS <shared-linkable>true : -fPIC ; flags gcc LINKFLAGS <shared-linkable>true : -fPIC ; } if $(BETOOLS) { flags gcc LINKFLAGS <target-type>$(SHARED_TYPES) : -nostart ; } else { flags gcc LINKFLAGS <target-type>$(SHARED_TYPES) : -shared ; } flags gcc LIBPATH <library-path> ; flags gcc NEEDLIBS <library-file> ; flags gcc FINDLIBS <find-library> ; flags gcc DLLVERSION <dllversion> ; DLLVERSION = $(DLLVERSION[1]) ; DLLVERSION ?= $(BOOST_VERSION) ; flags gcc TARGET_TYPE <target-type> ; # allow for "ar" to be part of the compiler distribution, for # example in mingw and cygwin flags gcc .AR : [ GLOB $(GCC_BIN_DIRECTORY) $(PATH) : ar ar.exe ] ; .AR ?= ar ; # used to manipulate the object files produced by GCC to # prevent the merging of debug symbols (which happens to be n^2 slow) flags gcc .OBJCOPY : [ GLOB $(GCC_BIN_DIRECTORY) $(PATH) : objcopy ] ; if ! $(on-windows) { flags gcc .SET_EXIT : "set -e" ; } #### Link #### rule Link-action { _ on $(<) = " " ; # if we don't have a GNU linker then we can't pass any GNU-ld specific flags: if $(NO_GNU_LN) { LNOPT on $(<) = ; } else { LNOPT on $(<) = "" ; } # do we use sonames or not? if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && ( $(OS) = LINUX || $(OS) = OPENBSD ) && ! $(NO_GNU_LN) { OUTTAG on $(<) = ".$(DLLVERSION)" ; SOTAG on $(<) = ".$(DLLVERSION)" ; ACTION_1 on $(<) = "" ; } else { OUTTAG on $(<) = "" ; SOTAG on $(<) = ; ACTION_1 on $(<) = ; } if [ on $(<) return $(ON_WINDOWS) ] { # On Win32, choose different image bases for load-time efficiency DLL_LINK_FLAGS on $(<) += "-Wl,--enable-auto-image-base" ; } if $(<[2]) && [ on $(<) return $(ON_WINDOWS) ] { # Allow gcc-nocygwin to avoid this flag if ! $(GCC_NO_EXPORT_ALL) { DLL_LINK_FLAGS on $(<) += "-Wl,--export-all-symbols" ; } # This will appear before the import library name when building a DLL, but # will be "multiplied away" otherwise. The --exclude-symbols directive # proved to be necessary with some versions of Cygwin. DLL_LINK_FLAGS on $(<) += "-Wl,--exclude-symbols,_bss_end__:_bss_start__:_data_end__:_data_start__" ; # set the link command to generate an import library if ! $(NO_GNU_LN) { IMPLIB_COMMAND on $(<) = "-Wl,--out-implib," ; } } DEPENDS $(<) : $(NEEDLIBS) $(NEEDIMPS) ; gRUN_LD_LIBRARY_PATH($(<)) += $(STDLIBPATH:T) ; # Workaround GCC's lack of command-files and NT's line-length limitation. if $(NT) { JAMSHELL on $(<) = % ; } gcc-Link-action $(<) : $(>) ; if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && ( $(OS) = LINUX || $(OS) = OPENBSD ) && ! $(NO_GNU_LN) { return "$(<[1]).$(DLLVERSION)" ; } } # for gcc, we repeat all libraries so that dependencies are always resolved actions gcc-Link-action bind NEEDLIBS NEEDIMPS { $(.SET_EXIT) $(SHELL_SET)$(gSHELL_LIBPATH)=$(LINK_LIBPATH)$(gAPPEND_LD_LIBRARY_PATH) $(SHELL_EXPORT)$(gSHELL_LIBPATH) "$(.GXX[1]:R=$(GCC_BIN_DIR))" $(.GXX[2-]) "$(DLL_LINK_FLAGS)" "$(IMPLIB_COMMAND)$(<[2])" $(LINKFLAGS) -o "$(<[1])$(OUTTAG)" -L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" "$(IMPLIB_FLAGS)$(NEEDIMPS)" -l$(FINDLIBS) $(LNOPT)$(RPATH_LINK). $(LNOPT)$(SONAME)$(<[1]:D=)$(SOTAG) $(ACTION_1)$(LN)$(_)-fs$(_)"$(<[1]:D=)$(OUTTAG)"$(_)"$(<[1])" } #### Cc ##### rule Cc-action { _ on $(<) = " " ; gcc-Cc-action $(<) : $(>) ; } actions gcc-Cc-action { $(.SET_EXIT) "$(.GCC[1]:R=$(GCC_BIN_DIR))" $(.GCC[2-]) -c -Wall -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I$(_)"$(STDHDRS)" -I$(_)"$(SYSHDRS)" -o "$(<)" "$(>)" "$(.OBJCOPY[1])"$(_)$(OBJCOPY_FLAGS)$(_)"$(<)" } #### C++ #### rule C++-action { _ on $(<) = " " ; gcc-C++-action $(<) : $(>) ; } actions gcc-C++-action { $(.SET_EXIT) "$(.GXX[1]:R=$(GCC_BIN_DIR))" $(.GXX[2-]) -c -Wall -ftemplate-depth-255 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I$(_)"$(STDHDRS)" -I$(_)"$(SYSHDRS)" -o "$(<)" "$(>)" "$(.OBJCOPY[1])"$(_)$(OBJCOPY_FLAGS)$(_)"$(<)" } #### Archive #### rule Archive-action { gcc-Archive-action $(<) : $(>) ; } actions updated together piecemeal gcc-Archive-action { "$(.AR[1])" $(AROPTIONS) ru$(ARFLAGS:J=) "$(<)" "$(>)" }
Thanks for helping out! I've now spent two days trying to get this to build... Rene Rivera wrote:
Well, we do have <address-model>64
<address-model>64 ?!?!? where the @#$(& are these options documented? I looked all over the boost installation web page for options, but the "gcc toolset configuration page" only mentions <cxxflags>. In fact, running google reveals no hits on the boost web site for <address-model>, just some mail lists... It would be easier for people to use the library if things like this were documented on the installation page.
Yep.. And it was intended exactly for this situation.. Just didn't have anyone that actually exercised this until now. Well at least no one complained until now ;-)
OK.. I've made some changes that will hopefully handle this particular situation. Patrik if you want to try them out, the two files that you need to replace are attached. Just put them into the */tools/build/v1 directory. And to get the functionality you need to invoke bjam something like:
bjam ... "-sBUILD=<architecture>power/<address-model>64/<object-model>aix" ...
Ok, so I tried the new files, and it's not quite right: warning: -maix64 and POWER architecture are incompatible It seems I'm getting options -mcpu=power -mpowerpc64 -maix64. The proper settings for my system would be -mcpu=power3 and -maix64 (which according to the gcc documentation implies -mpowerpc64 and -mpowerpc). I tried using <architecture>power3 but that seems to remove all the options from the command line, so presumably that wasn't recognized. /Patrik
Patrik Jonsson wrote:
Thanks for helping out! I've now spent two days trying to get this to build...
Rene Rivera wrote:
Well, we do have <address-model>64
<address-model>64 ?!?!?
where the @#$(& are these options documented? I looked all over the boost installation web page for options, but the "gcc toolset configuration page" only mentions <cxxflags>. In fact, running google reveals no hits on the boost web site for <address-model>, just some mail lists... It would be easier for people to use the library if things like this were documented on the installation page.
You've hit one of the darkest corners of Boost.Build. And the only full documentation as to what all the "features" (that's what we call the address-model, etc.) is the file I posted, features.jam. You don't need to tell us it's not sufficient documentation, we know ;-)
bjam ... "-sBUILD=<architecture>power/<address-model>64/<object-model>aix" ...
Ok, so I tried the new files, and it's not quite right:
warning: -maix64 and POWER architecture are incompatible
It seems I'm getting options -mcpu=power -mpowerpc64 -maix64. The proper settings for my system would be -mcpu=power3 and -maix64 (which according to the gcc documentation implies -mpowerpc64 and -mpowerpc).
That's exactly what I needed. As I said in my first reply I only though I *could* get the info needed. It's what combinations are possible that the GCC docs don't really say.
I tried using <architecture>power3 but that seems to remove all the options from the command line, so presumably that wasn't recognized.
"power3" is something that was added by GCC after I wrote this support into boost.build. I just added it, and adjusted for the aix64 and power combinations... Try the attached.. but now the BUILD value will be the complete: <architecture>power/<address-model>64/<instruction-set>power3/<object-model>aix Not including the instruction-set should also work. But it will give you the generic -mcpu=powerpc64 option instead of the -mcpu=power3. It's up to you which one you want. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org #~ Copyright David Abrahams 2001. #~ Copyright Rene Rivera 2004. #~ Distributed under the Boost Software License, Version 1.0. #~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # A summary of features: # # - "feature" has a fixed list of values, of which the first is the default. # Affect link compatability. # # - "free-feature" has a variable or fixed list of values, default is empty. # Does not affect link compatability. # # - "path-feature" has a variable list of path values, default is empty. # Does not affect link compatability. # # - "dependency-feature" like "path-feature" but affects dependency rebuilds. # Profiling feature support by Toon Knapen <toon@si-lab.com>. feature profiling : off on ; # C/C++ alignment of structure members feature struct-alignment : auto 1 2 4 8 16 ; # Type of exceptions to use, Metrowerks/CodeWarrior only. feature eh-model : default fast msvc ; # ??, GCC only. feature vtable-thunks : default on off ; # Generate code to support, or not threading. feature threading : single multi ; # Link to the language runtime libraries as a shared object, or statically # link them into the produced object. feature runtime-link : dynamic static ; # Use either the debug or release versions of the language runtime, # when available. feature runtime-build : debug release ; # Compilation optimization level. feature optimization : off speed space ; # Inlining, "off" disables it, "on" enables with "inline" keywords, and # "full" enables it for specified functions and any others the compiler # deams inline-able. feature inlining : off on full ; # Generate and include debug symbol information. feature debug-symbols : on off ; # ??. free-feature debug-store : object database ; # What type of OS subsystem to target. Windows only. free-feature user-interface : console gui ; # ??. feature unicode-application : on off ; # Enable/disable exceptions. feature exception-handling : on off ; # Enable/disable C++ runtime type information. feature rtti : on off ; # Set the feature to "no" in order to skip the build of this target. # Useful to disable known non-working compilers or variants. feature build : yes no ; # ??. feature stdlib : "default" gcc stlport ; # Used to specify "default-BUILD" properties that will be used if not # overridden by the BUILD variable. free-feature "default" ; # Custom flags for the various build procedures. free-feature cflags ; free-feature linkflags ; free-feature cxxflags ; free-feature arflags ; # Preprocessor definitions. free-feature define ; # <define>PYTHON=foo free-feature undef ; # <undef>PYTHON=foo # Add a user include path (#include "x.h"). path-feature "include" ; # <include>../foo/bar/mumble # Add a system include path (#include <x.h>). path-feature sysinclude ; # <sysinclude>/fu/man/chu # Finding libraries needs a search path and a base library name. path-feature library-path ; free-feature find-library ; # Link in an external library file. dependency-feature library-file ; # The version of a shared object. <dllversion>1.27.0 (for use with soname-ing) free-feature dllversion ; # Add a name tag to a target, see Boost.Build documentation for details. free-feature tag ; # ??. free-feature version ; # Control warnings, to turn the on, off, how many, and which ones. # Values are toolset dependent, but the ones listed here must # be supported... # - "on", default has warnings enabled. # - "off", no warnings. # - "error", turn warnings into errors. # For toolsets that support it specifying a number # will limit the number of warnings produced. free-feature warnings ; # Control how many errors to tollerate. free-feature errors ; # Include file as prefix before all other includes. free-feature prefix ; # How to interpret relative paths in includes. # - "relative", as GCC search relative to inclusion point. # - "directory", relative to current directory. # - "source", realtive to original source file. # - "paths", only search given include and sysinclude paths. free-feature include-search : relative directory source paths ; # Can the target participate in a shared library? feature shared-linkable : false true ; # The addressing model to generate code for. # Currently a limited set only specifying the bit size of pointers. feature address-model : default 16 32 64 ; # Type of CPU architecture to compile for. feature architecture : # The default is the machine we are on, i.e. nothing native # x86 and compatible x86 # Sparc sparc # RS/6000 & PowerPC power # MIPS/SGI mips1 mips2 mips3 mips4 ; # The specific instruction set in an architecture to compile. feature instruction-set : # Default should probably always be the lowest common denominator. default # x86 and compatible i386 i486 i586 i686 pentium pentium-mmx pentiumpro pentium2 pentium3 pentium4 k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp # Sparc v7 cypress v8 supersparc sparclite hypersparc sparclite86x f930 f934 sparclet tsc701 v9 ultrasparc # RS/6000 & PowerPC rios rios1 rsc rios2 rs64a 601 602 603 603e 604 604e 620 630 740 750 power power2 powerpc power64 403 505 801 821 823 860 power-common # MIPS r2000 r3000 r3900 r4000 r4100 r4300 r4400 r4600 r4650 r5000 r6000 r8000 orion ; # The object model the compiler uses when compiling C++ code. Currently only # relevant for Compaq C++ V6.3 and newer. feature object-model : # Use the default object model which works best for boost. This most # probably should be 'ansi' in all cases. default # Explicitly select the 'arm' object model. Used for backward compatible # binaries. arm # Explicitly select the 'ansi' object model. Used to support the complete # standard. ansi # AIX has it's own ABI, this is available with the gcc -maix32/64 options. aix ; gLINK_COMPATIBLE = <shared-linkable>true <target-type> <inlining> ; gALWAYS_RELEVANT = <target-type> <tag> <default> <build> ; ##### Requirements by target type ##### gTARGET_TYPE_REQUIREMENTS(DLL) = <shared-linkable>true ; ##### Variant definitions #### variant common : <vtable-thunks>default <struct-alignment>auto <eh-model>default <threading>single <unicode-application>off <exception-handling>on <rtti>on <shared-linkable>false <address-model>default <architecture>native <instruction-set>default <profiling>off <object-model>default ; variant debug : common : <debug-symbols>on <runtime-build>debug <optimization>off <inlining>off ; if $(NT) { variant debug-python : debug : <define>BOOST_DEBUG_PYTHON <gcc><define>Py_DEBUG ; } else { variant debug-python : debug : <define>BOOST_DEBUG_PYTHON <define>Py_DEBUG ; } variant release : common : <debug-symbols>off <runtime-build>release <optimization>speed <inlining>full <define>NDEBUG ; # Profiling variant by Toon Knapen <toon@si-lab.com> variant profile : release : <profiling>on <debug-symbols>on ; # Copyright (c) 2001 David Abrahams. # Copyright (c) 2002-2003 Rene Rivera. # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # The following #// line will be used by the regression test table generation # program as the column heading for HTML tables. Must not include version number. #//<a href="http://gcc.gnu.org/">GNU<br>GCC</a> # compute directories for invoking GCC # # The gcc toolset can be user-configured using the following # variables: # # GCC_ROOT_DIRECTORY # The directory in which GCC was installed. Defaults to # unset. Usually, there is no need to set this variable at # all. However, if G++ is not in the path it is usually # sufficient to configure this one variable. More fine-grained # configuration is available by setting the following: # # GCC_BIN_DIRECTORY # the directory prefix used to find the gcc executables. Defaults to # $(GCC_ROOT_DIRECTORY)/bin/, or "" if GCC_ROOT_DIRECTORY is # not set. # # GCC_INCLUDE_DIRECTORY # the directory in which to find system includes. Defaults to # empty. # # GCC_STDLIB_DIRECTORY # the directory in which to find the standard library # objects associated with this build of gcc. Defaults to # $(GCC_ROOT_DIRECTORY)/lib. # # GXX # The name by which g++ is invoked. You can also use this in # lieu of setting the <cxxflags> property to force options such # as "-V3.0.4" into the g++ command line: "-sGXX=g++ -V3.0.4". # # GCC # Similar to GXX, the name by which gcc is invoked for "C" # language targets. # singleton variables... set-as-singleton GCC_ROOT_DIRECTORY GCC_BIN_DIRECTORY GCC_INCLUDE_DIRECTORY GCC_STDLIB_DIRECTORY ; flags gcc GCC_BIN_DIRECTORY : $(GCC_BIN_DIRECTORY) ; flags gcc GCC_INCLUDE_DIRECTORY : $(GCC_INCLUDE_DIRECTORY) ; flags gcc GCC_STDLIB_DIRECTORY : $(GCC_STDLIB_DIRECTORY) ; GCC_BIN_DIRECTORY ?= $(GCC_ROOT_DIRECTORY)$(SLASH)bin ; GCC_BIN_DIRECTORY ?= "" ; # Don't clobber tool names if GCC_ROOT_DIRECTORY not set GCC_STDLIB_DIRECTORY ?= $(GCC_ROOT_DIRECTORY)$(SLASH)lib ; # Make sure this gets set "on" the target flags gcc GCC_BIN_DIR : $(GCC_BIN_DIRECTORY) ; flags gcc LINKFLAGS <runtime-link>static : -static ; flags gcc CFLAGS <debug-symbols>on : -g ; flags gcc LINKFLAGS <debug-symbols>on : -g ; flags gcc CFLAGS <optimization>off : -O0 ; flags gcc CFLAGS <optimization>speed : -O3 ; # Other optimizations we might want for GCC # -fforce-mem -fomit-frame-pointer # -foptimize-sibling-calls -finline-functions -ffast-math -finline-limit=10000 flags gcc CFLAGS <optimization>space : -Os ; flags gcc CFLAGS <inlining>off : -fno-inline ; flags gcc CFLAGS <inlining>on : -Wno-inline ; flags gcc CFLAGS <inlining>full : -finline-functions -Wno-inline ; flags gcc .GXX : $(GXX) ; flags gcc .GCC : $(GCC) ; # # set threading options for various platforms: # local on-windows ; if $(NT) { on-windows = 1 ; } else if $(UNIX) { switch $(JAMUNAME) { case CYGWIN* : { on-windows = 1 ; } } } flags gcc ON_WINDOWS : $(on-windows) ; if $(on-windows) { flags gcc CFLAGS <threading>multi : -mthreads ; flags gcc LINKFLAGS <threading>multi : -mthreads ; } else if $(UNIX) { switch $(JAMUNAME) { case SunOS* : { flags gcc CFLAGS <threading>multi : -pthreads ; flags gcc LINKFLAGS <threading>multi : -pthreads ; flags gcc FINDLIBS <threading>multi : rt ; } case BeOS : { # BeOS has no threading options, don't set anything here. } case Darwin : { # MacOS X, doesn't need any threading options set # -lpthread is linked to by default. # There is no gcc/g++, we need to use cc/c++ instead: .GCC ?= cc ; .GXX ?= c++ ; } case *BSD : { flags gcc CFLAGS <threading>multi : -pthread ; flags gcc LINKFLAGS <threading>multi : -pthread ; # there is no -lrt on BSD } case DragonFly : { flags gcc CFLAGS <threading>multi : -pthread ; flags gcc LINKFLAGS <threading>multi : -pthread ; # there is no -lrt on BSD - DragonFly is a FreeBSD variant, # which anoyingly doesn't say it's a *BSD. } case IRIX : { # gcc on IRIX does not support multi-threading, don't set anything here. } case HP_UX : { # gcc on HP-UX does not support multi-threading, don't set anything here } case * : { flags gcc CFLAGS <threading>multi : -pthread ; flags gcc LINKFLAGS <threading>multi : -pthread ; flags gcc FINDLIBS <threading>multi : rt ; } } } # Some possibly supported, or not, linker flags. The support depends on the OS linker. # flags gcc RPATH_LINK ; flags gcc SONAME ; # Set/reset options for the linker of the platform. # if $(UNIX) { switch $(JAMUNAME) { case SunOS* : { NO_GNU_LN = true ; # sun seems not to use the GNU linker with gcc flags gcc OBJCOPY_FLAGS <debug-symbols>on : "--set-section-flags .debug_str=contents" ; } case Linux : { RPATH_LINK = -Wl,-rpath-link, ; SONAME = -Wl,-soname, ; flags gcc OBJCOPY_FLAGS <debug-symbols>on : "--set-section-flags .debug_str=contents,debug" ; } case OpenBSD : { SONAME = -Wl,-soname, ; } case AIX* : { NO_GNU_LN = true ; IMPLIB_FLAGS = "-Wl,-bI:" ; } } } # Set architecture/instruction-set options. # # x86 and compatible .ARCH = <architecture>x86 <architecture>native ; flags gcc CFLAGS <architecture>x86/<instruction-set>default : -mcpu=i386 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>i386 : -mcpu=i386 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>i486 : -mcpu=i486 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>i586 : -mcpu=i586 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>i686 : -mcpu=i686 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>pentium : -mcpu=pentium ; flags gcc CFLAGS $(.ARCH)/<instruction-set>pentium-mmx : -mcpu=pentium-mmx ; flags gcc CFLAGS $(.ARCH)/<instruction-set>pentiumpro : -mcpu=pentiumpro ; flags gcc CFLAGS $(.ARCH)/<instruction-set>pentium2 : -mcpu=pentium2 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>pentium3 : -mcpu=pentium3 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>pentium4 : -mcpu=pentium4 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>k6 : -mcpu=k6 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>k6-2 : -mcpu=k6-2 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>k6-3 : -mcpu=k6-3 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>athlon : -mcpu=athlon ; flags gcc CFLAGS $(.ARCH)/<instruction-set>athlon-tbird : -mcpu=athlon-tbird ; flags gcc CFLAGS $(.ARCH)/<instruction-set>athlon-4 : -mcpu=athlon-4 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>athlon-xp : -mcpu=athlon-xp ; flags gcc CFLAGS $(.ARCH)/<instruction-set>athlon-mp : -mcpu=athlon-mp ; # Sparc .ARCH = <architecture>sparc <architecture>native ; flags gcc CFLAGS <architecture>sparc/<instruction-set>default : -mcpu=v7 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>v7 : -mcpu=v7 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>cypress : -mcpu=cypress ; flags gcc CFLAGS $(.ARCH)/<instruction-set>v8 : -mcpu=v8 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>supersparc : -mcpu=supersparc ; flags gcc CFLAGS $(.ARCH)/<instruction-set>sparclite : -mcpu=sparclite ; flags gcc CFLAGS $(.ARCH)/<instruction-set>hypersparc : -mcpu=hypersparc ; flags gcc CFLAGS $(.ARCH)/<instruction-set>sparclite86x : -mcpu=sparclite86x ; flags gcc CFLAGS $(.ARCH)/<instruction-set>f930 : -mcpu=f930 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>f934 : -mcpu=f934 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>sparclet : -mcpu=sparclet ; flags gcc CFLAGS $(.ARCH)/<instruction-set>tsc701 : -mcpu=tsc701 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>v9 : -mcpu=v9 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>ultrasparc : -mcpu=ultrasparc ; flags gcc CFLAGS <architecture>sparc/<address-model>64 : -m64 ; flags gcc LINKFLAGS <architecture>sparc/<address-model>64 : -m64 ; # RS/6000 & PowerPC .ARCH = <architecture>power <architecture>native ; flags gcc CFLAGS <architecture>power/<address-model>default/<instruction-set>default : -mcpu=common ; flags gcc CFLAGS <architecture>power/<address-model>32/<instruction-set>default : -mcpu=common ; flags gcc CFLAGS <architecture>power/<address-model>64/<instruction-set>default : -mcpu=powerpc64 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>rios : -mcpu=rios ; flags gcc CFLAGS $(.ARCH)/<instruction-set>rios1 : -mcpu=rios1 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>rsc : -mcpu=rsc ; flags gcc CFLAGS $(.ARCH)/<instruction-set>rios2 : -mcpu=rios2 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>rs64a : -mcpu=rs64a ; flags gcc CFLAGS $(.ARCH)/<instruction-set>403 : -mcpu=403 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>505 : -mcpu=505 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>601 : -mcpu=601 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>602 : -mcpu=602 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>603 : -mcpu=603 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>603e : -mcpu=603e ; flags gcc CFLAGS $(.ARCH)/<instruction-set>604 : -mcpu=604 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>604e : -mcpu=604e ; flags gcc CFLAGS $(.ARCH)/<instruction-set>620 : -mcpu=620 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>630 : -mcpu=630 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>740 : -mcpu=740 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>7400 : -mcpu=7400 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>7450 : -mcpu=7450 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>750 : -mcpu=750 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>801 : -mcpu=801 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>821 : -mcpu=821 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>823 : -mcpu=823 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>860 : -mcpu=860 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>power : -mcpu=power ; flags gcc CFLAGS $(.ARCH)/<instruction-set>power2 : -mcpu=power2 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>power3 : -mcpu=power3 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>power4 : -mcpu=power4 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>power5 : -mcpu=power5 ; flags gcc CFLAGS $(.ARCH)/<instruction-set>powerpc : -mcpu=powerpc ; flags gcc CFLAGS $(.ARCH)/<instruction-set>powerpc64 : -mcpu=powerpc64 ; # AIX variant of RS/6000 & PowerPC flags gcc CFLAGS <architecture>power/<address-model>32/<object-model>aix : -maix32 ; flags gcc LINKFLAGS <architecture>power/<address-model>32/<object-model>aix : -maix32 ; flags gcc CFLAGS <architecture>power/<address-model>64/<object-model>aix : -maix64 ; flags gcc LINKFLAGS <architecture>power/<address-model>64/<object-model>aix : -maix64 ; flags gcc AROPTIONS <architecture>power/<address-model>64/<object-model>aix : "-X 64" ; # MIPS-1-2-3-4 flags gcc MIPS <architecture>mips1 <architecture>mips2 <architecture>mips3 <architecture>mips4 : TRUE ; flags gcc MIPS <instruction-set>r2000 <instruction-set>r3000 <instruction-set>r3900 <instruction-set>r4000 <instruction-set>r4100 <instruction-set>r4300 <instruction-set>r4400 <instruction-set>r4600 <instruction-set>r4650 <instruction-set>r5000 <instruction-set>r6000 <instruction-set>r8000 <instruction-set>orion : TRUE ; if $(MIPS) { flags gcc CFLAGS <architecture>mips1 : -mips1 ; flags gcc CFLAGS <architecture>mips2 : -mips2 ; flags gcc CFLAGS <architecture>mips3 : -mips3 ; flags gcc CFLAGS <architecture>mips4 : -mips4 ; flags gcc CFLAGS <instruction-set>r2000 : -mcpu=r2000 ; flags gcc CFLAGS <instruction-set>r3000 : -mcpu=r3000 ; flags gcc CFLAGS <instruction-set>r3900 : -mcpu=r3900 ; flags gcc CFLAGS <instruction-set>r4000 : -mcpu=r4000 ; flags gcc CFLAGS <instruction-set>r4100 : -mcpu=r4100 ; flags gcc CFLAGS <instruction-set>r4300 : -mcpu=r4300 ; flags gcc CFLAGS <instruction-set>r4400 : -mcpu=r4400 ; flags gcc CFLAGS <instruction-set>r4600 : -mcpu=r4600 ; flags gcc CFLAGS <instruction-set>r4650 : -mcpu=r4650 ; flags gcc CFLAGS <instruction-set>r5000 : -mcpu=r5000 ; flags gcc CFLAGS <instruction-set>r6000 : -mcpu=r6000 ; flags gcc CFLAGS <instruction-set>r8000 : -mcpu=r8000 ; flags gcc CFLAGS <instruction-set>orion : -mcpu=orion ; # ...addressing model options flags gcc ADDRESS_MODEL_INVALID <address-model>16 : TRUE ; if $(ADDRESS_MODEL_INVALID) { EXIT "Error: Invalid addressing model for MIPS architecture (16)." ; } flags gcc CFLAGS <address-model>default : -mgp32 ; flags gcc CFLAGS <address-model>32 : -mgp32 ; flags gcc CFLAGS <address-model>64 : -mgp64 -mlong64 ; } #S390 if $(OSPLAT) = 390 { flags gcc CFLAGS <threading>multi : -D_REENTRANT ; } # # define compiler names if not set: .GCC ?= gcc ; .GXX ?= g++ ; flags gcc CFLAGS <profiling>on : -pg ; flags gcc LINKFLAGS <profiling>on : -pg ; flags gcc C++FLAGS <rtti>off : -fno-rtti ; flags gcc C++FLAGS <vtable-thunks>on : -fvtable-thunks ; flags gcc C++FLAGS <vtable-thunks>off : -fvtable-thunks=0 ; flags gcc CFLAGS <cflags> ; flags gcc C++FLAGS <cxxflags> ; flags gcc DEFINES <define> ; flags gcc UNDEFS <undef> ; flags gcc HDRS <include> ; flags gcc SYSHDRS <sysinclude> ; flags gcc LINKFLAGS <linkflags> ; flags gcc LINKFLAGS <debug-symbols>off : -s ; flags gcc ARFLAGS <arflags> ; flags gcc STDHDRS : $(GCC_INCLUDE_DIRECTORY) ; flags gcc STDLIBPATH : $(GCC_STDLIB_DIRECTORY) ; if ! $(ARFLAGS) { flags gcc ARFLAGS : "" ; } if ! $(on-windows) # The compiler complains about -fPIC on NT { flags gcc CFLAGS <shared-linkable>true : -fPIC ; flags gcc LINKFLAGS <shared-linkable>true : -fPIC ; } if $(BETOOLS) { flags gcc LINKFLAGS <target-type>$(SHARED_TYPES) : -nostart ; } else { flags gcc LINKFLAGS <target-type>$(SHARED_TYPES) : -shared ; } flags gcc LIBPATH <library-path> ; flags gcc NEEDLIBS <library-file> ; flags gcc FINDLIBS <find-library> ; flags gcc DLLVERSION <dllversion> ; DLLVERSION = $(DLLVERSION[1]) ; DLLVERSION ?= $(BOOST_VERSION) ; flags gcc TARGET_TYPE <target-type> ; # allow for "ar" to be part of the compiler distribution, for # example in mingw and cygwin flags gcc .AR : [ GLOB $(GCC_BIN_DIRECTORY) $(PATH) : ar ar.exe ] ; .AR ?= ar ; # used to manipulate the object files produced by GCC to # prevent the merging of debug symbols (which happens to be n^2 slow) flags gcc .OBJCOPY : [ GLOB $(GCC_BIN_DIRECTORY) $(PATH) : objcopy ] ; if ! $(on-windows) { flags gcc .SET_EXIT : "set -e" ; } #### Link #### rule Link-action { _ on $(<) = " " ; # if we don't have a GNU linker then we can't pass any GNU-ld specific flags: if $(NO_GNU_LN) { LNOPT on $(<) = ; } else { LNOPT on $(<) = "" ; } # do we use sonames or not? if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && ( $(OS) = LINUX || $(OS) = OPENBSD ) && ! $(NO_GNU_LN) { OUTTAG on $(<) = ".$(DLLVERSION)" ; SOTAG on $(<) = ".$(DLLVERSION)" ; ACTION_1 on $(<) = "" ; } else { OUTTAG on $(<) = "" ; SOTAG on $(<) = ; ACTION_1 on $(<) = ; } if [ on $(<) return $(ON_WINDOWS) ] { # On Win32, choose different image bases for load-time efficiency DLL_LINK_FLAGS on $(<) += "-Wl,--enable-auto-image-base" ; } if $(<[2]) && [ on $(<) return $(ON_WINDOWS) ] { # Allow gcc-nocygwin to avoid this flag if ! $(GCC_NO_EXPORT_ALL) { DLL_LINK_FLAGS on $(<) += "-Wl,--export-all-symbols" ; } # This will appear before the import library name when building a DLL, but # will be "multiplied away" otherwise. The --exclude-symbols directive # proved to be necessary with some versions of Cygwin. DLL_LINK_FLAGS on $(<) += "-Wl,--exclude-symbols,_bss_end__:_bss_start__:_data_end__:_data_start__" ; # set the link command to generate an import library if ! $(NO_GNU_LN) { IMPLIB_COMMAND on $(<) = "-Wl,--out-implib," ; } } DEPENDS $(<) : $(NEEDLIBS) $(NEEDIMPS) ; gRUN_LD_LIBRARY_PATH($(<)) += $(STDLIBPATH:T) ; # Workaround GCC's lack of command-files and NT's line-length limitation. if $(NT) { JAMSHELL on $(<) = % ; } gcc-Link-action $(<) : $(>) ; if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && ( $(OS) = LINUX || $(OS) = OPENBSD ) && ! $(NO_GNU_LN) { return "$(<[1]).$(DLLVERSION)" ; } } # for gcc, we repeat all libraries so that dependencies are always resolved actions gcc-Link-action bind NEEDLIBS NEEDIMPS { $(.SET_EXIT) $(SHELL_SET)$(gSHELL_LIBPATH)=$(LINK_LIBPATH)$(gAPPEND_LD_LIBRARY_PATH) $(SHELL_EXPORT)$(gSHELL_LIBPATH) "$(.GXX[1]:R=$(GCC_BIN_DIR))" $(.GXX[2-]) "$(DLL_LINK_FLAGS)" "$(IMPLIB_COMMAND)$(<[2])" $(LINKFLAGS) -o "$(<[1])$(OUTTAG)" -L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" "$(IMPLIB_FLAGS)$(NEEDIMPS)" -l$(FINDLIBS) $(LNOPT)$(RPATH_LINK). $(LNOPT)$(SONAME)$(<[1]:D=)$(SOTAG) $(ACTION_1)$(LN)$(_)-fs$(_)"$(<[1]:D=)$(OUTTAG)"$(_)"$(<[1])" } #### Cc ##### rule Cc-action { _ on $(<) = " " ; gcc-Cc-action $(<) : $(>) ; } actions gcc-Cc-action { $(.SET_EXIT) "$(.GCC[1]:R=$(GCC_BIN_DIR))" $(.GCC[2-]) -c -Wall -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I$(_)"$(STDHDRS)" -I$(_)"$(SYSHDRS)" -o "$(<)" "$(>)" "$(.OBJCOPY[1])"$(_)$(OBJCOPY_FLAGS)$(_)"$(<)" } #### C++ #### rule C++-action { _ on $(<) = " " ; gcc-C++-action $(<) : $(>) ; } actions gcc-C++-action { $(.SET_EXIT) "$(.GXX[1]:R=$(GCC_BIN_DIR))" $(.GXX[2-]) -c -Wall -ftemplate-depth-255 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I$(_)"$(STDHDRS)" -I$(_)"$(SYSHDRS)" -o "$(<)" "$(>)" "$(.OBJCOPY[1])"$(_)$(OBJCOPY_FLAGS)$(_)"$(<)" } #### Archive #### rule Archive-action { gcc-Archive-action $(<) : $(>) ; } actions updated together piecemeal gcc-Archive-action { "$(.AR[1])" $(AROPTIONS) ru$(ARFLAGS:J=) "$(<)" "$(>)" }
"power3" is something that was added by GCC after I wrote this support into boost.build. I just added it, and adjusted for the aix64 and power combinations... Try the attached.. but now the BUILD value will be the complete:
<architecture>power/<address-model>64/<instruction-set>power3/<object-model>aix
Not including the instruction-set should also work. But it will give you the generic -mcpu=powerpc64 option instead of the -mcpu=power3. It's up to you which one you want.
ok, this is looking good. It looks like I now can build all static libraries. However, the shared libraries now fail because the -pthread option is not given on the link line. (I'm pretty sure this worked before): ... gcc-Link-action bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/a ddress-model-64/architecture-power/instruction-set-power3/object-model-aix/share d-linkable-true/libboost_date_time-gcc-d-1_32.so ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_init ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_destroy ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. collect2: ld returned 8 exit status set -e LIBPATH=bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/addre ss-model-64/architecture-power/instruction-set-power3/object-model-aix/shared-li nkable-true:$LIBPATH export LIBPATH "g++" -g -maix64 -fPIC -shared -o "bin/boost/libs/date_time/build/libbo ost_date_time.so/gcc/debug/address-model-64/architecture-power/instruction-set-p ower3/object-model-aix/shared-linkable-true/libboost_date_time-gcc-d-1_32.so" "bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/address-model-6 4/architecture-power/instruction-set-power3/object-model-aix/shared-linkable-tru e/greg_month.o" "bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/ address-model-64/architecture-power/instruction-set-power3/object-model-aix/shar ed-linkable-true/greg_weekday.o" "bin/boost/libs/date_time/build/libboost_date_t ime.so/gcc/debug/address-model-64/architecture-power/instruction-set-power3/obje ct-model-aix/shared-linkable-true/date_generators.o" ...failed gcc-Link-action bin/boost/libs/date_time/build/libboost_date_time.so/g cc/debug/address-model-64/architecture-power/instruction-set-power3/object-model -aix/shared-linkable-true/libboost_date_time-gcc-d-1_32.so... ...skipped <@boost!lib64-gcc>libboost_date_time-gcc-d-1_32.so for lack of <@boos t!libs!date_time!build/libboost_date_time.so/gcc/debug/address-model-64/architec ture-power/instruction-set-power3/object-model-aix/shared-linkable-true>libboost _date_time-gcc-d-1_32.so... If this is fixed, it looks like everything will build ok. Thanks a bunch! /Patrik
Patrik Jonsson wrote:
"power3" is something that was added by GCC after I wrote this support into boost.build. I just added it, and adjusted for the aix64 and power combinations... Try the attached.. but now the BUILD value will be the complete:
<architecture>power/<address-model>64/<instruction-set>power3/<object-model>aix
Not including the instruction-set should also work. But it will give you the generic -mcpu=powerpc64 option instead of the -mcpu=power3. It's up to you which one you want.
ok, this is looking good. It looks like I now can build all static libraries. However, the shared libraries now fail because the -pthread option is not given on the link line. (I'm pretty sure this worked before):
... gcc-Link-action bin/boost/libs/date_time/build/libboost_date_time.so/gcc/debug/a ddress-model-64/architecture-power/instruction-set-power3/object-model-aix/share d-linkable-true/libboost_date_time-gcc-d-1_32.so
Well that's a single threaded library, it would have "threading-multi" in the path if it was multi threaded.
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_init ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_destroy
It's likely that something other than Boost requires pthread. Could you find out what that is? It could be libstdc++, or something else..
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
..Perhaps by using one of those options you can find out where the pthread symbols are referenced. (by adding <ldflags>-bnoquite to BUILD for example)
If this is fixed, it looks like everything will build ok. Thanks a bunch!
Welcome. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
Rene Rivera wrote:
Well that's a single threaded library, it would have "threading-multi" in the path if it was multi threaded.
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_init ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_destroy
It's likely that something other than Boost requires pthread. Could you find out what that is? It could be libstdc++, or something else..
It seems to be that boost/greg_month.hpp includes boost/shared_ptr.hpp, which uses boost/detail/shared_count.hpp which uses /boost/detail/lightweight_mutex.hpp. The pthread symbols are in greg_month.o, so it looks like that library won't work without threads or else something's supposed to turn threads off but isn't working... /Patrik
Patrik Jonsson wrote:
Rene Rivera wrote:
Well that's a single threaded library, it would have "threading-multi" in the path if it was multi threaded.
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_init ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_destroy
It's likely that something other than Boost requires pthread. Could you find out what that is? It could be libstdc++, or something else..
It seems to be that boost/greg_month.hpp includes boost/shared_ptr.hpp, which uses boost/detail/shared_count.hpp which uses /boost/detail/lightweight_mutex.hpp. The pthread symbols are in greg_month.o, so it looks like that library won't work without threads or else something's supposed to turn threads off but isn't working...
Hmm... The only fix for this I can come up with is to add "<define>BOOST_LWM_USE_SPINLOCK", or probably more safely add "<linkflags>-pthread" to the BUILD. The current code, what's going to be 1.33, is rather different and is likely not to rely on pthreads on your platform. I think it uses native assembly in the GCC+PPC case. But more generally I would think that it should not generate *any* locking code when doing a single threaded build. I'm CC'ing the Boost list in the hope someone else can better resolve the problem. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
Rene Rivera wrote:
Patrik Jonsson wrote:
Rene Rivera wrote:
Well that's a single threaded library, it would have "threading-multi" in the path if it was multi threaded.
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_init ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_destroy
It's likely that something other than Boost requires pthread. Could you find out what that is? It could be libstdc++, or something else.. It seems to be that boost/greg_month.hpp includes boost/shared_ptr.hpp, which uses boost/detail/shared_count.hpp which uses /boost/detail/lightweight_mutex.hpp. The pthread symbols are in greg_month.o, so it looks like that library won't work without threads or else something's supposed to turn threads off but isn't working...
Hmm... The only fix for this I can come up with is to add "<define>BOOST_LWM_USE_SPINLOCK", or probably more safely add "<linkflags>-pthread" to the BUILD.
No, it needs BOOST_DISABLE_THREADS; apparently BOOST_HAS_PTHREADS and BOOST_HAS_THREADS are still being defined, even in a "single threaded" build.
Peter Dimov wrote:
No, it needs BOOST_DISABLE_THREADS; apparently BOOST_HAS_PTHREADS and BOOST_HAS_THREADS are still being defined, even in a "single threaded" build.
As was pointed out by Christoph, in the dev list, it seems to be a manifestation of this GCC problem: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11953 Bug 11953 - _REENTRANT defined when compiling non-threaded code. So yes, adding "<define>BOOST_DISABLE_THREADS" is the way to do fix it if the interest is to use the single thread libraries. Of course if Patrik doesn't care about single threaded code he can just ignore the errors :-) -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
Hi again, so, I've now switched to trying to build boost using KCC (4.0f9, I need both KCC and gcc versions). And that opened up a whole new slew of cans of worms... 1. the <address-model>64 doesn't seem to do anything here, the proper option (-q64) is not used. I can turn it on with "<cxxflags>-q64 <linkflags>-q64 <arflags>-q64" and that seems to work. 2. when building the thread library (and possibly others), the option to turn on threading (--thread_safe) is not used, resulting in error messages: "/scratch/scratchdirs/patrik/boost_1_32_0/boost/config/requires_threads.hpp", line 86: catastrophic error: #error directive: "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use" # error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use" If I manually turn it on using "<cxxflags>--thread_safe <linkflags>--thread_safe <arflags>--thread_safe", I can compile it, but... 3. Building shared libraries fails: kcc-Link-action bin/boost/libs/thread/build/libboost_thread.so/kcc/debug/libboos t_thread-kcc-d-1_32.so "/scratch/scratchdirs/patrik/kcc_munch0000DABA000.c", line 3.1: 1506-166 (S) Def inition of function func_ptr requires parentheses. "/scratch/scratchdirs/patrik/kcc_munch0000DABA000.c", line 3.10: 1506-276 (S) Sy ntax error: possible missing '{'? /usr/common/usg/KCC/4.0f9/KCC_BASE/bin/cc_r: 1501-228 input file kcc_munch0000DA BA000.o not found KCC -g --thread_safe -o "bin/boost/libs/thread/build/libboost_thread.so/k cc/debug/libboost_thread-kcc-d-1_32.so" "bin/boost/libs/thread/build/libboost_ thread.so/kcc/debug/barrier.o" "bin/boost/libs/thread/build/libboost_thread.so/k cc/debug/condition.o" "bin/boost/libs/thread/build/libboost_thread.so/kcc/debug/ exceptions.o" "bin/boost/libs/thread/build/libboost_thread.so/kcc/debug/mutex.o" "bin/boost/libs/thread/build/libboost_thread.so/kcc/debug/once.o" "bin/boost/li bs/thread/build/libboost_thread.so/kcc/debug/recursive_mutex.o" "bin/boost/libs/ thread/build/libboost_thread.so/kcc/debug/read_write_mutex.o" "bin/boost/libs/th read/build/libboost_thread.so/kcc/debug/thread.o" "bin/boost/libs/thread/build/l ibboost_thread.so/kcc/debug/tss_hooks.o" "bin/boost/libs/thread/build/libboost_t hread.so/kcc/debug/tss_dll.o" "bin/boost/libs/thread/build/libboost_thread.so/kc c/debug/tss_pe.o" "bin/boost/libs/thread/build/libboost_thread.so/kcc/debug/tss. o" "bin/boost/libs/thread/build/libboost_thread.so/kcc/debug/xtime.o" -lm ...failed kcc-Link-action bin/boost/libs/thread/build/libboost_thread.so/kcc/deb ug/libboost_thread-kcc-d-1_32.so... ...skipped <@boost!lib-KCC>libboost_thread-kcc-d-1_32.so for lack of <@boost!lib s!thread!build/libboost_thread.so/kcc/debug>libboost_thread-kcc-d-1_32.so... 4. There are numerous compiler errors and warnings preventing many libraries from building. I've attached the full build log to this email. cheers, /Patrik
Patrik Jonsson <patrik@ucolick.org> writes:
4. There are numerous compiler errors and warnings preventing many libraries from building. I've attached the full build log to this email.
Note that the latest official release of KCC is not very new at all. It's based on an old version of the EDG front end, and I wouldn't be the least bit surprised that some things fail to build. It just isn't that conformant, and not many people have been testing their libraries against it (or using it!), so there hasn't been motivation or information to fix those problems. -- Dave Abrahams Boost Consulting www.boost-consulting.com
,struct mpl_::bool_<0> >::value". "/scratch/scratchdirs/patrik/boost_1_33_1/boost/regex/v4/regex_traits.hpp",
,mpl_::bool_<0> >". "/scratch/scratchdirs/patrik/boost_1_33_1/boost/regex/v4/regex_traits.hpp",
". "/scratch/scratchdirs/patrik/boost_1_33_1/boost/regex/v4/regex_format.hpp",
,boost::match_results<std::_Ptrit<char,long,const char *,const char &,char *,char &>,std::allocator<boost::sub_match<std::_Ptrit<char,long,const char *,const char &,char *,char &> > > ,boost::regex_traits_wrapper<boost::regex_traits<char,boost::cpp_regex_traits<char>
". "/scratch/scratchdirs/patrik/boost_1_33_1/boost/regex/v4/regex_format.hpp",
Hi, I'm trying to build Boost (1.33.1) on an IBM SP5 running AIX and the IBM xlC 7.0 compiler, but the build fails: -bash-3.00$ ~/bin/bjam "-sTOOLS=vacpp" --prefix=$HOME stage ... <works fine for 2 compiles up to:> xlc-C++-action bin/boost/libs/regex/build/libboost_regex.so/vacpp/debug/cregex.o "/scratch/scratchdirs/patrik/boost_1_33_1/boost/regex/v4/regex_traits.hpp", line 80.1: 1540-0062 (S) The incomplete class "gcc_3_2_wknd" must not be used as a qualifier. "/scratch/scratchdirs/patrik/boost_1_33_1/boost/regex/v4/regex_traits.hpp", line 80.1: 1540-0700 (I) The previous message was produced while processing "boost::re_detail::has_boost_extensions_tag<boost::regex_traits<char,boost::cpp_regex_traits<char> line 80.1: 1540-0700 (I) The previous message was produced while processing "struct boost::re_detail::has_boost_extensions_tag<boost::regex_traits<char,boost::cpp_regex_traits<char> line 156.8: 1540-0700 (I) The previous message was produced while processing "struct boost::regex_traits_wrapper<boost::regex_traits<char,boost::cpp_regex_traits<char> line 73.7: 1540-0700 (I) The previous message was produced while processing "class boost::re_detail::basic_regex_formatter<boost::re_detail::string_out_iterator<std::basic_string<char,std::char_traits<char>,std::allocator<char> line 553.16: 1540-0700 (I) The previous message was produced while processing "boost::re_detail::regex_format_imp<boost::re_detail::string_out_iterator<std::basic_string<char,std::char_traits<char>,std::allocator<char>
,std::_Ptrit<char,long,const char *,const char &,char *,char &>,std::allocator<boost::sub_match<std::_Ptrit<char,long,const char *,const char &,char *,char &> > ,char,boost::regex_traits_wrapper<boost::regex_traits<char,boost::cpp_regex_traits<char>
(string_out_iterator<std::basic_string<c...". and so on, and so on.
Does anyone have any idea why it's not working? I don't understand why it's talking about "The incomplete class "gcc_3_2_wknd"" -- what does gcc 3.2 have to do with this build? Any help would be appreciated, /Patrik Jonsson
participants (5)
-
Bart
-
David Abrahams
-
Patrik Jonsson
-
Peter Dimov
-
Rene Rivera