Error toolset gcc initialization

Starting with boos_1_66_0_b1, I then installed MinGW (https://sourceforge.net/projects/mingw/files/Installer/). I opened a command prompt and modified my path to have C:MinGWbin as the first loca...

Starting with boos_1_66_0_b1, I then installed MinGW (https://sourceforge.net/projects/mingw/files/Installer/). I opened a command prompt and modified my path to have C:MinGWbin as the first location:

c:boost>gcc --version
gcc (MinGW.org GCC-6.3.0-1) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Then I asked for some help:

c:boost>bootstrap.bat help
...
Please consult bootstrap.log for further diagnostics.
...
c:boost>type bootstrap.log
###
### "Unknown toolset: help"
###
### You can specify the toolset as the argument, i.e.:
###     .build.bat msvc
###
### Toolsets supported by this script are: borland, como, gcc,
###     gcc-nocygwin, intel-win32, metrowerks, mingw, msvc, vc7, vc8,
###     vc9, vc10, vc11, vc12, vc14, vc141
###
### If you have Visual Studio 2017 installed you will need either update
### the Visual Studio 2017 installer or run from VS 2017 Command Prompt
### as we where unable to detect your toolset installation.
###

Note it says «.build.bat» when it means «.bootstrap.bat».
Also note that «mingw» is listed as a supported toolset.

c:boost>bootstrap.bat mingw
Building Boost.Build engine
execcmd.c: In function 'onintr':
execcmd.c:120:5: warning: implicit declaration of function 'out_printf' [-Wimplicit-function-declaration]
     out_printf( "...interruptedn" );
     ^~~~~~~~~~
execnt.c: In function 'maxline':
execnt.c:572:12: warning: type defaults to 'int' in declaration of 'result' [-Wimplicit-int]
     static result;
            ^~~~~~
filent.c: In function 'file_archscan':
filent.c:358:10: warning: implicit declaration of function 'filelist_empty' [-Wimplicit-function-declaration]
     if ( filelist_empty( archive->members ) )
          ^~~~~~~~~~~~~~
filent.c:360:14: warning: implicit declaration of function 'file_collect_archive_content_' [-Wimplicit-function-declaration]
         if ( file_collect_archive_content_( archive ) < 0 )
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jam.c: In function 'main':
jam.c:669:5: warning: implicit declaration of function 'exec_done' [-Wimplicit-function-declaration]
     exec_done();
     ^~~~~~~~~
make.c: In function 'make':
make.c:105:5: warning: implicit declaration of function 'exec_init' [-Wimplicit-function-declaration]
     exec_init();
     ^~~~~~~~~
make.c:136:13: warning: implicit declaration of function 'out_printf' [-Wimplicit-function-declaration]
             out_printf( "...found %d target%s...n", counts->targets,
             ^~~~~~~~~~
make.c: In function 'make0':
make.c:739:13: warning: implicit declaration of function 'out_flush' [-Wimplicit-function-declaration]
             out_flush();
             ^~~~~~~~~
filesys.c: In function 'file_archivescan_impl':
filesys.c:360:10: warning: implicit declaration of function 'filelist_empty' [-Wimplicit-function-declaration]
     if ( filelist_empty( archive->members ) )
          ^~~~~~~~~~~~~~
modules/path.c: In function 'path_exists':
modules/path.c:16:12: warning: implicit declaration of function 'file_query' [-Wimplicit-function-declaration]
     return file_query( list_front( lol_get( frame->args, 0 ) ) ) ?
            ^~~~~~~~~~

Failed to build Boost.Build engine.
Please consult bootstrap.log for further diagnostics.

You can try to obtain a prebuilt binary from

   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941

Also, you can file an issue at http://svn.boost.org
Please attach bootstrap.log in that case.

Note it says to file an isuse at svn.boost.org — isn’t that deprecated?

c:boost>type bootstrap.log
###
### Using 'mingw' toolset.
###

c:boosttoolsbuildsrcengine>if exist bootstrap rd /S /Q bootstrap

c:boosttoolsbuildsrcengine>md bootstrap

c:boosttoolsbuildsrcengine>gcc -DNT -o bootstrapjam0.exe  command.c compile.c constants.c debug.c execcmd.c execnt.c filent.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathnt.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c md5.c class.c cwd.c w32_getreg.c native.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c

c:boosttoolsbuildsrcengine>.bootstrapjam0 -f build.jam --toolset=mingw "--toolset-root= "  clean
###
### Unknown toolset: mingw
###
### Known toolsets are: acc, borland, cc, como, clang, darwin, gcc, gcc-nocygwin, intel-darwin, intel-linux, intel-win32, kcc, kylix, metrowerks, mipspro, msvc, qcc, pathscale, pgi, sun, sunpro, tru64cxx, vacpp, xlcpp, vc7, vc8, vc9, vc10, vc11, vc12, vc14, vc141, vmsdecc
###

c:boosttoolsbuildsrcengine>.bootstrapjam0 -f build.jam --toolset=mingw "--toolset-root= "
###
### Unknown toolset: mingw
###
### Known toolsets are: acc, borland, cc, como, clang, darwin, gcc, gcc-nocygwin, intel-darwin, intel-linux, intel-win32, kcc, kylix, metrowerks, mipspro, msvc, qcc, pathscale, pgi, sun, sunpro, tru64cxx, vacpp, xlcpp, vc7, vc8, vc9, vc10, vc11, vc12, vc14, vc141, vmsdecc
###

c:boosttoolsbuildsrcengine>exit /b 1

When was support dropped for MinGW, and why does the bootstrap indicate it is still valid?

So I decided to use bootstrap.bat gcc which succeeded. However then when I tried to build something, it looks like a command was not quoted, and fails:

c:boostlibsrandom>....b2 toolset=gcc clean
'C:Program' is not recognized as an internal or external command,
operable program or batch file.
C:/boost/tools/build/src/toolsgcc.jam:151: in gcc.init from module gcc
error: toolset gcc initialization:
error: no command provided, default command 'g++' not found
error: initialized from
C:/boost/tools/build/src/buildtoolset.jam:43: in toolset.using from module toolset
C:/boost/tools/build/srcbuild-system.jam:461: in process-explicit-toolset-requests from module build-system
C:/boost/tools/build/srcbuild-system.jam:527: in load from module build-system
C:boosttoolsbuildsrc/kernelmodules.jam:295: in import from module modules
C:boosttoolsbuildsrc/kernel/bootstrap.jam:139: in boost-build from module
C:boostboost-build.jam:17: in module scope from module

tools/build/src/tools/gcc.jam

# Copyright 2001 David Abrahams
# Copyright 2002-2017 Rene Rivera
# Copyright 2002-2003 Vladimir Prus
# Copyright 2005 Reece H. Dunn
# Copyright 2006 Ilya Sokolov
# Copyright 2007 Roland Schwarz
# Copyright 2007 Boris Gubenko
#
# Distributed under the Boost Software License, Version 1.0.
#    (See accompanying file LICENSE_1_0.txt or copy at
#          http://www.boost.org/LICENSE_1_0.txt)

#| tag::doc[]

[[bbv2.reference.tools.compiler.gcc]]
= GNU C++

The `gcc` module supports the http://gcc.gnu.org[GNU C++ compiler] on
Linux, a number of Unix-like system including SunOS and on Windows
(either http://www.cygwin.com[Cygwin] or http://www.mingw.org[MinGW]).

The `gcc` module is initialized using the following syntax:

----
using gcc : [version] : [c++-compile-command] : [compiler options] ;
----

This statement may be repeated several times, if you want to configure
several versions of the compiler.

If the version is not explicitly specified, it will be automatically
detected by running the compiler with the `-v` option. If the command is
not specified, the `g++` binary will be searched in PATH.

The following options can be provided, using
_`<option-name>option-value syntax`_:

`cflags`::
Specifies additional compiler flags that will be used when compiling C
sources.

`cxxflags`::
Specifies additional compiler flags that will be used when compiling C++
sources.

`compileflags`::
Specifies additional compiler flags that will be used when compiling both C
and C++ sources.

`linkflags`::
Specifies additional command line options that will be passed to the linker.

`root`::
Specifies root directory of the compiler installation. This option is
necessary only if it is not possible to detect this information from the
compiler command--for example if the specified compiler command is a user
script.

`archiver`::
Specifies the archiver command that is used to produce static
libraries. Normally, it is autodetected using gcc `-print-prog-name`
option or defaulted to `ar`, but in some cases you might want to
override it, for example to explicitly use a system version instead of
one included with gcc.

`ranlib`::
Specifies the ranlib command that is used to generated symbol table
for static libraries. Normally, it is autodetected using gcc
`-print-prog-name` option or defaulted to `ranlib`, but in some cases
you might want to override it, for example to explicitly use a system
version instead of one included with gcc.

`rc`::
Specifies the resource compiler command that will be used with the
version of gcc that is being configured. This setting makes sense only
for Windows and only if you plan to use resource files. By default
`windres` will be used.

`rc-type`::
Specifies the type of resource compiler. The value can be either
`windres` for msvc resource compiler, or `rc` for borland's resource
compiler.

In order to compile 64-bit applications, you have to specify
`address-model=64`, and the `instruction-set` feature should refer to a 64
bit processor. Currently, those include `nocona`, `opteron`, `athlon64` and
`athlon-fx`.

|# # end::doc[]

import "class" : new ;
import common ;
import cygwin ;
import feature ;
import fortran ;
import generators ;
import os ;
import pch ;
import property ;
import property-set ;
import rc ;
import regex ;
import sequence ;
import set ;
import toolset ;
import type ;
import unix ;
import virtual-target ;
import errors ;


if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
{
    .debug-configuration = true ;
}


feature.extend toolset : gcc ;

toolset.inherit-generators gcc : unix : unix.link unix.link.dll ;
toolset.inherit-flags gcc : unix ;
toolset.inherit-rules gcc : unix ;

generators.override gcc.prebuilt : builtin.prebuilt ;
generators.override gcc.searched-lib-generator : searched-lib-generator ;

# Make gcc toolset object files use the "o" suffix on all platforms.
type.set-generated-target-suffix OBJ : <toolset>gcc : o ;
type.set-generated-target-suffix OBJ : <toolset>gcc <target-os>windows : o ;
type.set-generated-target-suffix OBJ : <toolset>gcc <target-os>cygwin : o ;


# Initializes the gcc toolset for the given version. If necessary, command may
# be used to specify where the compiler is located. The parameter 'options' is a
# space-delimited list of options, each one specified as
# <option-name>option-value. Valid option names are: cxxflags, linkflags and
# linker-type. Accepted linker-type values are aix, darwin, gnu, hpux, osf or
# sun and the default value will be selected based on the current OS.
# Example:
#   using gcc : 3.4 : : <cxxflags>foo <linkflags>bar <linker-type>sun ;
#
# The compiler command to use is detected in three steps:
# 1) If an explicit command is specified by the user, it will be used and must
#    be available.
# 2) If only a certain version is specified, it is enforced:
#    - either the 'g++-VERSION' command must be available
#    - or the default command 'g++' must be available and match the exact
#      version.
# 3) Without user-provided restrictions use default 'g++'.
#
rule init ( version ? : command * : options * : requirement * )
{
    #1): use user-provided command
    local tool-command = ;
    if $(command)
    {
        tool-command = [ common.get-invocation-command-nodefault gcc : g++ :
            $(command) ] ;
        if ! $(tool-command)
        {
            import errors ;
            errors.error toolset gcc "initialization:"
                : provided command '$(command)' not found
                : initialized from [ errors.nearest-user-location ] ;
        }
    }
    #2): enforce user-provided version
    else if $(version)
    {
        tool-command = [ common.get-invocation-command-nodefault gcc :
            "g++-$(version[1])" ] ;

        #2.1) fallback: check whether "g++" reports the requested version
        if ! $(tool-command)
        {
            tool-command = [ common.get-invocation-command-nodefault gcc : g++ ]
                ;
            if $(tool-command)
            {
                local tool-command-string = "$(tool-command)" ;
                tool-command-string = $(tool-command-string:J=" ") ;
                local tool-version = [ dump-full-version
                    $(tool-command-string) ] ;
                # Permit a match between a two-digit version specified by the
                # user (e.g. 4.4) and a 3-digit version reported by gcc.
                # Since only two digits are present in the binary name
                # anyway, insisting that user specify the 3-digit version
                # when configuring B2, while it is not required on
                # the command line, would be strange.
                local versionl = [ regex.split $(version) "[.]" ] ;
                local tool-versionl = [ regex.split $(tool-version) "[.]" ] ;
                if ! ( $(versionl[1]) = $(tool-versionl[1]) &&
                   $(versionl[2]:E=$(tool-versionl[2])) = $(tool-versionl[2]) &&
                   $(versionl[3]:E=$(tool-versionl[3])) = $(tool-versionl[3]) )
                {
                    import errors ;
                    errors.error toolset gcc "initialization:"
                        : version '$(version)' requested but
                            'g++-$(version)' not found and version
                            '$(tool-version)' of default '$(tool-command)'
                            does not match
                        : initialized from [ errors.nearest-user-location ]
                        ;
                    tool-command = ;
                }
            }
            else
            {
                import errors ;
                errors.error toolset gcc "initialization:"
                    : version '$(version)' requested but neither
                        'g++-$(version)' nor default 'g++' found
                    : initialized from [ errors.nearest-user-location ] ;
            }
        }
    }
    #3) default: no command and no version specified, try using "g++"
    else
    {
        tool-command = [ common.get-invocation-command-nodefault gcc : g++ ] ;
        if ! $(tool-command)
        {
            import errors ;
            errors.error toolset gcc "initialization:"
                : no command provided, default command 'g++' not found
                : initialized from [ errors.nearest-user-location ] ;
        }
    }


    # Information about the gcc command...
    #   The command.
    local command = $(tool-command) ;
    #   The 'command' variable can have multiple elements but when calling the
    # SHELL builtin we need a single string, and we need to quote elements
    # with spaces.
    local command-string = "$(command)" ;
    command-string = $(command-string:J=" ") ;
    #   The root directory of the tool install.
    local root = [ feature.get-values <root> : $(options) ] ;
    #   The bin directory where to find the command to execute.
    local bin ;
    #   The compiler flavor.
    local flavor = [ feature.get-values <flavor> : $(options) ] ;
    #   vxworks build on windows uses csh that is neither mingw or cygwin
    if [ feature.get-values <target-os> : $(options) ] = vxworks
    {
        flavor ?= vxworks ;
    }
    #   Autodetect the root and bin dir if not given.
    if $(command)
    {
        bin ?= [ common.get-absolute-tool-path $(command[-1]) ] ;
        root ?= $(bin:D) ;
    }
    local target-os ;
    #   Autodetect the version and flavor if not given.
    if $(command)
    {
        local machine = [ MATCH "^([^ ]+)" :
            [ SHELL "$(command-string) -dumpmachine" ] ] ;
        version ?= [ dump-version $(command-string) ] ;
        switch $(machine:L)
        {
            case *mingw* : flavor ?= mingw ;
            case *cygwin* : flavor ?= cygwin ;
        }
        switch $(machine:L)
        {
            case *mingw*  : target-os ?= windows ;
            case *cygwin* : target-os ?= cygwin ;
            case *linux*  : target-os ?= linux ;
            # TODO: finish this list.
        }
    }

    local condition ;
    condition = [ common.check-init-parameters gcc $(requirement) : version $(version)
        : $(condition) ] ;

    common.handle-options gcc : $(condition) : $(command) : $(options) ;

    # Set the default target-os for this toolset.
    if $(target-os) && ! [ feature.get-values <target-os> : $(requirement) ]
    {
        local conditionx = [ regex.replace $(condition) "/" "," ] ;
        toolset.add-defaults $(conditionx):<target-os>$(target-os) ;
    }

    # If gcc is installed in a non-standard location, we would need to add
    # LD_LIBRARY_PATH when running programs created with it (for unit-test/run
    # rules).
    if $(command)
    {
        # On multilib 64-bit boxes, there are both 32-bit and 64-bit libraries
        # and all must be added to LD_LIBRARY_PATH. The linker will pick the
        # right onces. Note that we do not provide a clean way to build a 32-bit
        # binary using a 64-bit compiler, but user can always pass -m32
        # manually.
        local lib_path = $(root)/bin $(root)/lib $(root)/lib32 $(root)/lib64 ;
        if $(.debug-configuration)
        {
            ECHO "notice:" using gcc libraries "::" $(condition) "::" $(lib_path) ;
        }
        toolset.flags gcc.link RUN_PATH $(condition) : $(lib_path) ;
    }

    # If we are not using a system gcc installation we should adjust the various
    # programs as needed to prefer using their installation specific versions.
    # This is essential for correct use of MinGW and for cross-compiling.

    # - Archive builder.
    local archiver = [ common.get-invocation-command gcc
        : [ .get-prog-name $(command-string) : ar : $(flavor) ]
        : [ feature.get-values <archiver> : $(options) ]
        : $(bin)
        : search-path ] ;
    toolset.flags gcc.archive .AR $(condition) : $(archiver[1]) ;
    if $(.debug-configuration)
    {
        ECHO "notice:" using gcc archiver "::" $(condition) "::" $(archiver[1]) ;
    }
    local arflags = [ feature.get-values <arflags> : $(options) ] ;
    toolset.flags gcc.archive .ARFLAGS $(condition) : $(arflags) ;

    # - Ranlib.
    local ranlib = [ common.get-invocation-command gcc
        : [ .get-prog-name $(command-string) : ranlib : $(flavor) ]
        : [ feature.get-values <ranlib> : $(options) ]
        : $(bin)
        : search-path ] ;
    toolset.flags gcc.archive .RANLIB $(condition) : $(ranlib[1]) ;
    if $(.debug-configuration)
    {
        ECHO "notice:" using gcc ranlib "::" $(condition) "::" $(ranlib[1]) ;
    }

    # - Resource compiler.
    local rc = [ common.get-invocation-command-nodefault gcc : windres :
        [ feature.get-values <rc> : $(options) ] : $(bin) : search-path ] ;
    local rc-type = [ feature.get-values <rc-type> : $(options) ] ;
    rc-type ?= windres ;
    if ! $(rc)
    {
        # If we can not find an RC compiler we fallback to a null one that
        # creates empty object files. This allows the same Jamfiles to work
        # across the board. The null RC uses assembler to create the empty
        # objects, so configure that.
        rc = [ common.get-invocation-command gcc : as : : $(bin) : search-path ]
            ;
        rc-type = null ;
    }
    rc.configure $(rc) : $(condition) : <rc-type>$(rc-type) ;

    toolset.flags gcc VERSION $(condition) : [ regex.split $(version) "[.]" ] ;

    init-cxxstd-flags $(condition) : $(version) ;
}

if [ os.name ] = NT
{
    # This causes single-line command invocation to not go through .bat files,
    # thus avoiding command-line length limitations.
    # TODO: Set JAMSHELL on specific targets instead of globally.
    JAMSHELL = % ;
}

local rule dump-full-version ( command-string )
{
    # -dumpfullversion is only supported for gcc 7+.
    # Passing both options works, as the first one that's
    # recognized will be used.
    return [ MATCH "^([0-9.]+)" :
        [ SHELL "$(command-string) -dumpfullversion -dumpversion" ] ] ;
}

local rule dump-version ( command-string )
{
    return [ MATCH "^([0-9.]+)" :
        [ SHELL "$(command-string) -dumpversion" ] ] ;
}

# Uses -print-prog-name to get the name of the tool.
# Converts the path to native form if using cygwin.
rule .get-prog-name ( command-string : tool : flavor ? )
{
    local prog-name = [ NORMALIZE_PATH [ MATCH "(.*)[n]+" :
        [ SHELL "$(command-string) -print-prog-name=$(tool)" ] ] ] ;

    if $(flavor) = cygwin && [ os.name ] = NT
    {
        prog-name = [ cygwin.cygwin-to-windows-path $(prog-name) ] ;
    }
    return $(prog-name) ;
}

###
### Functions that set options on the targets.
###

local all-os = [ feature.values <target-os> ] ;

local rule compile-link-flags ( * )
{
    toolset.flags gcc.compile OPTIONS $(1) : $(2) ;
    toolset.flags gcc.link OPTIONS $(1) : $(2) ;
}

{
    # This logic will add -fPIC for all compilations:
    #
    # lib a : a.cpp b ;
    # obj b : b.cpp ;
    # exe c : c.cpp a d ;
    # obj d : d.cpp ;
    #
    # This all is fine, except that 'd' will be compiled with -fPIC even
    # though it is not needed, as 'd' is used only in exe. However, it is
    # hard to detect where a target is going to be used. Alternatively, we
    # can set -fPIC only when main target type is LIB but than 'b' would be
    # compiled without -fPIC which would lead to link errors on x86-64. So,
    # compile everything with -fPIC.
    #
    # Yet another alternative would be to create a propagated <sharedable>
    # feature and set it when building shared libraries, but that would be
    # hard to implement and would increase the target path length even more.

    # On Windows, fPIC is the default, and specifying -fPIC explicitly leads
    # to a warning.
    local non-windows = [ set.difference $(all-os) : cygwin windows ] ;
    compile-link-flags <link>shared/<target-os>$(non-windows) : -fPIC ;
}

{
    # Handle address-model
    compile-link-flags <target-os>aix/<address-model>32 : -maix32 ;
    compile-link-flags <target-os>aix/<address-model>64 : -maix64 ;

    compile-link-flags <target-os>hpux/<address-model>32 : -milp32 ;
    compile-link-flags <target-os>hpux/<address-model>64 : -mlp64 ;

    local generic-os = [ set.difference $(all-os) : aix hpux ] ;
    local arch = power sparc x86 ;
    compile-link-flags <target-os>$(generic-os)/<architecture>$(arch)/<address-model>32 : -m32 ;
    compile-link-flags <target-os>$(generic-os)/<architecture>$(arch)/<address-model>64 : -m64 ;
}

{
    # Handle threading
    local rule threading-flags ( * )
    {
        compile-link-flags <threading>multi/$(1) : $(2) ;
        if $(3)
        {
            toolset.flags gcc.link FINDLIBS-SA <threading>multi/$(1) : $(3) ;
        }
    }

    threading-flags <target-os>windows : -mthreads ;
    threading-flags <target-os>cygwin  : -mthreads ;
    threading-flags <target-os>solaris  : -pthreads : rt ;
    threading-flags <target-os>qnx : -pthread ;

    local bsd = [ MATCH ^(.*bsd)$ : $(all-os) ] ;
    threading-flags <target-os>$(bsd) : -pthread ;

    local no-threading = android beos haiku sgi darwin vxworks ;
    local threading-generic-os = [ set.difference $(all-os) : $(no-threading) $(bsd) windows cygwin solaris qnx ] ;
    threading-flags <target-os>$(threading-generic-os) : -pthread : rt ;
}

{
    local rule cxxstd-flags ( * )
    {
        toolset.flags gcc.compile.c++ OPTIONS $(1) : $(2) ;
        toolset.flags gcc.link OPTIONS $(1) : $(2) ;
    }

    local cxxstd = [ feature.values <cxxstd> ] ;
    local dialects = [ feature.values <cxxstd-dialect> ] ;
    .cxxstd-dialects = [ set.difference $(dialects) : gnu iso ] ;
    # C++ latest needs to be set up on a per-toolset basis
    for local std in [ set.difference $(cxxstd) : latest ]
    {
        cxxstd-flags <cxxstd>$(std)/<cxxstd-dialect>iso : -std=c++$(std) ;
        cxxstd-flags <cxxstd>$(std)/<cxxstd-dialect>gnu : -std=gnu++$(std) ;
        # If we see this it's probably a mistake, but
        # toolset.flags has no way to set up diagnostics.
        cxxstd-flags <cxxstd>$(std)/<cxxstd-dialect>$(.cxxstd-dialects) : -std=c++$(std) ;
    }

    local rule version-ge ( lhs : rhs )
    {
        lhs = [ regex.split $(lhs) "[.]" ] ;
        rhs = [ regex.split $(rhs) "[.]" ] ;
        return [ sequence.compare $(rhs) : $(lhs) : numbers.less ] ;
    }
    # Version specific flags
    local rule init-cxxstd-flags ( condition * : version )
    {
        local std ;
        if [ version-ge $(version) : 10 ] { std = 20 ; }
        else if [ version-ge $(version) : 8 ] { std = 2a ; }
        else if [ version-ge $(version) : 6 ] { std = 17 ; }
        else if [ version-ge $(version) : 5 ] { std = 1z ; }
        else if [ version-ge $(version) : 4.9 ] { std = 14 ; }
        else if [ version-ge $(version) : 4.8 ] { std = 1y ; }
        else if [ version-ge $(version) : 4.7 ] { std = 11 ; }
        else if [ version-ge $(version) : 3.3 ] { std = 98 ; }
        if $(std)
        {
            cxxstd-flags $(condition)/<cxxstd>latest/<cxxstd-dialect>iso : -std=c++$(std) ;
            cxxstd-flags $(condition)/<cxxstd>latest/<cxxstd-dialect>gnu : -std=gnu++$(std) ;
            cxxstd-flags $(condition)/<cxxstd>latest/<cxxstd-dialect>$(.cxxstd-dialects) : -std=c++$(std) ;
        }
    }
}

generators.register-c-compiler gcc.compile.c++.preprocess : CPP : PREPROCESSED_CPP : <toolset>gcc ;
generators.register-c-compiler gcc.compile.c.preprocess   : C   : PREPROCESSED_C   : <toolset>gcc ;
generators.register-c-compiler gcc.compile.c++ : CPP : OBJ : <toolset>gcc ;
generators.register-c-compiler gcc.compile.c   : C   : OBJ : <toolset>gcc ;
generators.register-c-compiler gcc.compile.asm : ASM : OBJ : <toolset>gcc ;

generators.register [ new fortran-compiling-generator
    gcc.compile.fortran : FORTRAN FORTRAN90 : OBJ : <toolset>gcc ] ;

rule compile.c++.preprocess ( targets * : sources * : properties * )
{
    # Some extensions are compiled as C++ by default. For others, we need to
    # pass -x c++. We could always pass -x c++ but distcc does not work with it.
    if ! $(>:S) in .cc .cp .cxx .cpp .c++ .C
    {
        LANG on $(<) = "-x c++" ;
    }
    DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
}

rule compile.c.preprocess ( targets * : sources * : properties * )
{
    # If we use the name g++ then default file suffix -> language mapping does
    # not work. So have to pass -x option. Maybe, we can work around this by
    # allowing the user to specify both C and C++ compiler names.
    #if $(>:S) != .c
    #{
        LANG on $(<) = "-x c" ;
    #}
    DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
}

rule compile.c++ ( targets * : sources * : properties * )
{
    # Some extensions are compiled as C++ by default. For others, we need to
    # pass -x c++. We could always pass -x c++ but distcc does not work with it.
    if ! $(>:S) in .cc .cp .cxx .cpp .c++ .C
    {
        LANG on $(<) = "-x c++" ;
    }
    DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
}

rule compile.c ( targets * : sources * : properties * )
{
    # If we use the name g++ then default file suffix -> language mapping does
    # not work. So have to pass -x option. Maybe, we can work around this by
    # allowing the user to specify both C and C++ compiler names.
    #if $(>:S) != .c
    #{
        LANG on $(<) = "-x c" ;
    #}
    DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
}

rule compile.fortran ( targets * : sources * : properties * )
{
}

actions compile.c++ bind PCH_FILE
{
    "$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -include"$(FORCE_INCLUDES)" -c -o "$(<:W)" "$(>:W)"
}

actions compile.c bind PCH_FILE
{
    "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -include"$(FORCE_INCLUDES)" -c -o "$(<)" "$(>)"
}

actions compile.c++.preprocess bind PCH_FILE
{
    "$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -include"$(FORCE_INCLUDES)" "$(>:W)" -E >"$(<:W)"
}

actions compile.c.preprocess bind PCH_FILE
{
    "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -include"$(FORCE_INCLUDES)" "$(>)" -E >$(<)
}

actions compile.fortran
{
    "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(PCH_FILE:D)" -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}

rule compile.asm ( targets * : sources * : properties * )
{
    LANG on $(<) = "-x assembler-with-cpp" ;
}

actions compile.asm
{
    "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}

###
### Precompiled header use and generation.
###

# The compiler looks for a precompiled header in each directory just before it
# looks for the include file in that directory. The name searched for is the
# name specified in the #include directive with ".gch" suffix appended. The
# logic in gcc-pch-generator will make sure that the BASE_PCH suffix is appended
# to the full header name.

type.set-generated-target-suffix PCH : <toolset>gcc : gch ;

# GCC-specific pch generator.
class gcc-pch-generator : pch-generator
{
    import project ;
    import property-set ;
    import type ;

    rule run-pch ( project name ? : property-set : sources + )
    {
        # Find the header in sources. Ignore any CPP sources.
        local header ;
        for local s in $(sources)
        {
            if [ type.is-derived [ $(s).type ] H ]
            {
                header = $(s) ;
            }
        }

        local path-prefix = [ path.join $(name)
                                        [ feature.get-values location-prefix
                                          : $(property-set).raw ] ] ;
        property-set = [ $(property-set).add-raw
                         <location-prefix>$(path-prefix) ] ;

        local pch-file = [ generator.run $(project) $(name) : $(property-set)
            : $(header) ] ;

        # Return result of base class and pch-file property as
        # usage-requirements.
        return
            [ $(pch-file[1]).add-raw <pch-file>$(pch-file[2-]) <cflags>-Winvalid-pch ]
            $(pch-file[2-])
          ;
    }

    # Calls the base version specifying source's name as the name of the created
    # target. As a result, the PCH will be named whatever.hpp.gch, and not
    # whatever.gch.
    rule generated-targets ( sources + : property-set : project name ? )
    {
        name = [ $(sources[1]).name ] ;
        return [ generator.generated-targets $(sources)
          : $(property-set) : $(project) $(name) ] ;
    }
}

# Note: the 'H' source type will catch both '.h' header and '.hpp' header. The
# latter have HPP type, but HPP type is derived from H. The type of compilation
# is determined entirely by the destination type.
generators.register [ new gcc-pch-generator gcc.compile.c.pch   : H :   C_PCH : <pch>on <toolset>gcc ] ;
generators.register [ new gcc-pch-generator gcc.compile.c++.pch : H : CPP_PCH : <pch>on <toolset>gcc ] ;

# Override default do-nothing generators.
generators.override gcc.compile.c.pch   : pch.default-c-pch-generator   ;
generators.override gcc.compile.c++.pch : pch.default-cpp-pch-generator ;

toolset.flags gcc.compile PCH_FILE <pch>on : <pch-file> ;

rule compile.c++.pch ( targets * : sources * : properties * )
{
}

actions compile.c++.pch
{
    "$(CONFIG_COMMAND)" -x c++-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}

rule compile.c.pch ( targets * : sources * : properties * )
{
}

actions compile.c.pch
{
    "$(CONFIG_COMMAND)" -x c-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}

###
### General options, like optimization.
###

# Declare flags and action for compilation.
toolset.flags gcc.compile OPTIONS <optimization>off   : -O0 ;
toolset.flags gcc.compile OPTIONS <optimization>speed : -O3 ;
toolset.flags gcc.compile OPTIONS <optimization>space : -Os ;

toolset.flags gcc.compile OPTIONS <inlining>off  : -fno-inline ;
toolset.flags gcc.compile OPTIONS <inlining>on   : -Wno-inline ;
toolset.flags gcc.compile OPTIONS <inlining>full : -finline-functions -Wno-inline ;

toolset.flags gcc.compile OPTIONS <warnings>off : -w ;
toolset.flags gcc.compile OPTIONS <warnings>on  : -Wall ;
toolset.flags gcc.compile OPTIONS <warnings>all : -Wall ;
toolset.flags gcc.compile OPTIONS <warnings>extra : -Wall -Wextra ;
toolset.flags gcc.compile OPTIONS <warnings>pedantic : -Wall -Wextra -pedantic ;
toolset.flags gcc.compile OPTIONS <warnings-as-errors>on : -Werror ;

toolset.flags gcc.compile OPTIONS <debug-symbols>on : -g ;
toolset.flags gcc.compile OPTIONS <profiling>on : -pg ;

toolset.flags gcc.compile OPTIONS <local-visibility>hidden : -fvisibility=hidden ;
toolset.flags gcc.compile.c++ OPTIONS <local-visibility>hidden : -fvisibility-inlines-hidden ;
toolset.flags gcc.compile OPTIONS <local-visibility>protected : -fvisibility=protected ;
toolset.flags gcc.compile OPTIONS <local-visibility>protected/<target-os>darwin : ;
toolset.flags gcc.compile OPTIONS <local-visibility>global : -fvisibility=default ;

toolset.flags gcc.compile.c++ OPTIONS <exception-handling>off : -fno-exceptions ;
toolset.flags gcc.compile.c++ OPTIONS <rtti>off : -fno-rtti ;

# sanitizers
toolset.flags gcc.compile.c++ OPTIONS <address-sanitizer>on : -fsanitize=address -fno-omit-frame-pointer ;
toolset.flags gcc.compile.c++ OPTIONS <address-sanitizer>norecover : -fsanitize=address -fno-sanitize-recover=address -fno-omit-frame-pointer ;
toolset.flags gcc.compile.c++ OPTIONS <leak-sanitizer>on : -fsanitize=leak -fno-omit-frame-pointer ;
toolset.flags gcc.compile.c++ OPTIONS <leak-sanitizer>norecover : -fsanitize=leak -fno-sanitize-recover=leak -fno-omit-frame-pointer ;
toolset.flags gcc.compile.c++ OPTIONS <thread-sanitizer>on : -fsanitize=thread -fno-omit-frame-pointer ;
toolset.flags gcc.compile.c++ OPTIONS <thread-sanitizer>norecover : -fsanitize=thread -fno-sanitize-recover=thread -fno-omit-frame-pointer ;
toolset.flags gcc.compile.c++ OPTIONS <undefined-sanitizer>on : -fsanitize=undefined -fno-omit-frame-pointer ;
toolset.flags gcc.compile.c++ OPTIONS <undefined-sanitizer>norecover : -fsanitize=undefined -fno-sanitize-recover=undefined -fno-omit-frame-pointer ;

toolset.flags gcc.compile.c++ OPTIONS <coverage>on : --coverage ;

# configure Dinkum STL to match compiler options
toolset.flags gcc.compile.c++ DEFINES <rtti>off/<target-os>vxworks : _NO_RTTI ;
toolset.flags gcc.compile.c++ DEFINES <exception-handling>off/<target-os>vxworks : _NO_EX=1 ;

# LTO
toolset.flags gcc.compile OPTIONS <lto>on/<lto-mode>full : -flto ;
toolset.flags gcc.link OPTIONS <lto>on/<lto-mode>full : -flto ;

toolset.flags gcc.compile OPTIONS <lto>on/<lto-mode>fat : -flto -ffat-lto-objects ;
toolset.flags gcc.link OPTIONS <lto>on/<lto-mode>fat : -flto ;

# ABI selection
toolset.flags gcc.compile.c++ DEFINES <stdlib>gnu : _GLIBCXX_USE_CXX11_ABI=0 ;
toolset.flags gcc.compile.c++ DEFINES <stdlib>gnu11 : _GLIBCXX_USE_CXX11_ABI=1 ;

###
### User free feature options.
###

toolset.flags gcc.compile USER_OPTIONS <cflags> ;
toolset.flags gcc.compile.c++ USER_OPTIONS <cxxflags> ;
toolset.flags gcc.compile.asm USER_OPTIONS <asmflags> ;
toolset.flags gcc.compile DEFINES <define> ;
toolset.flags gcc.compile INCLUDES <include> ;
toolset.flags gcc.compile FORCE_INCLUDES <force-include> ;
toolset.flags gcc.compile.c++ TEMPLATE_DEPTH <c++-template-depth> ;
toolset.flags gcc.compile.fortran USER_OPTIONS <fflags> ;

###
### Linking generators and actions.
###

# Class checking that we do not try to use the <runtime-link>static property
# while creating or using a shared library, since it is not supported by
# gcc/libc.
class gcc-linking-generator : unix-linking-generator
{
    rule run ( project name ? : property-set : sources + )
    {
        local target-os = [ $(property-set).get <target-os> ] ;
        local no-static-link = true ;
        switch $(target-os)
        {
            case vms : no-static-link = ;
            case windows : no-static-link = ;
        }

        local properties = [ $(property-set).raw ] ;
        local reason ;
        if $(no-static-link) && <runtime-link>static in $(properties)
        {
            if <link>shared in $(properties)
            {
                reason = On gcc, DLLs can not be built with
                    '<runtime-link>static'. ;
            }
            else if [ type.is-derived $(self.target-types[1]) EXE ]
            {
                for local s in $(sources)
                {
                    local type = [ $(s).type ] ;
                    if $(type) && [ type.is-derived $(type) SHARED_LIB ]
                    {
                        reason = On gcc, using DLLs together with the
                            '<runtime-link>static' option is not possible. ;
                    }
                }
            }
        }
        if $(reason)
        {
            ECHO "warning:" $(reason) ;
            ECHO "warning:" It is suggested to use '<runtime-link>static' together
                with '<link>static'. ;
        }
        else
        {
            return [ unix-linking-generator.run $(project) $(name) :
                $(property-set) : $(sources) ] ;
        }
    }
}

# The set of permissible input types is different on mingw. So, define two sets
# of generators, with mingw generators selected when target-os=windows.

local g ;
g = [ new gcc-linking-generator gcc.mingw.link
      : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
      : EXE
      : <toolset>gcc <target-os>windows ] ;
$(g).set-rule-name gcc.link.mingw ;
generators.register $(g) ;

g = [ new gcc-linking-generator gcc.mingw.link.dll
      : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
      : IMPORT_LIB SHARED_LIB
      : <toolset>gcc <target-os>windows ] ;
$(g).set-rule-name gcc.link.dll.mingw ;
generators.register $(g) ;

generators.register
  [ new gcc-linking-generator gcc.link
      : LIB OBJ
      : EXE
      : <toolset>gcc ] ;
generators.register
  [ new gcc-linking-generator gcc.link.dll
      : LIB OBJ
      : SHARED_LIB
      : <toolset>gcc ] ;

generators.override gcc.mingw.link : gcc.link ;
generators.override gcc.mingw.link.dll : gcc.link.dll ;

# Cygwin is similar to msvc and mingw in that it uses import libraries. While in
# simple cases, it can directly link to a shared library, it is believed to be
# slower, and not always possible. Define cygwin-specific generators here.

g = [ new gcc-linking-generator gcc.cygwin.link
      : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
      : EXE
      : <toolset>gcc <target-os>cygwin ] ;
$(g).set-rule-name gcc.link ;
generators.register $(g) ;

g = [ new gcc-linking-generator gcc.cygwin.link.dll
      : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
      : IMPORT_LIB SHARED_LIB
      : <toolset>gcc <target-os>cygwin ] ;
$(g).set-rule-name gcc.link.dll ;
generators.register $(g) ;

generators.override gcc.cygwin.link : gcc.link ;
generators.override gcc.cygwin.link.dll : gcc.link.dll ;

# Declare flags for linking.
# First, the common flags.
toolset.flags gcc.link OPTIONS <debug-symbols>on : -g ;
toolset.flags gcc.link OPTIONS <profiling>on : -pg ;
toolset.flags gcc.link USER_OPTIONS <linkflags> ;
toolset.flags gcc.link LINKPATH <library-path> ;
toolset.flags gcc.link FINDLIBS-ST <find-static-library> ;
toolset.flags gcc.link FINDLIBS-SA <find-shared-library> ;
toolset.flags gcc.link LIBRARIES <library-file> ;

# Specify compile flags for linker as well as they may be needed for LTO
toolset.flags gcc.link OPTIONS <local-visibility>hidden : -fvisibility=hidden -fvisibility-inlines-hidden ;
toolset.flags gcc.link OPTIONS <local-visibility>protected : -fvisibility=protected ;
toolset.flags gcc.link OPTIONS <local-visibility>protected/<target-os>darwin : ;
toolset.flags gcc.link OPTIONS <local-visibility>global : -fvisibility=default ;

# sanitizers
toolset.flags gcc.link OPTIONS <address-sanitizer>on : -fsanitize=address -fno-omit-frame-pointer ;
toolset.flags gcc.link OPTIONS <address-sanitizer>norecover : -fsanitize=address -fno-sanitize-recover=address -fno-omit-frame-pointer ;
toolset.flags gcc.link OPTIONS <leak-sanitizer>on : -fsanitize=leak -fno-omit-frame-pointer ;
toolset.flags gcc.link OPTIONS <leak-sanitizer>norecover : -fsanitize=leak -fno-sanitize-recover=leak -fno-omit-frame-pointer ;
toolset.flags gcc.link OPTIONS <thread-sanitizer>on : -fsanitize=thread -fno-omit-frame-pointer ;
toolset.flags gcc.link OPTIONS <thread-sanitizer>norecover : -fsanitize=thread -fno-sanitize-recover=thread -fno-omit-frame-pointer ;
toolset.flags gcc.link OPTIONS <undefined-sanitizer>on : -fsanitize=undefined -fno-omit-frame-pointer ;
toolset.flags gcc.link OPTIONS <undefined-sanitizer>norecover : -fsanitize=undefined -fno-sanitize-recover=undefined -fno-omit-frame-pointer ;

toolset.flags gcc.link OPTIONS <coverage>on : --coverage ;

toolset.flags gcc.link.dll .IMPLIB-COMMAND <target-os>windows : "-Wl,--out-implib," ;
toolset.flags gcc.link.dll .IMPLIB-COMMAND <target-os>cygwin : "-Wl,--out-implib," ;

# target specific link flags
{
    # aix

    # On AIX we *have* to use the native linker.
    #
    # Using -brtl, the AIX linker will look for libraries with both the .a
    # and .so extensions, such as libfoo.a and libfoo.so. Without -brtl, the
    # AIX linker looks only for libfoo.a. Note that libfoo.a is an archived
    # file that may contain shared objects and is different from static libs
    # as on Linux.
    #
    # The -bnoipath strips the prepending (relative) path of libraries from
    # the loader section in the target library or executable. Hence, during
    # load-time LIBPATH (identical to LD_LIBRARY_PATH) or a hard-coded
    # -blibpath (*similar* to -lrpath/-lrpath-link) is searched. Without
    # this option, the prepending (relative) path + library name is
    # hard-coded in the loader section, causing *only* this path to be
    # searched during load-time. Note that the AIX linker does not have an
    # -soname equivalent, this is as close as it gets.
    #
    # The -bbigtoc option instrcuts the linker to create a TOC bigger than 64k.
    # This is necessary for some submodules such as math, but it does make running
    # the tests a tad slower.
    #
    # The above options are definitely for AIX 5.x, and most likely also for
    # AIX 4.x and AIX 6.x. For details about the AIX linker see:
    # http://download.boulder.ibm.com/ibmdl/pub/software/dw/aix/es-aix_ll.pdf
    #
    toolset.flags gcc.link OPTIONS <target-os>aix : -Wl,-brtl -Wl,-bnoipath -Wl,-bbigtoc ;

    # See note [1]
    toolset.flags gcc.link OPTIONS <target-os>aix/<runtime-link>static : -static ;

    # darwin

    # On Darwin, the -s option to ld does not work unless we pass -static,
    # and passing -static unconditionally is a bad idea. So, do not pass -s
    # at all and darwin.jam will use a separate 'strip' invocation.
    toolset.flags gcc.link RPATH <target-os>darwin : <dll-path> ;
    # This does not support -R.
    toolset.flags gcc.link RPATH_OPTION <target-os>darwin : -rpath ;
    # -rpath-link is not supported at all.

    # See note [1]
    toolset.flags gcc.link OPTIONS <target-os>darwin/<runtime-link>static : -static ;

    # vxworks
    # On VxWorks we want to reflect what ever special flags have been set in the
    # environment for the CPU we are targeting in the cross build
    toolset.flags gcc.link     OPTIONS     <target-os>vxworks/<strip>on    : -Wl,--strip-all                ;
    toolset.flags gcc.link     OPTIONS     <target-os>vxworks/<link>static : [ os.environ LDFLAGS_STATIC ]  ;
    toolset.flags gcc.link.dll OPTIONS     <target-os>vxworks              : [ os.environ LDFLAGS_SO ]      ;
    toolset.flags gcc.link     OPTIONS     <target-os>vxworks/<link>shared : [ os.environ LDFLAGS_DYNAMIC ] ;

    # default

    local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;
    # Strip the binary when no debugging is needed. We use --strip-all flag
    # as opposed to -s since icc (intel's compiler) is generally
    # option-compatible with and inherits from the gcc toolset, but does not
    # support -s.
    toolset.flags gcc.link OPTIONS <target-os>$(generic-os)/<strip>on :
        -Wl,--strip-all ;
    toolset.flags gcc.link RPATH <target-os>$(generic-os) : <dll-path> ;
    toolset.flags gcc.link RPATH_OPTION <target-os>$(generic-os) : -rpath ;
    toolset.flags gcc.link RPATH_LINK <target-os>$(generic-os) : <xdll-path> ;
    toolset.flags gcc.link START-GROUP <target-os>$(generic-os) :
        -Wl,--start-group ;
    toolset.flags gcc.link END-GROUP <target-os>$(generic-os) : -Wl,--end-group ;

    # gnu ld has the ability to change the search behaviour for libraries
    # referenced by the -l switch. These modifiers are -Bstatic and
    # -Bdynamic and change search for -l switches that follow them. The
    # following list shows the tried variants. Search stops at the first
    # variant that has a match.
    #
    # *nix: -Bstatic -lxxx
    #    libxxx.a
    #
    # *nix: -Bdynamic -lxxx
    #    libxxx.so
    #    libxxx.a
    #
    # windows (mingw, cygwin) -Bstatic -lxxx
    #    libxxx.a
    #    xxx.lib
    #
    # windows (mingw, cygwin) -Bdynamic -lxxx
    #    libxxx.dll.a
    #    xxx.dll.a
    #    libxxx.a
    #    xxx.lib
    #    cygxxx.dll (*)
    #    libxxx.dll
    #    xxx.dll
    #    libxxx.a
    #
    # (*) This is for cygwin
    # Please note that -Bstatic and -Bdynamic are not a guarantee that a
    # static or dynamic lib indeed gets linked in. The switches only change
    # search patterns!

    # On *nix mixing shared libs with static runtime is not a good idea.
    toolset.flags gcc.link FINDLIBS-ST-PFX <target-os>$(generic-os)/<runtime-link>shared : -Wl,-Bstatic ;
    toolset.flags gcc.link FINDLIBS-SA-PFX <target-os>$(generic-os)/<runtime-link>shared : -Wl,-Bdynamic ;

    # On windows allow mixing of static and dynamic libs with static
    # runtime is not a good idea.
    toolset.flags gcc.link FINDLIBS-ST-PFX <target-os>windows/<runtime-link>static : -Wl,-Bstatic ;
    toolset.flags gcc.link FINDLIBS-SA-PFX <target-os>windows/<runtime-link>static : -Wl,-Bdynamic ;
    toolset.flags gcc.link OPTIONS <target-os>windows/<runtime-link>static : -Wl,-Bstatic ;

    toolset.flags gcc.link HAVE_SONAME <target-os>$(generic-os) : "" ;
    toolset.flags gcc.link SONAME_OPTION <target-os>$(generic-os) : -h ;

    # See note [1]
    toolset.flags gcc.link OPTIONS <target-os>$(generic-os)/<runtime-link>static : -static ;

    # hpux

    toolset.flags gcc.link OPTIONS <target-os>hpux/<strip>on : -Wl,-s ;

    toolset.flags gcc.link HAVE_SONAME <target-os>hpux : "" ;
    toolset.flags gcc.link SONAME_OPTION <target-os>hpux : +h ;

    # osf

    # No --strip-all, just -s.
    toolset.flags gcc.link OPTIONS <target-os>osf/<strip>on : -Wl,-s ;
    toolset.flags gcc.link RPATH <target-os>osf : <dll-path> ;
    # This does not support -R.
    toolset.flags gcc.link RPATH_OPTION <target-os>osf : -rpath ;
    # -rpath-link is not supported at all.

    # See note [1]
    toolset.flags gcc.link OPTIONS <target-os>osf/<runtime-link>static : -static ;

    # sun

    toolset.flags gcc.link OPTIONS <target-os>solaris/<strip>on : -Wl,-s ;

    toolset.flags gcc.link RPATH <target-os>solaris : <dll-path> ;
    # Solaris linker does not have a separate -rpath-link, but allows using
    # -L for the same purpose.
    toolset.flags gcc.link LINKPATH <target-os>solaris : <xdll-path> ;

    # This permits shared libraries with non-PIC code on Solaris.
    # VP, 2004/09/07: Now that we have -fPIC hardcode in link.dll, the
    # following is not needed. Whether -fPIC should be hardcoded, is a
    # separate question.
    # AH, 2004/10/16: it is still necessary because some tests link against
    # static libraries that were compiled without PIC.
    toolset.flags gcc.link OPTIONS <target-os>solaris : -mimpure-text ;

    # See note [1]
    toolset.flags gcc.link OPTIONS <target-os>solaris/<runtime-link>static : -static ;

    # [1]
    # For <runtime-link>static we made sure there are no dynamic libraries in the
    # link. On HP-UX not all system libraries exist as archived libraries (for
    # example, there is no libunwind.a), so, on this platform, the -static option
    # cannot be specified.
}


# Enclose the RPATH variable on 'targets' in double quotes, unless it is already
# enclosed in single quotes. This special casing is done because it is common to
# pass '$ORIGIN' to linker -- and it has to have single quotes to prevent shell
# expansion -- and if we add double quotes then the preventing properties of
# single quotes disappear.
#
rule quote-rpath ( targets * )
{
    local r = [ on $(targets[1]) return $(RPATH) ] ;
    if ! [ MATCH ('.*') : $(r) ]
    {
        r = "$(r)" ;
    }
    RPATH on $(targets) = $(r) ;
}

# Declare actions for linking.
rule link ( targets * : sources * : properties * )
{
    SPACE on $(targets) = " " ;
    # Serialize execution of the 'link' action, since running N links in
    # parallel is just slower. For now, serialize only gcc links, it might be a
    # good idea to serialize all links.
    JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
    quote-rpath $(targets) ;
}

rule link.dll ( targets * : sources * : properties * )
{
    SPACE on $(targets) = " " ;
    JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
    quote-rpath $(targets) ;
}

rule link.mingw ( targets * : sources * : properties * )
{
    SPACE on $(targets) = " " ;
    # Serialize execution of the 'link' action, since running N links in
    # parallel is just slower. For now, serialize only gcc links, it might be a
    # good idea to serialize all links.
    JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
}

rule link.dll.mingw ( targets * : sources * : properties * )
{
    SPACE on $(targets) = " " ;
    JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
}

actions link.mingw bind LIBRARIES
{
    "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -o "$(<)" @"@($(<[1]:T).rsp:E=$(START-GROUP) "$(>:T)" "$(LIBRARIES:T)" $(FINDLIBS-ST-PFX:T) -l$(FINDLIBS-ST:T) $(FINDLIBS-SA-PFX:T) -l$(FINDLIBS-SA:T) $(END-GROUP))" $(OPTIONS) $(USER_OPTIONS)
}

actions link.dll.mingw bind LIBRARIES
{
    "$(CONFIG_COMMAND)" -L"$(LINKPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" -shared @"@($(<[-1]:T).rsp:E=$(START-GROUP) "$(>:T)" "$(LIBRARIES:T)" $(FINDLIBS-ST-PFX:T) -l$(FINDLIBS-ST:T) $(FINDLIBS-SA-PFX:T) -l$(FINDLIBS-SA:T) $(END-GROUP))" $(OPTIONS) $(USER_OPTIONS)
}

actions link bind LIBRARIES
{
    "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
}

actions link.dll bind LIBRARIES
{
    "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
}

###
### Archive library generation.
###

# Default value. Mostly for the sake of intel-linux that inherits from gcc, but
# does not have the same logic to set the .AR variable. We can put the same
# logic in intel-linux, but that is hardly worth the trouble as on Linux, 'ar'
# is always available.
.AR = ar ;
.ARFLAGS = rc ;
.RANLIB = ranlib ;

toolset.flags gcc.archive AROPTIONS <archiveflags> ;

rule archive ( targets * : sources * : properties * )
{
    # Always remove archive and start again. Here is the rationale from
    #
    # Andre Hentz:
    #
    # I had a file, say a1.c, that was included into liba.a. I moved a1.c to
    # a2.c, updated my Jamfiles and rebuilt. My program was crashing with absurd
    # errors. After some debugging I traced it back to the fact that a1.o was
    # *still* in liba.a
    #
    # Rene Rivera:
    #
    # Originally removing the archive was done by splicing an RM onto the
    # archive action. That makes archives fail to build on NT when they have
    # many files because it will no longer execute the action directly and blow
    # the line length limit. Instead we remove the file in a different action,
    # just before building the archive.
    #
    local clean.a = $(targets[1])(clean) ;
    TEMPORARY $(clean.a) ;
    NOCARE $(clean.a) ;
    LOCATE on $(clean.a) = [ on $(targets[1]) return $(LOCATE) ] ;
    DEPENDS $(clean.a) : $(sources) ;
    DEPENDS $(targets) : $(clean.a) ;
    common.RmTemps $(clean.a) : $(targets) ;
}

# Declare action for creating static libraries.
# The letter 'r' means to add files to the archive with replacement. Since we
# remove archive, we do not care about replacement, but there is no option "add
# without replacement".
# The letter 'c' suppresses the warning in case the archive does not exists yet.
# That warning is produced only on some platforms, for whatever reasons.
#
actions piecemeal archive
{
    "$(.AR)" $(AROPTIONS) $(.ARFLAGS) "$(<)" "$(>)"
    "$(.RANLIB)" "$(<)"
}

###
### CPU architecture and instruction set options.
###

local rule cpu-flags ( toolset variable : architecture : instruction-set + :
    values + : default ? )
{
    if $(default)
    {
        toolset.flags $(toolset) $(variable)
            <architecture>$(architecture)/<instruction-set> : $(values) ;
    }
    toolset.flags $(toolset) $(variable)
        <architecture>/<instruction-set>$(instruction-set)
        <architecture>$(architecture)/<instruction-set>$(instruction-set)
        : $(values) ;
}


# Set architecture/instruction-set options.
#
# x86 and compatible
# The 'native' option appeared in gcc 4.2 so we cannot safely use it as default.
# Use i686 instead for 32-bit.
toolset.flags gcc OPTIONS <architecture>x86/<address-model>32/<instruction-set> : -march=i686 ;
cpu-flags gcc OPTIONS : x86 : native : -march=native ;
cpu-flags gcc OPTIONS : x86 : i486 : -march=i486 ;
cpu-flags gcc OPTIONS : x86 : i586 : -march=i586 ;
cpu-flags gcc OPTIONS : x86 : i686 : -march=i686 ;
cpu-flags gcc OPTIONS : x86 : pentium : -march=pentium ;
cpu-flags gcc OPTIONS : x86 : pentium-mmx : -march=pentium-mmx ;
cpu-flags gcc OPTIONS : x86 : pentiumpro : -march=pentiumpro ;
cpu-flags gcc OPTIONS : x86 : pentium2 : -march=pentium2 ;
cpu-flags gcc OPTIONS : x86 : pentium3 : -march=pentium3 ;
cpu-flags gcc OPTIONS : x86 : pentium3m : -march=pentium3m ;
cpu-flags gcc OPTIONS : x86 : pentium-m : -march=pentium-m ;
cpu-flags gcc OPTIONS : x86 : pentium4 : -march=pentium4 ;
cpu-flags gcc OPTIONS : x86 : pentium4m : -march=pentium4m ;
cpu-flags gcc OPTIONS : x86 : prescott : -march=prescott ;
cpu-flags gcc OPTIONS : x86 : nocona : -march=nocona ;
cpu-flags gcc OPTIONS : x86 : core2 : -march=core2 ;
cpu-flags gcc OPTIONS : x86 : conroe : -march=core2 ;
cpu-flags gcc OPTIONS : x86 : conroe-xe : -march=core2 ;
cpu-flags gcc OPTIONS : x86 : conroe-l : -march=core2 ;
cpu-flags gcc OPTIONS : x86 : allendale : -march=core2 ;
cpu-flags gcc OPTIONS : x86 : wolfdale : -march=core2 -msse4.1 ;
cpu-flags gcc OPTIONS : x86 : merom : -march=core2 ;
cpu-flags gcc OPTIONS : x86 : merom-xe : -march=core2 ;
cpu-flags gcc OPTIONS : x86 : kentsfield : -march=core2 ;
cpu-flags gcc OPTIONS : x86 : kentsfield-xe : -march=core2 ;
cpu-flags gcc OPTIONS : x86 : yorksfield : -march=core2 ;
cpu-flags gcc OPTIONS : x86 : penryn : -march=core2 ;
cpu-flags gcc OPTIONS : x86 : corei7 : -march=corei7 ;
cpu-flags gcc OPTIONS : x86 : nehalem : -march=corei7 ;
cpu-flags gcc OPTIONS : x86 : corei7-avx : -march=corei7-avx ;
cpu-flags gcc OPTIONS : x86 : sandy-bridge : -march=corei7-avx ;
cpu-flags gcc OPTIONS : x86 : core-avx-i : -march=core-avx-i ;
cpu-flags gcc OPTIONS : x86 : ivy-bridge : -march=core-avx-i ;
cpu-flags gcc OPTIONS : x86 : haswell : -march=core-avx-i -mavx2 -mfma -mbmi -mbmi2 -mlzcnt ;
cpu-flags gcc OPTIONS : x86 : broadwell : -march=broadwell ;
cpu-flags gcc OPTIONS : x86 : skylake : -march=skylake ;
cpu-flags gcc OPTIONS : x86 : skylake-avx512 : -march=skylake-avx512 ;
cpu-flags gcc OPTIONS : x86 : cannonlake : -march=skylake-avx512 -mavx512vbmi -mavx512ifma -msha ;
cpu-flags gcc OPTIONS : x86 : icelake-client : -march=icelake-client ;
cpu-flags gcc OPTIONS : x86 : icelake-server : -march=icelake-server ;
cpu-flags gcc OPTIONS : x86 : cascadelake : -march=skylake-avx512 -mavx512vnni ;
cpu-flags gcc OPTIONS : x86 : cooperlake : -march=cooperlake ;
cpu-flags gcc OPTIONS : x86 : tigerlake : -march=tigerlake ;
cpu-flags gcc OPTIONS : x86 : k6 : -march=k6 ;
cpu-flags gcc OPTIONS : x86 : k6-2 : -march=k6-2 ;
cpu-flags gcc OPTIONS : x86 : k6-3 : -march=k6-3 ;
cpu-flags gcc OPTIONS : x86 : athlon : -march=athlon ;
cpu-flags gcc OPTIONS : x86 : athlon-tbird : -march=athlon-tbird ;
cpu-flags gcc OPTIONS : x86 : athlon-4 : -march=athlon-4 ;
cpu-flags gcc OPTIONS : x86 : athlon-xp : -march=athlon-xp ;
cpu-flags gcc OPTIONS : x86 : athlon-mp : -march=athlon-mp ;
##
cpu-flags gcc OPTIONS : x86 : k8 : -march=k8 ;
cpu-flags gcc OPTIONS : x86 : opteron : -march=opteron ;
cpu-flags gcc OPTIONS : x86 : athlon64 : -march=athlon64 ;
cpu-flags gcc OPTIONS : x86 : athlon-fx : -march=athlon-fx ;
cpu-flags gcc OPTIONS : x86 : k8-sse3 : -march=k8-sse3 ;
cpu-flags gcc OPTIONS : x86 : opteron-sse3 : -march=opteron-sse3 ;
cpu-flags gcc OPTIONS : x86 : athlon64-sse3 : -march=athlon64-sse3 ;
cpu-flags gcc OPTIONS : x86 : amdfam10 : -march=amdfam10 ;
cpu-flags gcc OPTIONS : x86 : barcelona : -march=barcelona ;
cpu-flags gcc OPTIONS : x86 : bdver1 : -march=bdver1 ;
cpu-flags gcc OPTIONS : x86 : bdver2 : -march=bdver2 ;
cpu-flags gcc OPTIONS : x86 : bdver3 : -march=bdver3 ;
cpu-flags gcc OPTIONS : x86 : bdver4 : -march=bdver4 ;
cpu-flags gcc OPTIONS : x86 : btver1 : -march=btver1 ;
cpu-flags gcc OPTIONS : x86 : btver2 : -march=btver2 ;
cpu-flags gcc OPTIONS : x86 : znver1 : -march=znver1 ;
cpu-flags gcc OPTIONS : x86 : znver2 : -march=znver2 ;
cpu-flags gcc OPTIONS : x86 : winchip-c6 : -march=winchip-c6 ;
cpu-flags gcc OPTIONS : x86 : winchip2 : -march=winchip2 ;
cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ;
cpu-flags gcc OPTIONS : x86 : c3-2 : -march=c3-2 ;
cpu-flags gcc OPTIONS : x86 : c7 : -march=c7 ;
##
cpu-flags gcc OPTIONS : x86 : atom : -march=atom ;
# Sparc
cpu-flags gcc OPTIONS : sparc : v7 : -mcpu=v7 : default ;
cpu-flags gcc OPTIONS : sparc : cypress : -mcpu=cypress ;
cpu-flags gcc OPTIONS : sparc : v8 : -mcpu=v8 ;
cpu-flags gcc OPTIONS : sparc : supersparc : -mcpu=supersparc ;
cpu-flags gcc OPTIONS : sparc : sparclite : -mcpu=sparclite ;
cpu-flags gcc OPTIONS : sparc : hypersparc : -mcpu=hypersparc ;
cpu-flags gcc OPTIONS : sparc : sparclite86x : -mcpu=sparclite86x ;
cpu-flags gcc OPTIONS : sparc : f930 : -mcpu=f930 ;
cpu-flags gcc OPTIONS : sparc : f934 : -mcpu=f934 ;
cpu-flags gcc OPTIONS : sparc : sparclet : -mcpu=sparclet ;
cpu-flags gcc OPTIONS : sparc : tsc701 : -mcpu=tsc701 ;
cpu-flags gcc OPTIONS : sparc : v9 : -mcpu=v9 ;
cpu-flags gcc OPTIONS : sparc : ultrasparc : -mcpu=ultrasparc ;
cpu-flags gcc OPTIONS : sparc : ultrasparc3 : -mcpu=ultrasparc3 ;
# RS/6000 & PowerPC
cpu-flags gcc OPTIONS : power : 403 : -mcpu=403 ;
cpu-flags gcc OPTIONS : power : 505 : -mcpu=505 ;
cpu-flags gcc OPTIONS : power : 601 : -mcpu=601 ;
cpu-flags gcc OPTIONS : power : 602 : -mcpu=602 ;
cpu-flags gcc OPTIONS : power : 603 : -mcpu=603 ;
cpu-flags gcc OPTIONS : power : 603e : -mcpu=603e ;
cpu-flags gcc OPTIONS : power : 604 : -mcpu=604 ;
cpu-flags gcc OPTIONS : power : 604e : -mcpu=604e ;
cpu-flags gcc OPTIONS : power : 620 : -mcpu=620 ;
cpu-flags gcc OPTIONS : power : 630 : -mcpu=630 ;
cpu-flags gcc OPTIONS : power : 740 : -mcpu=740 ;
cpu-flags gcc OPTIONS : power : 7400 : -mcpu=7400 ;
cpu-flags gcc OPTIONS : power : 7450 : -mcpu=7450 ;
cpu-flags gcc OPTIONS : power : 750 : -mcpu=750 ;
cpu-flags gcc OPTIONS : power : 801 : -mcpu=801 ;
cpu-flags gcc OPTIONS : power : 821 : -mcpu=821 ;
cpu-flags gcc OPTIONS : power : 823 : -mcpu=823 ;
cpu-flags gcc OPTIONS : power : 860 : -mcpu=860 ;
cpu-flags gcc OPTIONS : power : 970 : -mcpu=970 ;
cpu-flags gcc OPTIONS : power : 8540 : -mcpu=8540 ;
cpu-flags gcc OPTIONS : power : power : -mcpu=power ;
cpu-flags gcc OPTIONS : power : power2 : -mcpu=power2 ;
cpu-flags gcc OPTIONS : power : power3 : -mcpu=power3 ;
cpu-flags gcc OPTIONS : power : power4 : -mcpu=power4 ;
cpu-flags gcc OPTIONS : power : power5 : -mcpu=power5 ;
cpu-flags gcc OPTIONS : power : powerpc : -mcpu=powerpc ;
cpu-flags gcc OPTIONS : power : powerpc64 : -mcpu=powerpc64 ;
cpu-flags gcc OPTIONS : power : rios : -mcpu=rios ;
cpu-flags gcc OPTIONS : power : rios1 : -mcpu=rios1 ;
cpu-flags gcc OPTIONS : power : rios2 : -mcpu=rios2 ;
cpu-flags gcc OPTIONS : power : rsc : -mcpu=rsc ;
cpu-flags gcc OPTIONS : power : rs64a : -mcpu=rs64 ;
cpu-flags gcc OPTIONS : s390x : z196 : -march=z196 ;
cpu-flags gcc OPTIONS : s390x : zEC12 : -march=zEC12 ;
cpu-flags gcc OPTIONS : s390x : z13 : -march=z13 ;
cpu-flags gcc OPTIONS : s390x : z14 : -march=z14 ;
cpu-flags gcc OPTIONS : s390x : z15 : -march=z15 ;
# AIX variant of RS/6000 & PowerPC
toolset.flags gcc AROPTIONS <address-model>64/<target-os>aix : "-X64" ;

arslankhan

Posts: 5
Joined: Wed May 29, 2013 11:22 am

Building boost library on Raspberry pi

Hi,
I am new here. I want to built Devicehive c++ framwork boost library on raspberry pi
http://www.devicehive.com/reference-cpp … start.html
I am confused about user_congfig.jam .

before build the boost you have ensure that the ~/user-config.jam configuration file contains the following line:
using gcc : arm : arm-unknown-linux-gnueabi-g++ ;

but in my case in user_config.jam this command is not available. so what i have to do now.?
kindly guide if i hav’t posted on right place.
thanks



arslankhan

Posts: 5
Joined: Wed May 29, 2013 11:22 am

Re: Building boost library on Raspberry pi

Thu May 30, 2013 4:18 am

aaa801 wrote:try make CC=gcc

I did’t understand. I want to know about user_config.jam file. What i have to do if specified command is not found in this file.

after executing the above command following results shows

Code: Select all

/home/pi/boost_1_53_0/tools/build/v2/tools/gcc.jam:78: in gcc.init from module gcc
error: toolset gcc initialization:
error: provided command 'arm-unknown-linux-gnueabi-g++' not found
error: initialized from /home/pi/boost_1_53_0/tools/build/v2/user-config.jam:48
/home/pi/boost_1_53_0/tools/build/v2/build/toolset.jam:39: in toolset.using from module toolset
/home/pi/boost_1_53_0/tools/build/v2/build/project.jam:898: in using from module project-rules
/home/pi/boost_1_53_0/tools/build/v2/user-config.jam:48: in modules.load from module user-config
/home/pi/boost_1_53_0/tools/build/v2/build-system.jam:257: in load-config from module build-system
/home/pi/boost_1_53_0/tools/build/v2/build-system.jam:399: in load-configuration-files from module build-system
/home/pi/boost_1_53_0/tools/build/v2/build-system.jam:555: in load from module build-system
/home/pi/boost_1_53_0/tools/build/v2/kernel/modules.jam:283: in import from module modules
/home/pi/boost_1_53_0/tools/build/v2/kernel/bootstrap.jam:142: in boost-build from module
/home/pi/boost_1_53_0/boost-build.jam:17: in module scope from module



Return to “General discussion”

  • Печать

Страницы: [1]   Вниз

Тема: boost  (Прочитано 3663 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
Пончик

Доброго времени суток! Ребят. Собственно есть Эклипс и CDT. Собственно есть Win32 аплеты которые висят под бустом. Как мне начать использование буста под никсами? (стоит Ubuntu 10.10) .


andrey_p

Хотя на Ubuntu можно инсталлировать готовые библиотеки boost (частями или все сразу — libboost-dev-all), но лучше «начать с начала» — скачать и установить самому, чтобы разобраться, что там есть, что надо и как что использовать. Достаточная информация для старта — здесь.


Оффлайн
Пончик

Как писать под бустом я вкурсе =)

Дело в том что я вот вообще собрать bjam не могу. Подозреваю кривость рук.

alex@white-house:~/Рабочий стол/boost_1_46_1$ sudo sh  bootstrap.sh --prefix=/home/alex/Рабочий стол/boost_1_46_1/lib/
bootstrap.sh: 210: ./tools/build/v2/engine/src/build.sh: Permission denied
Building Boost.Jam with toolset ...
Failed to build Boost.Jam
Consult 'bootstrap.log' for more details


andrey_p

Да нет. Нормальные у тебя руки. :) Скорее всего это у бустовцев (или в архиваторе проблема — не знаю 7zip сохраняет аттрибуты).

Короче

chmod +x ./tools/build/v2/engine/src/build.sh


Оффлайн
Yurror

Руки может и нормальные, но моск не варит. Там файл INSTALL есть. Осиль пару строк на английском.


andrey_p

Руки может и нормальные, но моск не варит. Там файл INSTALL есть. Осиль пару строк на английском.

Ну это вы абсолютно зря. Нет ни там, ни в ссылке (которая там и составляет единственное его содержание) ничего про то, что боотстрап пытается запустить шелл-файл, у которого нет прав на выполнение.


Оффлайн
Бумер

Т.е. команда sh ни о чем не говорит?


andrey_p

Человеку, который использует sudo для установки в свой домашний каталог, может ничего не говорить. И это нормально для начинающих.

И да, хотел сказать видимо, не команда sh, а расширение .sh


Оффлайн
Yurror

Руки может и нормальные, но моск не варит. Там файл INSTALL есть. Осиль пару строк на английском.

Ну это вы абсолютно зря. Нет ни там, ни в ссылке (которая там и составляет единственное его содержание) ничего про то, что боотстрап пытается запустить шелл-файл, у которого нет прав на выполнение.

В этом файле есть ссылка на исчерпывающую инструкцию по установке буста.


Оффлайн
Пончик

Хмм теперь так:

alex@white-house:~/Рабочий стол/boost_1_46_1$  sudo bjam --build-dir=/home/alex/Рабочий стол/boost_1_46_1/x64/ toolset=gcc stage
/home/alex/Рабочий стол/boost_1_46_1/tools/build/v2/tools/gcc.jam:129: in gcc.init from module gcc
error: toolset gcc initialization:
error: no command provided, default command 'g++' not found
error: initialized from /home/alex/Рабочий стол/boost_1_46_1/tools/build/v2/build/project.jam:886
/home/alex/Рабочий стол/boost_1_46_1/tools/build/v2/build/toolset.jam:38: in toolset.using from module toolset
/home/alex/Рабочий стол/boost_1_46_1/tools/build/v2/build/project.jam:886: in using from module site-config
/etc/site-config.jam:5: in modules.load from module site-config
/home/alex/Рабочий стол/boost_1_46_1/tools/build/v2/build-system.jam:257: in load-config from module build-system
/home/alex/Рабочий стол/boost_1_46_1/tools/build/v2/build-system.jam:361: in load-configuration-files from module build-system
/home/alex/Рабочий стол/boost_1_46_1/tools/build/v2/build-system.jam:554: in load from module build-system
/home/alex/Рабочий стол/boost_1_46_1/tools/build/v2/kernel/modules.jam:283: in import from module modules
/home/alex/Рабочий стол/boost_1_46_1/tools/build/v2/kernel/bootstrap.jam:142: in boost-build from module
/home/alex/Рабочий стол/boost_1_46_1/boost-build.jam:17: in module scope from module


Оффлайн
Yurror

http://www.boost.org/doc/libs/1_46_1/more/getting_started/unix-variants.html#easy-build-and-install

Для тех кто не читает по английски
1) качаешь с сайта буста .tar.bz2 тарбол. именно этот самый и никакой другой. именно в нём стоят все права правильно. еще раз повторяю именно с таким расширением по другому работать не будет (.tar.gz тоже подойдет но ты скорее удавишься за лишний метр файла и гребешь себе геморрой со сборкой буста и не пойми какими касяками из за того что файл не был предназначен для сборки под unix-like OS)
2) качаешь и кладёшь в ДОМАШНЮЮ директорию а не на рабочий стол. Я еще с винды не люблю пробелы в именах файлов. вероятнее всего данный пункт не имеет значения но именно так проверено и работает
3) Проверяешь что у тебя установлено всё что надо
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential libicu-dev libbz2-dev zlib1g-dev
4) распаковка boost’а. открываешь терминал и распаковываешь его прямо в домашнюю директорию tar xvf boost_1_46_1.tar.bz2
5) конфигурирование и сборка
cd boost_1_46_1/
./bootstrap.sh —prefix=$HOME/usr —without-libraries=graph,graph_parallel,math,mpi,python,random,signals,test,wave
./bjam
./bjam install

Всё. Буст установлен. лежит в дереве $HOME/usr/
В проектах надо будет прописывать -I$HOME/usr/include -L$HOME/usr/lib
Подойди к этому творчески и осиль что $HOME должно заменяться полным путём к твоему домашнему каталогу
Если понятия не имеешь что это за путь в терминале набери echo $HOME вот этим самым он и должен заменяться

Учи английский!

andrey_p, так что кривые там руки и радиус кривизны очень маленький, руки крюки ажно как крюк у капитана Флинта.


Оффлайн
Пончик

Спасибо за помощь, но я не люблю когда меня унижают. Да я идиот но не клинический. И «для тех кто не читает по английски» ткните где написано что «качать под никсы надо именно тот архив» . Я вот такого там не заметил. Да и читать слава богу умею. Так что если хотите помочь, будьте любезны , сдерживайте свои эмоции при себе  :coolsmiley:


Пользователь решил продолжить мысль 22 Мая 2011, 23:53:42:


./bjam install

Такс… стоп. А что оно собирает ? х32 или х64 если у меня стоит ОС х64 ?

И почему так?

./bootstrap.sh --prefix=$HOME/usr --without-libraries=graph,graph_parallel,math,mpi,python,random,signals,test,wave
Зачем исключать те либы?

« Последнее редактирование: 22 Мая 2011, 23:53:42 от Пончик »


andrey_p

Мда, переехали ТС на ровном месте зачем-то…  ???

Ну знаний действительно не хватает, и информация не совсем точная — пишешь, что есть Eclipse + CDT, но надо было хотя бы «Hello, world» на С++ попытаться скомпилировать с его помощью. Тогда бы и обнаружил, что у тебя g++ не установлен.

Почему исключать библиотеки, ИМО потому что повылазят еще зависимости, которые приведут к ошибкам. Надо сделать так:

sudo apt-get build-dep libboost-all-dev
При этом установятся все зависимости, которые требуются для компиляции всех библиотек boost. А скомпилироваться должно все что надо (x64), в любом случае этот вопрос из серии, на которые ответ — сделай и посмотри.


Оффлайн
Пончик

Ох… я же пишу что я дурак но не клинический. 3 года программирования на Винде. + 10 лет опыта работы с виндой. Знаю что здесь это не к чему но просто обидно когда держат за полного идиота. Само собой Хеллоу Ворлд нормально компилится, и не только он. И GCC у меня обновленный.

У меня вывалилось кажется на графах. Есть предположение что Yurror выключил те либы из-за не совместимости.


Оффлайн
Yurror

за 3 с лишним года опыта программирования даже под виндой такие вопросы задают гуглу. и читают доки.
не идиот, не клинический, но читать ты точно не умеешь. глаза поднять не мог??? вот тут и написано какой тарбол качать надо
http://www.boost.org/doc/libs/1_46_1/more/getting_started/unix-variants.html#get-boost

Почему так? мне лень было собирать остальное. Их зависимости тебе уже подсказали как разрулить (я надеюсь ты найдешь нужную строчку именно на этой самой странице).
Учись побольше читать и поменьше обижаться на форумах, когда носом в лужу тыкают.

« Последнее редактирование: 23 Мая 2011, 14:23:31 от Yurror »


  • Печать

Страницы: [1]   Вверх

  • Forum
  • Beginners
  • Could someone talk a beginner through in

Could someone talk a beginner through installing boost thread and sockets on code blocks

Pages: 12

i need a really patient person whos better at explaining things than the website, I literally followed the instructions to the latter, nada.
both sockets and threads dont njust need headers i think they need .dlls too

create the exe and copy the dlls in the same folder

i need a really patient person whos better at explaining things than the website, I literally followed the instructions to the latter, nada.

So does that mean after your followed the instruction your computer pop and was not seen ever after? Then it’s definitely stolen by an extraterrestrial.

Or (less likely) did you get any error messages? And you feel too ashamed to tell us what it is?

I was told to do something in command prompt, it told me exactly what to type but the command prompt kept shouting at me and telling me that i was using the wrong syntax :/

create exe? how what? eh? qui? is that what the command prompt thing was….wooo guess i really am beginner

Last edited on

how can you have 644 posts and still have so little knowledge

what’s the error you get?

im verbal, you guys pretty much taught me c++ too (you guys created me, i am a reflection of your joint efforts to teach) plus i ignored lots of things that i have to deal with now…error coming up :) (HAHA!)

Last edited on

Well if i click boost jam it comes and goes so fast i just see command prompt flick

and you are sure the programm doesn’t just execute all the comands and then closes the prompt?

To be honest why are you trying to work with threading if you have yet to find out about how to build libraries? I don’t mean to be rude but I think your getting a little ahead of yourself.

But what exactly are you having problems with? Can you give us the error messages, or what step you didn’t understand?

wait i dont have no boost pro installer, there was some kind of issue as to why i coldnt

Seriously dont worry about being rude, like i said you guys gave me the direction in which to learn, i can only read tutorials i cant really know what to move onto afterwards.

well what should i move onto? i am playing with linked lists (fun2code helped me loads) then templated linked lists, i get that i still need practice there but for now i want tom move on a bit; seems the rest of the stuff is with libraries, im good with sdl no problems installing that.

problem is for ages and ages i practiced simply by opening empty file saving it as c++ and practicing my code without including headers and sources, i do now but its all over the place…

to be fair i dont even know where to start enough to tell you if i got errors, i just want more keywords that do stuff to play with :'(

Ok here is something that can help you with compiling libraries. Go get the sfml graphics API and install it. You can find the download at www.sfml-dev.org and here is their tutorial for installing http://www.sfml-dev.org/tutorials/2.0/start-cb.php.

This should give you a little idea how to link .dll files and set up a libray. Personally I had a pain in the ass time my first time trying to install SFML so it could be a nice little challenge and help you learn about the linker more.

Last edited on

Ooh thread i want thread.
k this is where i go wrong

http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef it says to build do said thing in command prompt so i do and command prompt rejects the commands

im proly gonna really struggle to learn them libraries anyway, so with boost sockets i can just include the boost asio header like any other header in a project???

where did i go wrong, how did you guys learn this from beginner??

Last edited on

you probably need to set additional dependencies in the project configuration

k thanks zereo =)

Ok here is some help with the command prompt

1)Type this into the command prompt make sure you enter the path where you unzipped or put Boost Jam in the <path> spot.

set PATH=<path>boost-jam-3.1.18-1-ntx86;%PATH%

2) Change to the Boost sources directory (Again where <path> is put the path where you unpacked your boost sources to)

cd /D <path>boost_1_47_0

3) Next type this bjam --toolset=gcc "--prefix=<installpath>" install

Note: That where <installpath> is you put the path where you want it installed to. For codeblocks I would recommend the codeblocks root folder.

If you have trouble with any of these steps let me know and I can go into more detail

3)

k this is further than i got but say iwas installing in c:/ (just to be simple) i get this error

c:boostboost_1_47_0boost_1_47_0>bjam —toolset=gcc «—prefix=c:/» install
warning: mismatched versions of Boost.Build engine and core
warning: Boost.Build engine (bjam) is 03.1.18
warning: Boost.Build core (at c:/boost/boost_1_47_0/boost_1_47_0/tools/build/v2)
is 2011.04-svn
c:/boost/boost_1_47_0/boost_1_47_0/tools/build/v2/toolsgcc.jam:129: in gcc.init
from module gcc
error: toolset gcc initialization:
error: no command provided, default command ‘g++’ not found
error: initialized from
c:/boost/boost_1_47_0/boost_1_47_0/tools/build/v2/buildtoolset.jam:38: in tools
et.using from module toolset
c:/boost/boost_1_47_0/boost_1_47_0/tools/build/v2build-system.jam:481: in proce
ss-explicit-toolset-requests from module build-system
c:/boost/boost_1_47_0/boost_1_47_0/tools/build/v2build-system.jam:562: in load
from module build-system
c:boostboost_1_47_0boost_1_47_0toolsbuildv2/kernelmodules.jam:283: in imp
ort from module modules
c:boostboost_1_47_0boost_1_47_0toolsbuildv2kernelbootstrap.jam:142: in b
oost-build from module
c:boostboost_1_47_0boost_1_47_0boost-build.jam:17: in module scope from modu
le

so i guess something is past its sell by?

Last edited on

check if the environment variables are set to the right path

what is enviroment variables?

Pages: 12

Понравилась статья? Поделить с друзьями:
  • Error too many decimal points in number arduino
  • Error too many change security questions requests please try again later
  • Error too many bone influences per vertex
  • Error too many attempts try again later
  • Error too many arguments to function long int random