Opened 6 years ago

Closed 5 years ago

#12349 closed Bugs (fixed)

no type named ‘types’ in ‘boost::spirit::qi::detail::find_substitute

Reported by: Arsen.Shnurkov <arsen.shnurkov@…> Owned by: Joel de Guzman
Milestone: To Be Determined Component: spirit
Version: Boost 1.61.0 Severity: Showstopper
Keywords: Cc: tomka@…

Description

build log - ht tp://pastehtml.com/view/gn17nmexx.html

freeorion bug - ht tps://github.com/freeorion/freeorion/issues/777 gentoo bug - ht tps://bugs.gentoo.org/show_bug.cgi?id=584354

sample message: /usr/include/boost/spirit/home/qi/detail/alternative_function.hpp:30:46: error: no type named ‘types’ in ‘boost::spirit::qi::detail::find_substitute<boost::optional<boost::variant<std::vector<Effect::EffectBase*>, Effect::EffectBase*, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> >, std::vector<Effect::EffectBase*> >::variant_type {aka class boost::optional<boost::variant<std::vector<Effect::EffectBase*>, Effect::EffectBase*, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> >}’

typedef typename variant_type::types types;

Attachments (1)

spirit_test.cpp (948 bytes ) - added by juanpablo.canepa@… 5 years ago.
Reduced gramar that fails to build with boost 1.63 / gcc 6.2

Download all attachments as: .zip

Change History (15)

comment:1 by anonymous, 6 years ago

I confirm

comment:2 by anonymous, 6 years ago

Same problem here.

comment:3 by anonymous, 6 years ago

Hello,

the same issue affects FreeOrion in Debian, compiled with Boost 1.61 and GCC-6.

Build log:

https://buildd.debian.org/status/fetch.php?pkg=freeorion&arch=amd64&ver=0.4.5%2Bgit20160707-1%2Bb1&stamp=1470433494

Debian bug report:

https://bugs.debian.org/833773

This is apparently a regression because FreeOrion builds fine with Boost 1.58 and GCC-6.

comment:4 by viboes, 6 years ago

Component: Nonespirit
Owner: set to Joel de Guzman

comment:5 by anonymous, 6 years ago

Similar issue in compiling rasdaman with Boost 1.61; 1.60 works fine.

comment:6 by anonymous, 6 years ago

Similar issue in compiling rasdaman with Boost 1.61; 1.60 works fine.

Still same in Boost 1.62.

by juanpablo.canepa@…, 5 years ago

Attachment: spirit_test.cpp added

Reduced gramar that fails to build with boost 1.63 / gcc 6.2

comment:7 by juanpablo.canepa@…, 5 years ago

I managed to reduce the problem to a very simple grammar, that I've attached to this ticket. The problem seems to be that boost.spirit, for some reason, assumes there is a nested field called "types" in boost::optional, that was removed after 1.61, that was defined:

typedef BOOST_DEDUCED_TYPENAME mpl::if_<is_reference_predicate,types_when_ref,types_when_not_ref>::type types ;

This is blocking a release of one of our tools, so if there was any workaround that we can patch locally, I'll take it for the time being.

comment:8 by anonymous, 5 years ago

Severity: ProblemShowstopper

comment:9 by Joel de Guzman, 5 years ago

Confirmed on OSX Clang. Let's see what we can do...

comment:10 by Joel de Guzman, 5 years ago

Alright, I have a fix. Will commit to devel as soon as I can.

comment:11 by anonymous, 5 years ago

OK, seems this is is already fixed in the latest devel which should already make it to the latest Boost release. See line 141 alternative_function.hpp

fix for alternative.cpp test case, FHE 2016-07-28

comment:12 by juanpablo.canepa@…, 5 years ago

Joel,

Thanks for the reply. I did try that patch that you mention while browsing the github repo, but my sample test failed to compile with another error (I'll provide the info ass soon as possible). Maybe it is because I just patched that single file (alternative_function.hpp) but there are more changes that it builds upon(*).

I'll re-try the patch on a clean build and report back.

Thanks for paying attention to the ticket!

Cheers, Juan Pablo

(*) There are corporate reasons shy I can't just move on to the latest version of boost, so I'm trying to figure out the minimum subset of changes needed to patch our current 1.63 build.

comment:13 by Nikita Kniazev <nok.raven@…>, 5 years ago

comment:14 by Joel de Guzman, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.