Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2005-07-25 13:19:02

This question belongs in the Boost.Build list, so I'm redirecting
followups there.

Weining Hao <weininghao_at_[hidden]> writes:

> Hi,
> Could you be patient to have a look on my steps from
> install boost to build the example "hello"? I consider
> I did them according to the guides, but still get an
> error as building the example:((
> warning: no toolsets are configured. warning: you
> won't be able to build C++ programs. warning: please
> consult the documentation.
> /home/hnn/boost/tools/build/v2/build/targets.jam:1245:
> in construct from moduleobject(typed-target)@1

This is simple; it means your user-config.jam isn't being found.

> error: unable to construct ./hello ............
> My steps are:
> 1 Check out Boost


> 2 Build and install Boost.Bjam
> - go to <root of boost>/tools/build/jam-src, then run
> sh ./
> - copy the generated file bjam to /usr/local/bin and


> copy again to get bjam and jam

...where did we tell you to do that?
copy what again?

Not that it matters; this won't hurt you.

> 3 Configure tools and parameters
> - <root of boost>/bjam "-sGCC_ROOT_DIRECTORY=/usr"

Our instructions must not be very clear. That doesn't "configure tools
and parameters." If you happen to have a bjam executable at the root
of boost, it would build all of boost. But according to what you've
told us so far, you don't have a bjam there, so I'm confused.

> - <root of boost>/export PYTHON_ROOT=/usr

Did that work? Do you have an executable called "export" at the root
of boost?

> - <root of boost>/export PYTHON_VERSION=2.3

Same question.

I think what you meant to do would have been something like

export PYTHON_ROOT=/usr

> 4 Build and install Boost libraries
> - <root of boost>/bjam "-sTOOLS=gcc" install

That step is not required. What instructions are you following?

> 5 Set build path for Boost.Build
> /home/hnn/boost/tools/build/v2

Whoa there. You have been using a mixture of v1 idioms up 'till now,
now you're using v2. Is that intentional? That step is also not

> 6 Configure user-config.jam at <root of
> boost>/tools/build/v2/
> - Change the content of file user-config.jam to:
> import toolset : using ;
> using gcc;
> - <root of boost>/bjam install

Another v2 idiom. This repeats the effect of step 4, but using v2 this time.

> 7 Build "hello" example with bjam
> - go to <root of boost>/tools/build/v2/example/hello,
> then run
> bjam --v2
> - get the error listed above

Normally the user-config.jam file should be found in your home directory.

> My questions are:
> 1 Are there some problems in those steps?
> 2 In step2, I get only one file bjam after builing
> boost.bjam. However the guide says there should be two
> files bjam and jam. Is there some error with me?

I think we just decided to stop building plain jam.

> 3 In step3,
> 1) do I need to use the command
> - bjam "-sGCC_ROOT_DIRECTORY=/usr"?

If you're using Boost.Build v2, definitely not.

> 2) Before my setting, how can I know whether my OS
> preconfigured this parameter or not?
> 3) And do I need to direct the parameter to the
> folder where the whole GCC are installed, or...?
> 4) If I configure a wrong path to this parameter,
> might I get the "warning: no toolsets are
> configured."?

I don't know the answers to these; I'll leave that to others.

Dave Abrahams
Boost Consulting

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at