Boost logo

Boost-Build :

Subject: Re: [Boost-build] bpl-test sources list being automatically sorted?
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-08-29 09:20:56


On Sunday 02 August 2009 Haoyu Bai wrote:

> And steps to reproduce this:
>
> $ svn co https://svn.boost.org/svn/boost/sandbox-branches/bhy/py3k
> $ cd libs/python/test/
> $ bjam polymorphism2_auto_ptr # (you don't need to build it with py3k,
> any verison of Python is ok)
...
> $ bjam
>
> The result will be:
>
> ...
> bpl-test=
> polymorphism2_auto_ptr.py
> enum.py
> polymorphism2.py
> polymorphism2_auto_ptr.cpp
> ...
>
> beforerun=
> libboost_python-gcc44-d-1_39.so.1.39.0
> polymorphism2.py
> polymorphism2_auto_ptr.py
> enum.py
> polymorphism2_auto_ptr.cpp

I have finally tracked this down and fixed on trunk:

        https://svn.boost.org/trac/boost/changeset/55864

The sources were actually sorted. The reason why this
sorting appears to be incomplete, and the reason why this
only appears to happen if you build all targets, is that we're
not sorting names of source files. We are sorting the targets,
or more specifically string ids of class instances in Boost.Jam
language. Therefore the order does not correspond to lexicographic
ordering of the names, and the order depends on what other targets
were created before.

You might want to port to your branch. Though, IIRC, you're gonna
merge your changes to trunk soon. In that case, you might want
to just skip the workaround you did on the branch when doing
the merge.

HTH,
Volodya

> ...
>
> ...patience...
> ...patience...
> warning: <p.>polymorphism2.py depends on itself
> warning: <p.>enum.py depends on itself
> ...found 2637 targets...
> ...updating 264 targets...
> ...
> ====== BEGIN OUTPUT ======
> Traceback (most recent call last):
> File "../../../bin.v2/libs/python/test/polymorphism2_auto_ptr.test/gcc-4.4.1/debug/polymorphism2.py",
> line 90, in <module>
> from polymorphism2_ext import *
> ImportError: No module named polymorphism2_ext
> ...
> ...
> ...failed capture-output
> ../../../bin.v2/libs/python/test/polymorphism2_auto_ptr.test/gcc-4.4.1/debug/polymorphism2_auto_ptr...
>
>
> You see, the order in the python-test-generator.run stage (labeled as
> "beforerun") is changed, though apparently it is not sorted in
> alphabet order because the dummy enum.py is still in the middle.
> Because the "polymorphism2.py" is reordered as the first .py file and
> being recognized as the main entry point, this test will be failed, as
> you see in the output.
>
> I also noticed a strange warning "warning: <p.>polymorphism2.py
> depends on itself". So, I tried to commented out "[ bpl-test
> polymorphism2 ]" line in Jamfile.v2, and then, the problem is not
> occur anymore! I also tried to move the "[ bpl-test polymorphism2 ]
> " line to a position after "polymorphism2_auto_ptr" test case, and no
> more fails too. So at least I got a workaround now, but still got the
> "warning: <p.>polymorphism2.py depends on itself".
>
> You might want to review my 2to3 support code for bpl-test:
> https://svn.boost.org/trac/boost/changeset/55359 But I think it is
> irrelevant to this problem because I can also reproduce this problem
> in Boost's trunk branch.
>
> Any ideas? Thank you!
>
>
>


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