|
Boost-Build : |
From: scottlburson (Gyro_at_[hidden])
Date: 2005-05-09 15:15:40
Ha! I found it! A few lines above the code quoted below in
`allyourbase.jam' is this line:
if ! $($(<[1]))
This is in the procedure `SubDir', which is expected to be called with
a single argument, the constant `TOP'. The condition in the line
above must be true the first time it is encountered; otherwise, the
initialization of `gTOP', which is within the body of the `if', is
never executed, and an infinite recursion results.
This amounts to an assumption that the variable `TOP' has no value.
However, these variables are initialized from the environment. So if
there is an environment variable TOP with a nonnull value, the code
breaks. Users of the `top' program, like me, sometimes set the `TOP'
environment variable in our `.login' or whatever.
So it isn't really a problem with Boost.Jam per se, but rather with
the code in `allyourbase.jam'.
Meanwhile, anyone running into this problem needs only to do `unset
TOP' (sh) or `unsetenv TOP' (csh) in the shell in which they're about
to do the build.
-- Scott
--- In jamboost_at_[hidden], "scottlburson" <Gyro_at_z...> wrote:
> Hi group,
>
> I am running into an infinite recursion in bjam when trying to build
> Boost (1.32.0, on a SuSE 9.0 system). It appears that others have
> also encountered this problem (see e.g. message 9256).
>
> I have spent a few hours poking at it, and have some interesting
> information, though not a solution.
>
> `tools/build/v1/allyourbase.jam' contains these lines:
>
> local top = [ root-paths $($(gTOP)) : [ PWD ] ] ;
> if ! $(gINCLUDED($(JAMRULES:R=$(top))))
> {
> # Gated entry.
>
> gINCLUDED($(JAMRULES:R=$(top))) = TRUE ; # <--
>
> # Include it.
>
> project-root ;
> include $(JAMRULES:R=$(top)) ;
> }
>
> Being new to Boost and Jam, I have not taken the time to understand
> how the code in this file works. I have discovered, however, that the
> variable `gTOP' is never acquiring a nonnull value, nor is `top'.
> Evidently, because `top' never has a value, the assignment marked
> "<--" fails. Anyway, despite the attempt at a "gated entry", as the
> comment puts it, an infinite recursion results.
>
> So my question for someone who understands this code is, what is
> supposed to happen? And why would `gTOP' fail to acquire a value?
> Where is its value supposed to come from?
>
> Any clues appreciated.
>
> -- Scott
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