Skip to content

Can't compile and install b2 with b2 #358

Closed
@rossburton

Description

@rossburton

If I build b2 with b2 (because I want to cross-compile b2), then I can't install it. This reproduces outside of a cross environment too:

$ b2 b2
warning: No toolsets are configured.
warning: Configuring default toolset "gcc".
warning: If the default is wrong, your build may not work correctly.
warning: Use the "toolset=xxxxx" option to override our guess.
warning: For more configuration options, please consult
warning: https://www.bfgroup.xyz/b2/manual/release/index.html#bbv2.overview.configuration
...patience...
...found 275 targets...
...updating 71 targets...
gcc.compile.c++ .build/gcc-11/debug/cxxstd-11-iso/threading-multi/src/engine/yyacc.o
gcc.compile.c++ .build/gcc-11/debug/cxxstd-11-iso/threading-multi/src/engine/w32_getreg.o
[ ... ]

At this point there's a freshly built b2 binary at .build/gcc-11/debug/cxxstd-11-iso/threading-multi/b2.

$ b2 install
warning: No toolsets are configured.
warning: Configuring default toolset "gcc".
warning: If the default is wrong, your build may not work correctly.
warning: Use the "toolset=xxxxx" option to override our guess.
warning: For more configuration options, please consult
warning: https://www.bfgroup.xyz/b2/manual/release/index.html#bbv2.overview.configuration
error: Unable to find file or target named
error:     '/path/to/b2-5.0.0/src/engine/b2'
error: referred to from project at
error:     '.'

Looks like the jamfile hardcodes the location of the bootstrap build:

install b2-engine
    :   $(SELF)/src/engine/b2$(ext)

Obviously most people will use the bootstrap flow, but if I want a b2 for my cross-compiled target then I should be able to use b2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions