Possible regression in boost 1.61

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

Possible regression in boost 1.61

Peter Gerell-4

Hi, when trying to upgrade to boost version 1.61 I get errors from the linker when building my project.

 

We had very similar errors reported with 1.60. They were fixed by this fix:

https://github.com/boostorg/spirit/commit/7690022b931b524223e65f4cd4277b8e5d55d7cb

 

I haven’t been able to create a small reproducible example yet, but maybe someone with insight into the differences between 1.60 and 1.61 could get something from the error messages.

The two errors I get are:

 

5>parser.lib(configfile.obj) : error LNK2019: unresolved external symbol "bool __cdecl parser::expr::parse_rule<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > >,struct boost::spirit::x3::context<struct boost::spirit::x3::error_handler_tag,class std::reference_wrapper<class parser::ErrorHandler<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > > > const ,struct boost::spirit::x3::unused_type>,struct boost::fusion::iterator_range<struct boost::fusion::basic_iterator<struct boost::fusion::struct_iterator_tag,struct boost::fusion::random_access_traversal_tag,struct parser::ast::Attribute,0>,struct boost::fusion::basic_iterator<struct boost::fusion::struct_iterator_tag,struct boost::fusion::random_access_traversal_tag,struct parser::ast::Attribute,1> > >(struct boost::spirit::x3::rule<struct parser::expr::identifier_class,struct parser::ast::Identifier,0>,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > &,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > const &,struct boost::spirit::x3::context<struct boost::spirit::x3::error_handler_tag,class std::reference_wrapper<class parser::ErrorHandler<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > > > const ,struct boost::spirit::x3::unused_type> const &,struct boost::fusion::iterator_range<struct boost::fusion::basic_iterator<struct boost::fusion::struct_iterator_tag,struct boost::fusion::random_access_traversal_tag,struct parser::ast::Attribute,0>,struct boost::fusion::basic_iterator<struct boost::fusion::struct_iterator_tag,struct boost::fusion::random_access_traversal_tag,struct parser::ast::Attribute,1> > &)" (??$parse_rule@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@U?$context@Uerror_handler_tag@x3@spirit@boost@@$$CBV?$reference_wrapper@V?$ErrorHandler@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@@parser@@@std@@Uunused_type@234@@x3@spirit@boost@@U?$iterator_range@U?$basic_iterator@Ustruct_iterator_tag@fusion@boost@@Urandom_access_traversal_tag@23@UAttribute@ast@parser@@$0A@@fusion@boost@@U?$basic_iterator@Ustruct_iterator_tag@fusion@boost@@Urandom_access_traversal_tag@23@UAttribute@ast@parser@@$00@23@@fusion@6@@expr@parser@@YA_NU?$rule@Uidentifier_class@expr@parser@@UIdentifier@ast@3@$0A@@x3@spirit@boost@@AEAV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@AEBV67@AEBU?$context@Uerror_handler_tag@x3@spirit@boost@@$$CBV?$reference_wrapper@V?$ErrorHandler@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@@parser@@@std@@Uunused_type@234@@345@AEAU?$iterator_range@U?$basic_iterator@Ustruct_iterator_tag@fusion@boost@@Urandom_access_traversal_tag@23@UAttribute@ast@parser@@$0A@@fusion@boost@@U?$basic_iterator@Ustruct_iterator_tag@fusion@boost@@Urandom_access_traversal_tag@23@UAttribute@ast@parser@@$00@23@@fusion@5@@Z) referenced in function "public: bool __cdecl boost::spirit::x3::rule<struct parser::expr::identifier_class,struct parser::ast::Identifier,0>::parse<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > >,struct boost::spirit::x3::context<struct boost::spirit::x3::error_handler_tag,class std::reference_wrapper<class parser::ErrorHandler<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > > > const ,struct boost::spirit::x3::unused_type>,struct boost::fusion::iterator_range<struct boost::fusion::basic_iterator<struct boost::fusion::struct_iterator_tag,struct boost::fusion::random_access_traversal_tag,struct parser::ast::Attribute,0>,struct boost::fusion::basic_iterator<struct boost::fusion::struct_iterator_tag,struct boost::fusion::random_access_traversal_tag,struct parser::ast::Attribute,1> > >(class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > &,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > const &,struct boost::spirit::x3::context<struct boost::spirit::x3::error_handler_tag,class std::reference_wrapper<class parser::ErrorHandler<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > > > const ,struct boost::spirit::x3::unused_type> const &,struct boost::spirit::x3::unused_type,struct boost::fusion::iterator_range<struct boost::fusion::basic_iterator<struct boost::fusion::struct_iterator_tag,struct boost::fusion::random_access_traversal_tag,struct parser::ast::Attribute,0>,struct boost::fusion::basic_iterator<struct boost::fusion::struct_iterator_tag,struct boost::fusion::random_access_traversal_tag,struct parser::ast::Attribute,1> > &)const " (??$parse@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@U?$context@Uerror_handler_tag@x3@spirit@boost@@$$CBV?$reference_wrapper@V?$ErrorHandler@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@@parser@@@std@@Uunused_type@234@@x3@spirit@boost@@U?$iterator_range@U?$basic_iterator@Ustruct_iterator_tag@fusion@boost@@Urandom_access_traversal_tag@23@UAttribute@ast@parser@@$0A@@fusion@boost@@U?$basic_iterator@Ustruct_iterator_tag@fusion@boost@@Urandom_access_traversal_tag@23@UAttribute@ast@parser@@$00@23@@fusion@6@@?$rule@Uidentifier_class@expr@parser@@UIdentifier@ast@3@$0A@@x3@spirit@boost@@QEBA_NAEAV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@AEBV45@AEBU?$context@Uerror_handler_tag@x3@spirit@boost@@$$CBV?$reference_wrapper@V?$ErrorHandler@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@@parser@@@std@@Uunused_type@234@@123@Uunused_type@123@AEAU?$iterator_range@U?$basic_iterator@Ustruct_iterator_tag@fusion@boost@@Urandom_access_traversal_tag@23@UAttribute@ast@parser@@$0A@@fusion@boost@@U?$basic_iterator@Ustruct_iterator_tag@fusion@boost@@Urandom_access_traversal_tag@23@UAttribute@ast@parser@@$00@23@@fusion@3@@Z)

 

5>parser.lib(common.obj) : error LNK2019: unresolved external symbol "bool __cdecl parser::expr::parse_rule<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > >,struct boost::spirit::x3::context<struct boost::spirit::x3::error_handler_tag,class std::reference_wrapper<class parser::ErrorHandler<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > > > const ,struct boost::spirit::x3::unused_type>,struct parser::ast::NamespaceStart>(struct boost::spirit::x3::rule<struct parser::expr::identifier_class,struct parser::ast::Identifier,0>,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > &,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > const &,struct boost::spirit::x3::context<struct boost::spirit::x3::error_handler_tag,class std::reference_wrapper<class parser::ErrorHandler<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > > > const ,struct boost::spirit::x3::unused_type> const &,struct parser::ast::NamespaceStart &)" (??$parse_rule@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@U?$context@Uerror_handler_tag@x3@spirit@boost@@$$CBV?$reference_wrapper@V?$ErrorHandler@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@@parser@@@std@@Uunused_type@234@@x3@spirit@boost@@UNamespaceStart@ast@parser@@@expr@parser@@YA_NU?$rule@Uidentifier_class@expr@parser@@UIdentifier@ast@3@$0A@@x3@spirit@boost@@AEAV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@AEBV67@AEBU?$context@Uerror_handler_tag@x3@spirit@boost@@$$CBV?$reference_wrapper@V?$ErrorHandler@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@@parser@@@std@@Uunused_type@234@@345@AEAUNamespaceStart@ast@1@@Z) referenced in function "public: bool __cdecl boost::spirit::x3::rule<struct parser::expr::identifier_class,struct parser::ast::Identifier,0>::parse<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > >,struct boost::spirit::x3::context<struct boost::spirit::x3::error_handler_tag,class std::reference_wrapper<class parser::ErrorHandler<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > > > const ,struct boost::spirit::x3::unused_type>,struct parser::ast::NamespaceStart>(class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > &,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > const &,struct boost::spirit::x3::context<struct boost::spirit::x3::error_handler_tag,class std::reference_wrapper<class parser::ErrorHandler<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<class lexer::Token> > > > > const ,struct boost::spirit::x3::unused_type> const &,struct boost::spirit::x3::unused_type,struct parser::ast::NamespaceStart &)const " (??$parse@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@U?$context@Uerror_handler_tag@x3@spirit@boost@@$$CBV?$reference_wrapper@V?$ErrorHandler@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@@parser@@@std@@Uunused_type@234@@x3@spirit@boost@@UNamespaceStart@ast@parser@@@?$rule@Uidentifier_class@expr@parser@@UIdentifier@ast@3@$0A@@x3@spirit@boost@@QEBA_NAEAV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@AEBV45@AEBU?$context@Uerror_handler_tag@x3@spirit@boost@@$$CBV?$reference_wrapper@V?$ErrorHandler@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@VToken@lexer@@@std@@@std@@@std@@@parser@@@std@@Uunused_type@234@@123@Uunused_type@123@AEAUNamespaceStart@ast@parser@@@Z)

 

Regards,

Peter

 


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Peter Gerell-4

Hi again.

The following commit is the one that causes my build to fail.

 

If I use the revision https://github.com/boostorg/spirit/commit/d91cf74106825ac3e79e2b3987854a3e604b3543 my application builds.

When using https://github.com/boostorg/spirit/commit/a8e391bd99dddb3f9ece84bdb1bb9236b0a37cf7 it fails.

 

At both these revisions I have cherry picked the change from https://github.com/boostorg/spirit/commit/7690022b931b524223e65f4cd4277b8e5d55d7cb

 

I get the same behavior on all my compilers. MSVC 14, g++ 4.9.3 and clang 3.8.

 

Regards,

Peter

 


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Joel de Guzman
On 17/05/2016 5:03 AM, Peter Gerell wrote:

> Hi again.
>
> The following commit is the one that causes my build to fail.
>
>
>
> If I use the revision
> https://github.com/boostorg/spirit/commit/d91cf74106825ac3e79e2b3987854a3e604b3543 my
> application builds.
>
> When using
> https://github.com/boostorg/spirit/commit/a8e391bd99dddb3f9ece84bdb1bb9236b0a37cf7 it fails.
>
>
>
> At both these revisions I have cherry picked the change from
> https://github.com/boostorg/spirit/commit/7690022b931b524223e65f4cd4277b8e5d55d7cb
>
>
>
> I get the same behavior on all my compilers. MSVC 14, g++ 4.9.3 and clang 3.8.

Hmmm... That's not good. Is anyone else getting this? Do you have a
minimal test case I can try?

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Peter Gerell-4
I will send a small project that recreates the problem off the list.
Hope you can make something out of it.
Regards,
Peter

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

sehe
On 19-05-16 11:44, Peter Gerell wrote:
> I will send a small project that recreates the problem off the list.
Why off the list? That prevents anyone else from stepping in and help

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Peter Gerell-4
Hi Seth.
At the time the code wasn't in a state I was comfortable publishing.
Now I have managed to reproduce the problem with a much smaller example.
The code is available at https://github.com/pgerell/spirit_x3_problem.

In the current state the program builds with boost 1.60 but not with 1.61.

If I remove the x3::omit directive in https://github.com/pgerell/spirit_x3_problem/blob/master/common_def.h and uncomment the appropriate lines in https://github.com/pgerell/spirit_x3_problem/blob/master/ast.h the program builds with both boost versions.

/Peter


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Joel de Guzman
On 24/05/2016 11:40 PM, Peter Gerell wrote:
> Hi Seth.
> At the time the code wasn't in a state I was comfortable publishing.
> Now I have managed to reproduce the problem with a much smaller example.
> The code is available at https://github.com/pgerell/spirit_x3_problem.
>
> In the current state the program builds with boost 1.60 but not with 1.61.
>
> If I remove the x3::omit directive in https://github.com/pgerell/spirit_x3_problem/blob/master/common_def.h and uncomment the appropriate lines in https://github.com/pgerell/spirit_x3_problem/blob/master/ast.h the program builds with both boost versions.

What's the exact type of start_rule() and what is the type from the linker
error and what's the difference?

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Peter Gerell-4
> What's the exact type of start_rule() and what is the type from the linker error and what's the difference?

This is the linker error I get, I have replaced the hard to read iterator type and removed boost::spirit:: prefixes.

common.cpp.o: In function `bool x3::rule<count_class, ast::Count, false>::parse<iterator, x3::unused_type, ast::Start>(terator&, iterator const&, x3::unused_type const&, x3::unused_type, ast::Start&) const':
rule.hpp:116: undefined reference to `bool parse_rule<iterator, x3::unused_type, ast::Start>(x3::rule<count_class, ast::Count, false>, iterator&, iterator const&, x3::unused_type const&, ast::Start&)'

Notice the mix of ast::Count and ast::Start.

The following parse_rule does exist in expression.cpp.o but for some reason this is not used.
bool parse_rule<iterator, x3::unused_type, ast::Count>(x3::rule<count_class, ast::Count, false>, iterator&, iterator const&, x3::unused_type const&, ast::Count&)

I can make the error go away by changing
using count_type = x3::rule<count_class, ast::Count>;
to
using count_type = x3::rule<count_class, ast::Start>;

However this breaks the original application in other ways as other rules still tries to call
bool parse_rule<iterator, x3::unused_type, ast::Count>(x3::rule<count_class, ast::Count, false>, iterator&, iterator const&, x3::unused_type const&, ast::Count&)
which no longer exist.

Regards,
Peter


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Joel de Guzman
On 25/05/2016 5:57 PM, Peter Gerell wrote:

>> What's the exact type of start_rule() and what is the type from the linker error and what's the difference?
>
> This is the linker error I get, I have replaced the hard to read iterator type and removed boost::spirit:: prefixes.
>
> common.cpp.o: In function `bool x3::rule<count_class, ast::Count, false>::parse<iterator, x3::unused_type, ast::Start>(terator&, iterator const&, x3::unused_type const&, x3::unused_type, ast::Start&) const':
> rule.hpp:116: undefined reference to `bool parse_rule<iterator, x3::unused_type, ast::Start>(x3::rule<count_class, ast::Count, false>, iterator&, iterator const&, x3::unused_type const&, ast::Start&)'
>
> Notice the mix of ast::Count and ast::Start.
>
> The following parse_rule does exist in expression.cpp.o but for some reason this is not used.
> bool parse_rule<iterator, x3::unused_type, ast::Count>(x3::rule<count_class, ast::Count, false>, iterator&, iterator const&, x3::unused_type const&, ast::Count&)
>
> I can make the error go away by changing
> using count_type = x3::rule<count_class, ast::Count>;
> to
> using count_type = x3::rule<count_class, ast::Start>;
>
> However this breaks the original application in other ways as other rules still tries to call
> bool parse_rule<iterator, x3::unused_type, ast::Count>(x3::rule<count_class, ast::Count, false>, iterator&, iterator const&, x3::unused_type const&, ast::Count&)
> which no longer exist.

Can you try to emit the actual type of start_rule() so we can compare?
Maybe by doing something like:

    int x = start_rule();

which will give you an error message with the type returned by start_rule().

Cheers,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Peter Gerell-4

> Can you try to emit the actual type of start_rule() so we can compare?
> Maybe by doing something like:
>
>   int x = start_rule();
>
> which will give you an error message with the type returned by start_rule().

Hi Joel, this is the error I get if I try that:

main.cpp:12:7: error: no viable conversion from 'const start_type' (aka 'const rule<start_class, ast::Start>') to 'int'

/Peter

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Joel de Guzman
On 26/05/2016 5:16 AM, Peter Gerell wrote:

>
>> Can you try to emit the actual type of start_rule() so we can compare?
>> Maybe by doing something like:
>>
>>   int x = start_rule();
>>
>> which will give you an error message with the type returned by start_rule().
>
> Hi Joel, this is the error I get if I try that:
>
> main.cpp:12:7: error: no viable conversion from 'const start_type' (aka 'const rule<start_class, ast::Start>') to 'int'

Oh, right, my bad. What we really need to know is the definition of
start_rule. It should be something like the linker error you are
having.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Peter Gerell-4
> Oh, right, my bad. What we really need to know is the definition of start_rule. It should be something like the linker error you are having.

I think I have nailed it.
I had to change from
    using start_type = x3::rule<start_class, ast::Start>;
to
    using start_type = x3::rule<start_class, ast::Count>;
as the start rule contains a single count rule after the result of the preceeding character parser is omitted.
The attribute type of the count rule seems to propagate to the start rule.

I have not yet tried to fix my original problem.

It seems this is not a regression, but a breaking change.
I have no problem requiring boost 1.61+ for the project to build.

Thanks, Peter

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Joel de Guzman
On 26/05/2016 9:33 PM, Peter Gerell wrote:

>> Oh, right, my bad. What we really need to know is the definition of start_rule. It should be something like the linker error you are having.
>
> I think I have nailed it.
> I had to change from
>     using start_type = x3::rule<start_class, ast::Start>;
> to
>     using start_type = x3::rule<start_class, ast::Count>;
> as the start rule contains a single count rule after the result of the preceeding character parser is omitted.
> The attribute type of the count rule seems to propagate to the start rule.
>
> I have not yet tried to fix my original problem.
>
> It seems this is not a regression, but a breaking change.
> I have no problem requiring boost 1.61+ for the project to build.

Hmmm, not sure I understand. Can you please elaborate? Why is it a breaking
change?

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Peter Gerell-4
> Hmmm, not sure I understand. Can you please elaborate? Why is it a breaking change?

In this case code that did build fine with boost 1.60 had to be modified to build with boost 1.61.
(And now no longer builds with boost 1.60)

/Peter

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Joel de Guzman
On 27/05/2016 3:41 PM, Peter Gerell wrote:
>> Hmmm, not sure I understand. Can you please elaborate? Why is it a breaking change?
>
> In this case code that did build fine with boost 1.60 had to be modified to build with boost 1.61.
> (And now no longer builds with boost 1.60)

A "breaking change", in my world, is a documented behavior, or contract if
you will, that has changed from one version to the next. What I don't
understand was the underlying reason why there was a "breaking change"
as you claim. So, can you please elaborate?

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/




------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Peter Gerell-4
> A "breaking change", in my world, is a documented behavior, or contract if you will, that has changed from one version to the next. What I don't understand was the
> underlying reason why there was a "breaking change"
> as you claim. So, can you please elaborate?

I see what you mean.
The new behavior is correct according to the documentation.

> Given a and b are parsers, and A is the attribute type of a, and unused_type is the attribute type of b, then the attribute type of a >> b (a << b) will be A as well.
> This rule applies regardless of the position the element exposing the unused_type is at.

So instead of breaking change could it be considered a bug fix?
X3 from boost 1.60 did not propagate the attribute this way for our rule containing a sequence of two parser where one had the attribute discarded by an omit directive.

Regards,
Peter

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Joel de Guzman
On 27/05/2016 4:39 PM, Peter Gerell wrote:

>> A "breaking change", in my world, is a documented behavior, or contract if you will, that has changed from one version to the next. What I don't understand was the
>> underlying reason why there was a "breaking change"
>> as you claim. So, can you please elaborate?
>
> I see what you mean.
> The new behavior is correct according to the documentation.
>
>> Given a and b are parsers, and A is the attribute type of a, and unused_type is the attribute type of b, then the attribute type of a >> b (a << b) will be A as well.
>> This rule applies regardless of the position the element exposing the unused_type is at.
>
> So instead of breaking change could it be considered a bug fix?
> X3 from boost 1.60 did not propagate the attribute this way for our rule containing a sequence of two parser where one had the attribute discarded by an omit directive.

If this "new" behavior is according to the documentation, then it is a bug
fix alright. Yes, I recall (myself or someone else) working on this fix,
among others.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

Peter Gerell-4

> If this "new" behavior is according to the documentation, then it is a bug
> fix alright. Yes, I recall (myself or someone else) working on this fix,
> among others.

I could get my parser to build by changing attribute type for my start rule.
Unfortunately this doesn't work semantically as it is no longer possible to distinguish between
different rules when writing my overloads for operator() in the visitor for my variant for the rule that uses these rules.
Strangely I get a different behavior if I recreate the parser in a single translation unit.

I have published an example that works with both boost 1.60 and 1.61.
Here the start rule get the attribute type I expected.
What could be the difference when the parser is split into several translation units?

http://coliru.stacked-crooked.com/a/090d820540d20fec

Regards,
Peter

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Possible regression in boost 1.61

tomkulaga
Did you manage to find a fix for this?

I'm having the same issues, although mine only show up if if i change from using x3::parse to x3::phrase_parse

but the error message is the same, so I'm guessing that it stems from a similar problem