Re: b2 configuration checks take long time

Mateusz Loskot via Boost-build <[email protected]>
Newsgroups gmane.comp.lib.boost.build
Message-ID <CABUeae-FXKN3UD-zOuic8XonN4+Z6iOBZa00qwan3UqZe7p51A@mail.gmail.com>
On Wed, 29 Aug 2018 at 21:24, Steven Watanabe via Boost-build
<[email protected]> wrote:
> On 08/29/2018 01:13 PM, Mateusz Loskot via Boost-build wrote:
> > ```
> > Performing configuration checks
> >     - default address-model    : 64-bit (cached)
> >     - default architecture     : x86 (cached)
> >     - symlinks supported       : yes (cached)
> > ```
> >
> > How can I speed up the b2 startup?
>
>
> Try inserting a Jamroot to block the extra work that Boost's
> Jamroot is doing automatically.  This is a bad idea in
> general, as the aforementioned work is important, but it
> should be okay as long as you set up `b2 headers` beforehand

Hi,

I've tried to apply the Jamroot trick, but without much success.
I did run `b2 headers`, as usual, as per our
https://github.com/boostorg/gil/blob/develop/CONTRIBUTING.md

Here is my Jamfile-s setup

1.  libs/gil/Jamfile

```
project boost-gil
    :
    requirements
        <toolset>gcc:<cxxflags>"-std=c++11"
        <toolset>clang:<cxxflags>"-std=c++11"
    ;

build-project test ;
```

2.  libs/gil/test/Jamfile

```
import testing ;

project
    : requirements
    <include>$(BOOST_ROOT)
    <include>.
    ;

test-suite "boost-gil-test-image-view"
    :
    [ compile image_view_concepts.cpp ]
    ;
```

##### Run b2 in lib/gil without local Jamroot trick

~/boost.wsl/libs/gil$ time b2
Performing configuration checks

    - default address-model    : 64-bit
    - default architecture     : x86
    - symlinks supported       : yes
...patience...
...found 1331 targets...
...updating 9 targets...
gcc.compile.c++
../../bin.v2/libs/gil/test/image_view/image_view_concepts.test/gcc-7.3.0/debug/image_view_concepts.o
**passed** ../../bin.v2/libs/gil/test/image_view/image_view_concepts.test/gcc-7.3.0/debug/image_view_concepts.test
...updated 9 targets...

real    0m35.011s
user    0m3.641s
sys     0m30.734s

~/boost.wsl/libs/gil$ time b2
Performing configuration checks

    - default address-model    : 64-bit (cached)
    - default architecture     : x86 (cached)
    - symlinks supported       : yes (cached)
...patience...
...found 1334 targets...

real    0m36.655s
user    0m2.641s
sys     0m33.781s


##### Run b2 in lib/gil with local lib/gil/Jamroot

~/boost.wsl/libs/gil$ cp $PWD/Jamfile $PWD/Jamroot

~/boost.wsl/libs/gil$ time b2
...found 14 targets...
...updating 2 targets...
gcc.compile.c++
test/image_view/bin/image_view_concepts.test/gcc-7.3.0/debug/image_view_concepts.o
In file included from test/image_view/image_view_concepts.cpp:9:0:
/usr/include/boost/gil/image_view.hpp: In instantiation of...

So, b2 is finding Boost headers installed system-wide.
To fix it and prefer super-project headers, in my case from ~/boost.wsl/boost
I have to update the local Jamroot adding to the project requirements
the root location:

<include>../../

Is that the right thing to do to apply the local Jamroot trick?


> and do not use any separately compiled boost libraries.

Yes, in this particular case I do not use compiled libraries.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.