Summary: | umbrello fails to compile with boost 1.37.0 | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Bernhard Rosenkraenzer <bero> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | abrouwers, giovanni, illogical1, jlp, jr, kdebugs4reinhard, krege, krishna.ggk, rdieter |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.7.4 | |
Sentry Crash Report: | |||
Attachments: | Patch to fix compile issue when using boost 1.37 |
Description
Bernhard Rosenkraenzer
2008-12-14 11:42:35 UTC
This issue also occures for kdesdk 4.1.85 and gcc 4.2.4. I can confirm [ 69%] Building CXX object umbrello/umbrello/CMakeFiles/umbrello.dir/codeimport/kdevcppparser/driver.o /usr/include/boost/iterator/iterator_adaptor.hpp: In function 'void boost::detail::iterator_adaptor_assert_traversal() [with Tr1 = boost::forward_traversal_tag, Tr2 = boost::random_access_traversal_tag]': /usr/include/boost/iterator/iterator_adaptor.hpp:353: instantiated from 'typename boost::detail::iterator_adaptor_base<Derived, Base, Value, Traversal, Reference, Difference>::type::difference_type boost::iterator_adaptor<Derived, Base, Value, Traversal, Reference, Difference>::distance_to(const boost::iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D>&) const [with OtherDerived = boost::spirit::position_iterator<const QChar*, boost::spirit::file_position_base<std::basic_string<QChar, std::char_traits<QChar>, std::allocator<QChar> > >, boost::spirit::nil_t>, OtherIterator = const QChar*, V = const QChar, C = boost::forward_traversal_tag, R = boost::use_default, D = boost::use_default, Derived = boost::spirit::position_iterator<const QChar*, boost::spirit::file_position_base<std::basic_string<QChar, std::char_traits<QChar>, std::allocator<QChar> > >, boost::spirit::nil_t>, Base = const QChar*, Value = const QChar, Traversal = boost::forward_traversal_tag, Reference = boost::use_default, Difference = boost::use_default]' /usr/include/boost/iterator/iterator_facade.hpp:553: instantiated from 'static typename Facade1::difference_type boost::iterator_core_access::distance_from(const Facade1&, constFacade2&, mpl_::true_) [with Facade1 = boost::spirit::position_iterator<const QChar*, boost::spirit::file_position_base<std::basic_string<QChar, std::char_traits<QChar>, std::allocator<QChar> > >, boost::spirit::nil_t>, Facade2 = boost::spirit::position_iterator<const QChar*, boost::spirit::file_position_base<std::basic_string<QChar, std::char_traits<QChar>, std::allocator<QChar> > >, boost::spirit::nil_t>]' /usr/include/boost/iterator/iterator_facade.hpp:842: instantiated from 'typename boost::detail::enable_if_interoperable<Derived1, Derived2, typename boost::mpl::apply2<boost::detail::always_bool2, Derived1, Derived2>::type>::type boost::operator>=(const boost::iterator_facade<Derived1, V1, TC1, Reference1, Difference1>&, const boost::iterator_facade<Derived2, V2, TC2, Reference2, Difference2>&) [with Derived1 = boost::spirit::position_iterator<const QChar*, boost::spirit::file_position_base<std::basic_string<QChar, std::char_traits<QChar>, std::allocator<QChar> > >, boost::spirit::nil_t>, V1 = const QChar, TC1 = boost::forward_traversal_tag, Reference1 = const QChar&, Difference1 = int, Derived2 = boost::spirit::position_iterator<const QChar*, boost::spirit::file_position_base<std::basic_string<QChar, std::char_traits<QChar>, std::allocator<QChar> > >, boost::spirit::nil_t>, V2 = const QChar, TC2 = boost::forward_traversal_tag, Reference2 = const QChar&, Difference2 = int]' /home/devel/kde4/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/preprocesslexer.h:267: instantiated from here /usr/include/boost/iterator/iterator_adaptor.hpp:230: error: invalid application of 'sizeof' to incomplete type 'boost::STATIC_ASSERTION_FAILURE<false>' make[2]: *** [umbrello/umbrello/CMakeFiles/umbrello.dir/codeimport/kdevcppparser/driver.o] Error 1 make[1]: *** [umbrello/umbrello/CMakeFiles/umbrello.dir/all] Error 2 make: *** [all] Error 2 Sure enough - I hit this one last night. At first I thought it was a multiple-jobs error, but calling "make" alone produced the same error shown above. I'm using gcc 4.2.4, glibc 2.7, and building against boost 1.37.0. *** Bug 180532 has been marked as a duplicate of this bug. *** I tried investigating this issue. According to the link [1], the tag type of spirit::position_iterator has been changed to ForwardIterator in boost 1.37. Earlier version used the iterator tag of underlying iterator. The two methods using non-forward behavior are PreprocessLexer::Source::eof() PreprocessLexer::Source::length() I hope this clue should be leading enough to fix the regression. I'll try myself to fix it. [1] http://www.nabble.com/-spirit--iterator--position_iterator-regression-in-1.37.0-td20330244.html Created attachment 30245 [details]
Patch to fix compile issue when using boost 1.37
So, this is my first attempt in fixing this issue. All I did was,
change >= to == for the CharIterator(which is position_iterator < QChar const* > )
And to fix length implementation, I just attempted manual counting using a loop and a temporary.
NOTE: I don't know the consequence of above changes esp making a copy of position_iterator and changing >= to ==.
May be the original author, Roberto Raggi can clarify.
*** Bug 180915 has been marked as a duplicate of this bug. *** I did commit a fix yesterday http://websvn.kde.org/?view=rev&revision=912902 However I couldn't change the status of bug to FIXED as I am neither the reporter not the assignee! So, please try and confirm the fix. Hi Gopala, Awesome! I see that it went into trunk. Does this mean the compile will still be broken on 4.2 when it releases? Best wishes, Andrew Thanks for reminding me Andrew. I did backport the fix. http://websvn.kde.org/?view=rev&revision=913607 So, can you guys confirm the fix with 4.2 as well? kde-mac says: trunk works! set version-fixed-in from 4.7.4 changelog |