Boost logo

Boost-Build :

Subject: Re: [Boost-build] Too much warning noise
From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-09-27 06:10:50


On Thursday 25 September 2008 21:06:01 Mat Marcus wrote:
> We have a library that depends on boost and is built using
> boost-build/jamfiles. In particular our libs require filesystem,
> thread, and signal, but not graph, regex or python. Every time
> clients of our library build using boost-build from 1.36.0, they get
> the following text at the beginning of the output:
>
> warning: Graph library does not contain optional GraphML reader.
> note: to enable GraphML support, set EXPAT_INCLUDE and EXPAT_LIBPATH to the
> note: directories containing the Expat headers and libraries, respectively.
> warning: skipping optional Message Passing Interface (MPI) library.
> note: to enable MPI support, add "using mpi ;" to user-config.jam.
> note: to suppress this message, pass "--without-mpi" to bjam.
> note: otherwise, you can safely ignore this message.
> WARNING: No python installation configured and autoconfiguration
> failed. See http://www.boost.org/libs/python/doc/building.html
> for configuration instructions or pass --without-python to
> suppress this message and silently skip all Boost.Python targets
> Building Boost.Regex with the optional Unicode/ICU support disabled.
> Please refer to the Boost.Regex documentation for more information
>
> We have clients in several dozen projects. A number of them have a
> warnings-are-errors policy. It is a burden to support them with
> respect to these warnings, for several reasons.
>
> 1) The clients are not even using the aforementioned libraries.
> 2) Even if they new the proper incantation, they prefer to type, for
> example, "bjam" as opposed to "bjam --without-mpi --without-python",
> etc.
> 3) --without-mpi no longer seems to suppress the MPI warning in boost
> 1.36.0. Is --without broken?

It is not, but the warning is emitted whether you use a library, or not.

> 4) There doesn't seem to be a documented way to suppress these
> warnings from our library's Jamfile.v2
>
> I think it would be a good idea to institute a boost policy like:
>
> Users see no warnings for components that they are not building.

I agree.

> In particular, I'd like to see all of text above vanish when our
> library is built. If people don't agree with this, then I'd like to at
> least see a way that we could implement this policy from our own
> Jamfiles. Thoughts? But for the short term, consider this is a
> possible bug report: in our configuration --without-mpi seems to have
> no effect. If this isn't just a local issue here, can someone suggest
> a workaround and/or a patch?

I think there are two levels of possible supressions here:

- you should not get any warning for a library you don't build
- you probably should be able to indicate you really don't
want to see a warning any more of a library you build. Say, if
you use boost.graph, but don't care about graphml.

I think that both things are needed. But I suspect that for big
projects, you better not even 'configure' things that don't use.
Say, if you use Boost, but don't use Boost.Graph, and you have
50 other things to configure already, then you should not even
see anything about Boost.Graph. Which means that to solve your
immediately problem, we don't need to first write generic configuration
framework -- but rather make Boost.Graph not to emit the warning
when it's not built.

Does this sound sane? If so, I'll put together a patch.

- Volodya


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