Boost logo

Boost-Build :

From: weininghao (weininghao_at_[hidden])
Date: 2005-07-27 08:36:31


Hi,

Thanks.

I found the reason why my configure "using gcc" cannot be recognized:
I always modfied the user-config.jam file under the root directory of
Boost.Build, but neglected another user-config.jam file has existed in
the HOME directory.
1) Now I add "using gcc" into the latter file, it works. But I still
get the warning:
warning: Python location is not configured
warning: the Boost.Python library won't be built

I have done: export PYTHON_ROOT=/usr, why got such warning?

2) Does that mean the file user-config.jam under HOME directory will
be checked firstly, and if it is existed, the one under Boost.Build
root directory will not be checked?
(In step3 at http://boost.org/doc/html/bbv2/installation.html, it says
that the user-config.jam file is in the Boost.Build root directory )

3) I want to use Boost.Build.V2 , but I started to work from
http://www.boost.org/more/getting_started.html. There are some
comamnds such as "bjam "-sTOOLS=gcc" install"(in step5), which has not
been mentioned is special for v1. So I use it with configuring
user-cinfig.jam at the same time.
Then the correct way to use v2 is totally following
http://boost.org/doc/html/bbv2/installation.html, am I right?

Best regards,
Weining

> > 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.
>

> My steps are:
>
> 1 Check out Boost

Good.

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

Okay...

> 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 GCC_ROOT_DIRECTORY=/usr
export PYTHON_ROOT=/usr
export PYTHON_VERSION=2.3

> 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
> - export BOOST_BUILD_PATH
> /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
required.

> 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
www.boost-consulting.com
 

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk