Boost Users :
Subject: Re: [Boost-users] boost 1.47: gcc file dependency generation trips over BOOST_PARAMETER_MAX_ARITY
From: Ytsen de Boer (yrdeboer_at_[hidden])
Date: 2011-09-15 04:24:18
Thank you for your response, please allow me to explain the problem
a bit clearer:
The -MM option in gcc does the following (from the man page on my
Linux system): "instead of outputting the result of preprocessing,
output a rule suitable for make describing the dependencies of the
main source file. The preprocessor outputs one make rule containing
the object file name for that source file, a colon, and the names of
all the included files, including those coming from -include or
-imacros command line options."
In projects using the gcc compiler, this is a preferred way to take
care of the dependencies. However, this does not work anymore with the
new boost version, because, unless the macro BOOST_PARAMETER_MAX_ARITY
is defined to no less than 7, the preprocessor aborts, whilst
figuring out the dependencies, due to the following lines in
#define BOOST_PARAMETER_MAX_ARITY 7
#if BOOST_PARAMETER_MAX_ARITY < 7
#error This header requires BOOST_PARAMETER_MAX_ARITY to be defined as
7 or greater prior to including Boost.Parameter headers
#endif // BOOST_PARAMETER_MAX_ARITY < 7
#endif // !defined(BOOST_PARAMETER_MAX_ARITY)
This means that the gcc native way of figuring out dependencies, is
broken. I believe this cannot be intended.
Please let me know if the problem is still not understood, or if you
have a different view on this matter.
2011/9/13 Dave Abrahams <dave_at_[hidden]>:
> on Mon Sep 05 2011, Ytsen de Boer <yrdeboer-AT-gmail.com> wrote:
>> Â Hi,
>> Â To take care of dependencies in my project using boost, I used to
>> invoke gcc with the option -MM.
> What does -MM do?
>> However, since using boost 1.47, this does not work anymore. The
>> precompiler aborts with the message:
>> error: #error This header requires BOOST_PARAMETER_MAX_ARITY to be
>> defined as 7 or greater prior to including Boost.Parameter headers
>> Â Because the macro BOOST_PARAMETER_MAX_ARITY plays no role whatsover
>> in this invocation of gcc, I think that boost should solve their
>> internal problem with the "arity" in some other way.
> I don't know what you mean. Â It defaults to 5, but signals2 apparently
> needs support for 7 arguments.
>> Â In the mean time I define the macro in my make rules to generate the
>> dependencies, but there it is obviously misplaced (any tips or tricks
>> are welcome here).
> I don't understand your problem, sorry.
> Dave Abrahams
> BoostPro Computing
> Boost-users mailing list
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net