VCMI on Linux

Starting from revision 2044 there are compilation errors in ERM parser which I can’t fix:

../../vcmi/lib/ERMParser.cpp:219: error: no matching function for call to boost::variant<boost::variant<ERM::triggerT, ERM::instructionT, ERM::receiverT, ERM::postOBtriggerT, boost::fusion::unused_type, 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::fusion::unused_type, 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_>::apply_visitor(ERM::ERMprinter) const

/usr/include/boost/variant/variant.hpp:1800: note: candidates are: typename Visitor::result_type boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>::apply_visitor(Visitor&) [with Visitor = ERM::ERMprinter, T0_ = boost::variant<ERM::triggerT, ERM::instructionT, ERM::receiverT, ERM::postOBtriggerT, boost::fusion::unused_type, 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_>, T1 = boost::fusion::unused_type, T2 = boost::detail::variant::void_, T3 = boost::detail::variant::void_, T4 = boost::detail::variant::void_, T5 = boost::detail::variant::void_, T6 = boost::detail::variant::void_, T7 = boost::detail::variant::void_, T8 = boost::detail::variant::void_, T9 = boost::detail::variant::void_, T10 = boost::detail::variant::void_, T11 = boost::detail::variant::void_, T12 = boost::detail::variant::void_, T13 = boost::detail::variant::void_, T14 = boost::detail::variant::void_, T15 = boost::detail::variant::void_, T16 = boost::detail::variant::void_, T17 = boost::detail::variant::void_, T18 = boost::detail::variant::void_, T19 = boost::detail::variant::void_]

/usr/include/boost/variant/variant.hpp:1810: note:                 typename Visitor::result_type boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>::apply_visitor(Visitor&) const [with Visitor = ERM::ERMprinter, T0_ = boost::variant<ERM::triggerT, ERM::instructionT, ERM::receiverT, ERM::postOBtriggerT, boost::fusion::unused_type, 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_>, T1 = boost::fusion::unused_type, T2 = boost::detail::variant::void_, T3 = boost::detail::variant::void_, T4 = boost::detail::variant::void_, T5 = boost::detail::variant::void_, T6 = boost::detail::variant::void_, T7 = boost::detail::variant::void_, T8 = boost::detail::variant::void_, T9 = boost::detail::variant::void_, T10 = boost::detail::variant::void_, T11 = boost::detail::variant::void_, T12 = boost::detail::variant::void_, T13 = boost::detail::variant::void_, T14 = boost::detail::variant::void_, T15 = boost::detail::variant::void_, T16 = boost::detail::variant::void_, T17 = boost::detail::variant::void_, T18 = boost::detail::variant::void_, T19 = boost::detail::variant::void_]

Another error occurs several times for different structs (mpl_::void_, ERM::conditionT, ERM::triggerT, ERM::instructionT, ERM::receiverT)

../../vcmi/lib/ERMParser.cpp:279:   instantiated from ERM::ERM_grammar<Iterator>::ERM_grammar() [with Iterator = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >];

../../vcmi/lib/ERMParser.cpp:356:   instantiated from here

/usr/include/boost/spirit/home/support/attributes.hpp:409: error: no matching function for call to ERM::conditionT::conditionT(boost::recursive_wrapper<ERM::conditionT>&);

../../vcmi/lib/ERMParser.cpp:85: note: candidates are: ERM::conditionT::conditionT()
../../vcmi/lib/ERMParser.cpp:85: note:                 ERM::conditionT::conditionT(const ERM::conditionT&)

Any ideas how to fix? Too much of boost magic to handle this one myself.

Which version of boost do you have? I have 1.46.0 and no problems with compilation.

Same isse. boost version is 1.42.
If this file is not vital to vcmi, we could not compile it.

I got a similar error earlier today. I now installed Boost 1.46.1. I’m on Ubuntu Maverick.

This is the error I get now:

janus@Fugl:~/build/trunk$ make Making all in lib make[1]: Entering directory `/home/janus/build/trunk/lib' CXX libvcmi_la-ERMParser.lo ERMParser.cpp: In function ‘void ERM::printLineAST(const ERM::lineT&)’: ERMParser.cpp:219:33: error: no matching function for call to ‘boost::variant<boost::variant<ERM::triggerT, ERM::instructionT, ERM::receiverT, ERM::postOBtriggerT, boost::spirit::unused_type>, boost::spirit::unused_type>::apply_visitor(ERM::ERMprinter) const’ /home/janus/boost-1.46.1-build//include/boost/variant/variant.hpp:1807:5: note: candidates are: typename Visitor::result_type boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>::apply_visitor(Visitor&) [with Visitor = ERM::ERMprinter, T0_ = boost::variant<ERM::triggerT, ERM::instructionT, ERM::receiverT, ERM::postOBtriggerT, boost::spirit::unused_type>, T1 = boost::spirit::unused_type, T2 = boost::detail::variant::void_, T3 = boost::detail::variant::void_, T4 = boost::detail::variant::void_, T5 = boost::detail::variant::void_, T6 = boost::detail::variant::void_, T7 = boost::detail::variant::void_, T8 = boost::detail::variant::void_, T9 = boost::detail::variant::void_, T10 = boost::detail::variant::void_, T11 = boost::detail::variant::void_, T12 = boost::detail::variant::void_, T13 = boost::detail::variant::void_, T14 = boost::detail::variant::void_, T15 = boost::detail::variant::void_, T16 = boost::detail::variant::void_, T17 = boost::detail::variant::void_, T18 = boost::detail::variant::void_, T19 = boost::detail::variant::void_, typename Visitor::result_type = void] /home/janus/boost-1.46.1-build//include/boost/variant/variant.hpp:1817:5: note: typename Visitor::result_type boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>::apply_visitor(Visitor&) const [with Visitor = ERM::ERMprinter, T0_ = boost::variant<ERM::triggerT, ERM::instructionT, ERM::receiverT, ERM::postOBtriggerT, boost::spirit::unused_type>, T1 = boost::spirit::unused_type, T2 = boost::detail::variant::void_, T3 = boost::detail::variant::void_, T4 = boost::detail::variant::void_, T5 = boost::detail::variant::void_, T6 = boost::detail::variant::void_, T7 = boost::detail::variant::void_, T8 = boost::detail::variant::void_, T9 = boost::detail::variant::void_, T10 = boost::detail::variant::void_, T11 = boost::detail::variant::void_, T12 = boost::detail::variant::void_, T13 = boost::detail::variant::void_, T14 = boost::detail::variant::void_, T15 = boost::detail::variant::void_, T16 = boost::detail::variant::void_, T17 = boost::detail::variant::void_, T18 = boost::detail::variant::void_, T19 = boost::detail::variant::void_, typename Visitor::result_type = void] make[1]: *** [libvcmi_la-ERMParser.lo] Error 1 make[1]: Leaving directory `/home/janus/build/trunk/lib' make: *** [all-recursive] Error 1

I don’t know if it’s related or not. If not, sorry for posting here.

I’ve just changed a few things in ERM parser, does it compile now for you?

Still no success but output is much more readable:

  CXX    libvcmi_la-ERMParser.lo
../../vcmi/lib/ERMParser.cpp: In member function void ERM::printLineAST(const ERM::lineT&)::psa::operator()(const ERM::commandT&) const:
../../vcmi/lib/ERMParser.cpp:242:4: error: no matching function for call to apply_visitor(ERM::printLineAST(const ERM::lineT&)::psa::operator()(const ERM::commandT&) const::cmt, const ERM::commandTcmd&)
../../vcmi/lib/ERMParser.cpp: In function void ERM::printLineAST(const ERM::lineT&):
../../vcmi/lib/ERMParser.cpp:251:3: error: no matching function for call to apply_visitor(ERM::printLineAST(const ERM::lineT&)::psa, const ERM::lineT&)

Compiled with gcc 4.5.1, boost 1.46.1

Object of local classes as template arguments… I wish it were standard-compliant for years. It looks like I can either make syntax for AST browsing a bit uglier or force everybody to use GCC 4.5+ and compile VCMI in C++0x compatibility mode… I’ll commit a patch soon.

I also can’t compile VCMI. All packages updated, Ubuntu 10.04 64-bit, VCMI revision 2054. My libboost-dev here is at version 1.40.0.1. Here’s the code:

$ make

  CXX    libvcmi_la-ERMParser.lo
ERMParser.cpp:187: error: ‘unused_type’ is not a member of ‘qi’
ERMParser.cpp:187: error: ‘unused_type’ is not a member of ‘qi’
ERMParser.cpp:187: error: template argument 9 is invalid
ERMParser.cpp:187: error: invalid type in declaration before ‘;’ token
ERMParser.cpp:278: error: ‘unused_type’ is not a member of ‘qi’
ERMParser.cpp:278: error: ‘unused_type’ is not a member of ‘qi’
ERMParser.cpp:278: error: template argument 3 is invalid
ERMParser.cpp:278: error: invalid type in declaration before ‘;’ token
ERMParser.cpp:447: error: ‘qi::unused_type’ has not been declared
ERMParser.cpp:530: error: ‘qi::unused_type’ has not been declared
ERMParser.cpp: In constructor ‘ERM::ERM_grammar<Iterator>::ERM_grammar()’:
ERMParser.cpp:676: error: ‘lexeme’ is not a member of ‘qi’
ERMParser.cpp:676: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:676: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:676: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:677: error: ‘lexeme’ is not a member of ‘qi’
ERMParser.cpp:677: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:677: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:677: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:678: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:678: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:678: error: ‘int_’ is not a member of ‘qi’
ERMParser.cpp:679: error: ‘lexeme’ is not a member of ‘qi’
ERMParser.cpp:679: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:679: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:679: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:681: error: ‘int_’ is not a member of ‘qi’
ERMParser.cpp:683: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:684: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:684: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:684: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:685: error: ‘lexeme’ is not a member of ‘qi’
ERMParser.cpp:685: error: ‘repeat’ is not a member of ‘qi’
ERMParser.cpp:685: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:686: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:688: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:689: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:690: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:690: error: ‘int_’ is not a member of ‘qi’
ERMParser.cpp:692: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:693: error: ‘lexeme’ is not a member of ‘qi’
ERMParser.cpp:693: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:695: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:696: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:697: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:699: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:700: error: ‘eps’ is not a member of ‘qi’
ERMParser.cpp:701: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:702: error: ‘char_’ is not a member of ‘qi’
ERMParser.cpp:704: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:704: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:708: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:710: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:712: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:713: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:714: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:715: error: ‘lit’ is not a member of ‘qi’
ERMParser.cpp:746: error: ‘_4’ is not a member of ‘qi’
ERMParser.cpp:748: error: ‘_3’ is not a member of ‘qi’
ERMParser.cpp:748: error: ‘_2’ is not a member of ‘qi’
ERMParser.cpp: In member function ‘void ERMParser::parseLine(const std::string&)’:
ERMParser.cpp:796: warning: unused variable ‘AST’
In file included from /usr/include/boost/variant/apply_visitor.hpp:16,
                 from /usr/include/boost/variant.hpp:23,
                 from /usr/include/boost/spirit/home/support/detail/values.hpp:18,
                 from /usr/include/boost/spirit/home/support/attribute_transform.hpp:14,
                 from /usr/include/boost/spirit/home/qi/operator/sequence_base.hpp:11,
                 from /usr/include/boost/spirit/home/qi/operator/sequence.hpp:10,
                 from /usr/include/boost/spirit/home/qi/operator.hpp:10,
                 from /usr/include/boost/spirit/home/qi.hpp:13,
                 from /usr/include/boost/spirit/include/qi.hpp:11,
                 from ERMParser.cpp:2:
/usr/include/boost/variant/detail/apply_visitor_unary.hpp: In function ‘typename Visitor::result_type boost::apply_visitor(const Visitor&, Visitable&) [with Visitor = ERM::BodyOptionItemPrinterVisitor, Visitable = ERM::TBodyOptionItem]’:
ERMParser.cpp:470:   instantiated from here
/usr/include/boost/variant/detail/apply_visitor_unary.hpp:72: error: request for member ‘apply_visitor’ in ‘visitable’, which is of non-class type ‘int’
/usr/include/boost/variant/detail/apply_visitor_unary.hpp:72: error: return-statement with a value, in function returning 'void'
/usr/include/boost/variant/detail/apply_visitor_unary.hpp: In function ‘typename Visitor::result_type boost::apply_visitor(const Visitor&, Visitable&) [with Visitor = ERM::LinePrinterVisitor, Visitable = const int]’:
ERMParser.cpp:539:   instantiated from here
/usr/include/boost/variant/detail/apply_visitor_unary.hpp:72: error: request for member ‘apply_visitor’ in ‘visitable’, which is of non-class type ‘const int’
/usr/include/boost/variant/detail/apply_visitor_unary.hpp:72: error: return-statement with a value, in function returning 'void'
In file included from /usr/include/boost/spirit/home/qi/operator/alternative.hpp:11,
                 from /usr/include/boost/spirit/home/qi/operator.hpp:12,
                 from /usr/include/boost/spirit/home/qi.hpp:13,
                 from /usr/include/boost/spirit/include/qi.hpp:11,
                 from ERMParser.cpp:2:
/usr/include/boost/spirit/home/qi/detail/alternative_function.hpp: In member function ‘bool boost::spirit::qi::detail::alternative_function<Iterator, Context, Skipper, Attribute>::operator()(const Component&) [with Component = boost::spirit::component<boost::spirit::qi::domain, boost::spirit::qi::nonterminal_director, boost::fusion::cons<boost::spirit::nonterminal_holder<const boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, ERM::TVarExpNotMacro(), boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::spirit::char_class::key<boost::spirit::char_class::ascii, boost::spirit::char_class::tag::space> >, 0l>, boost::fusion::unused_type>*, boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, ERM::TVarExpNotMacro(), boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::spirit::char_class::key<boost::spirit::char_class::ascii, boost::spirit::char_class::tag::space> >, 0l>, boost::fusion::unused_type> >, boost::fusion::nil> >, Iterator = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Context = boost::fusion::vector<boost::fusion::vector<ERM::TVarpExp&, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_>, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_>, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_>, Skipper = boost::spirit::component<boost::spirit::qi::domain, boost::spirit::qi::char_class<boost::spirit::char_class::key<boost::spirit::char_class::ascii, boost::spirit::char_class::tag::space> >, boost::fusion::nil>, Attribute = ERM:]’:

/usr/include/boost/spirit/home/qi/nonterminal/detail/rule.hpp:126:   instantiated from ‘bool boost::spirit::qi::detail::virtual_component<Iterator, Component, Context, Skipper, Auto>::parse(Iterator&, const Iterator&, Context&, boost::spirit::qi::no_skipper) [with Iterator = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Component = boost::spirit::component<boost::spirit::qi::domain, boost::spirit::qi::expect, boost::fusion::cons<boost::spirit::component<boost::spirit::qi::domain, boost::spirit::qi::alternative, boost::fusion::cons<boost::spirit::component<boost::spirit::qi::domain, boost::spirit::qi::nonterminal_director, boost::fusion::cons<boost::spirit::nonterminal_holder<const boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, ERM::Tcommand(), boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::spirit::char_class::key<boost::spirit::char_class::ascii, boost::spirit::char_class::tag::space> >, 0l>, boost::fusion::unused_type>*, boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, ERM::Tcommand(), boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::spirit::char_class::key<boost::spirit::char_class::ascii, boost::spirit::char_class::tag::space> >, 0l>, boost::fusion::unused_type> >, boost::fusion::nil> >, boost::fusion::cons<boost::spirit::component<boost::spirit::qi::domain, boost::spirit::qi::nonterminal_director, boost::fusion::cons<boost::spirit::nonterminal_holder<const boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::string(), boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::spirit::char_class::key<boost::spirit::char_class::ascii, boost::spirit::char_class::tag::space> >, 0l>, boost::fusion::unused_type>*, boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::string(), boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::spirit::char_class::key<boost::spirit::char_class::ascii, boost::spirit::char_class::tag::space> >, 0l>, boost::fusion::unused_type> >, boost::fusion::nil> >, boost::fusion::cons<boost::spirit::component<boost::spirit::qi::domain, boost::spirit::qi::eps_parser, boost::fusion::nil>, boost::fusion::nil> > > >, boost::fusion::cons<boost::spirit::component<boost::spirit::qi::domain, boost::spirit::qi::eoi_director, boost::fusion::cons<boost::spirit::tag::eoi, boost::fusion::nil> >, boost::fusion::nil> > >, Context = boost::fusion::vector<boost::fusion::vector<int&, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_>, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_>, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_>, Skipper = boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::spirit::char_class::key<boost::spirit::char_class::ascii, boost::spirit::char_class::tag::space> >, 0l>, Auto = mpl_::bool_<true>]’
ERMParser.cpp:875:   instantiated from here
/usr/include/boost/spirit/home/qi/detail/alternative_function.hpp:41: error: cannot convert ‘boost::spirit::unused_type’ to ‘int’ in assignment
make[1]: *** [libvcmi_la-ERMParser.lo] Error 1
make[1]: Leaving directory `/home/mgol/Programs/vcmi/lib'
make: *** [all-recursive] Error 1

Wow… quite a lot of errors. You can try to comment out whole ERMParser.cpp files together with lines 60 - 78 of VCMI_Lib.cpp. It should help. I don’t know when it’ll be fixed in SVN, it compiles on Windows + MSVC 2010 without problems (and I don’t have any Linux installed).

m_gol,
Try latest revision (2055). Not a real fix but compilation should be fine now.

Considering that it will take time till major distros will get boost 1.46 this is better than forcing everyone to use newest boost.
I’ve added boost version check to ERMParser.

I didn’t notice that m_gol is using boost 1.40… I thought VCMI is incompatible with such old version anyway…

Sorry for not writing back, I was away for a while.

If VCMI is incompatible with boost 1.40, maybe you should include a proper check in the configure script? :slight_smile: Now it’s checking for >= 1.36. Anyway, I upgraded to the latest Ubuntu (Maverick, 10.10) yesterday and now I have libboost 1.42.

I tried to compile it now (revision 2062) and now make fails even faster:

$ make
Making all in lib
make[1]: Entering directory `/home/mgol/Programs/vcmi/lib'
  CXX    libvcmi_la-BattleAction.lo
In file included from BattleAction.h:5,
                 from BattleAction.cpp:2:
../global.h: In function ‘std::string toString(const T&)’:
../global.h:357: error: invalid use of incomplete type ‘struct std::ostringstream’
/usr/include/c++/4.4/iosfwd:71: error: declaration of ‘struct std::ostringstream’
make[1]: *** [libvcmi_la-BattleAction.lo] Error 1
make[1]: Leaving directory `/home/mgol/Programs/vcmi/lib'
make: *** [all-recursive] Error 1

It’s not a problem with boost, it’s a bug on our side. I’ll fix it soon.

Do you have boost 1.46? There is only one file (ERMParser.cpp) which doesn’t work with old boost - everything else should work fine with old one. And most possibly this file will be completely optional for some time.
If I’ll increase minimal boost version to 1.46 most of Linux users will need either to compile boost themselves or find third-party repositories with 1.46 (I doubt that there are any major distros with 1.46 in main repository)

There are some other compilation errors after this one. Will fix.

The current code (r2068) compiles with boost 1.40 (besides the ERM parser). I don’t know whether the versions before that are still supported. But if there’s no report of incompatibility, the check should stay at 1.36.

I have compiled VCMI with Fedora 14 recently. Some DSO Bugs occured during linking, so I had to add a few libraries to the linker add setting of some makefile files.

Are there any conditional possibilites for our makefile files, so that only for Fedora >= 13 those libs are added to the linker or isn’t it so important if those linker settings apply to every linux distro?

Thanks for the link - it explains all that linkage errors I got with gcc-4.5 on Ubuntu.
It looks that same changes are coming to Debian as well so applying your changes to all distros will be required soon.

Hi, i have some strange problem when compiling VCMI on kubuntu 11.04. Everything seems fine, i get the executables, they work, until i load a map. I get these errrors:

Initializing mapHandler (together): 200
Loaded AI named Genius 1.0
Loaded AI named Genius 1.0
Loaded AI named Genius 1.0
Loaded AI named Stupid AI 0.1
CStupidAI [0xb585020]: created
CStupidAI [0xb585020]: init called, saving ptr to IBattleCallback
Segmentation fault
Server finished
Lost connection to server, ending listening thread!                                                                       
Broken pipe                                                                                                               
Something wrong, lost connection while game is still ongoing...
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  Broken pipe
Aborted

One of the process is crashing. You’ll have to do a post mortem analysis with the core file.

vcmi runs fine for me on ubuntu 10.10.

I’m trying to compile VCMI on OpenSuSE 11.4 64 bit and I get such error. :

  CXX    vcmiclient-CBattleInterface.o
CBattleInterface.cpp: In member function ‘void CBattleInterface::hexLclicked(int)’:
CBattleInterface.cpp:2704:73: warning: suggest parentheses around ‘&&’ within ‘||’
CBattleInterface.cpp: In constructor ‘CBattleResultWindow::CBattleResultWindow(const BattleResult&, const SDL_Rect&, CBattleInterface*)’:
CBattleInterface.cpp:4400:15: error: invalid use of incomplete type ‘struct IMainVideoPlayer’
CGameInfo.h:17:7: error: forward declaration of ‘struct IMainVideoPlayer’
CBattleInterface.cpp:4420:15: error: invalid use of incomplete type ‘struct IMainVideoPlayer’
CGameInfo.h:17:7: error: forward declaration of ‘struct IMainVideoPlayer’
CBattleInterface.cpp:4427:15: error: invalid use of incomplete type ‘struct IMainVideoPlayer’
CGameInfo.h:17:7: error: forward declaration of ‘struct IMainVideoPlayer’
CBattleInterface.cpp:4434:15: error: invalid use of incomplete type ‘struct IMainVideoPlayer’
CGameInfo.h:17:7: error: forward declaration of ‘struct IMainVideoPlayer’
CBattleInterface.cpp: In member function ‘virtual void CBattleResultWindow::show(SDL_Surface*)’:
CBattleInterface.cpp:4464:13: error: invalid use of incomplete type ‘struct IMainVideoPlayer’
CGameInfo.h:17:7: error: forward declaration of ‘struct IMainVideoPlayer’
CBattleInterface.cpp: In member function ‘void CBattleResultWindow::bExitf()’:
CBattleInterface.cpp:4480:13: error: invalid use of incomplete type ‘struct IMainVideoPlayer’
CGameInfo.h:17:7: error: forward declaration of ‘struct IMainVideoPlayer’
make[1]: *** [vcmiclient-CBattleInterface.o] Error 1