Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile and install b2 with b2 #358

Closed
rossburton opened this issue Jan 19, 2024 · 1 comment
Closed

Can't compile and install b2 with b2 #358

rossburton opened this issue Jan 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rossburton
Copy link

rossburton commented Jan 19, 2024

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.

@rossburton rossburton added the bug Something isn't working label Jan 19, 2024
@rossburton rossburton changed the title Can't install b2 with b2 Can't compile and install b2 with b2 Jan 19, 2024
@grafikrobot
Copy link
Member

Thank you for the report. I resolved it with the assumption that for the cross-compile use case you'll be using target-os=xyz. If your use case is different feel free to re-open and explain further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants