Trouble compiling the Fortress Ai branch of .4

Post here if you need help setting up your server, etc.
Post Reply
User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2342
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Trouble compiling the Fortress Ai branch of .4

Post by compguygene »

I have successfully compiled and used this branch before, so I was rather surprised when it didn't work. Just to let you know, I do have protobuf, bison, automake, and autoconf installed. The following error that I received from a make install seemed related to protobuf so I double checked the four of those. Here are the messages.

Code: Select all

In file included from engine/ePlayer.cpp:60:0:
./network/nProtoBuf.h: In instantiation of ‘void nNetObjectDescriptor<OBJECT, PROTOBUF>::DoReadSync(nNetObject&, nStreamMessage&, bool) const [with OBJECT = ePlayerNetID; PROTOBUF = Engine::PlayerNetIDSync]’:
engine/ePlayer.cpp:10167:76:   required from here
./network/nProtoBuf.h:854:9: error: ‘StreamFrom’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
./network/nProtoBuf.h:854:9: note: declarations in dependent base ‘nProtoBufDescriptorBase’ are not found by unqualified lookup
./network/nProtoBuf.h:854:9: note: use ‘this->StreamFrom’ instead
./network/nProtoBuf.h: In instantiation of ‘void nNetObjectDescriptor<OBJECT, PROTOBUF>::DoWriteSync(nNetObject&, nStreamMessage&, bool) const [with OBJECT = ePlayerNetID; PROTOBUF = Engine::PlayerNetIDSync]’:
engine/ePlayer.cpp:10167:76:   required from here
./network/nProtoBuf.h:868:9: error: ‘StreamTo’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
./network/nProtoBuf.h:868:9: note: declarations in dependent base ‘nProtoBufDescriptorBase’ are not found by unqualified lookup
./network/nProtoBuf.h:868:9: note: use ‘this->StreamTo’ instead
make[2]: *** [libengine_a-ePlayer.o] Error 1
make[2]: Leaving directory `/home/compguygene/fortai/trunk-armagetronad-fortress_ai/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/compguygene/fortai/trunk-armagetronad-fortress_ai/src'
make: *** [install-recursive] Error 1
Thanks in advance for any help fixing this. I just want to make it more interesting to camp in a sumo/fortress server to get a game going. I have done it in the past and I find it enjoyable to fight off 12 bots in a sumo or fortress environment with this branch of the .4 code.
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Trouble compiling the Fortress Ai branch of .4

Post by Z-Man »

compguygene wrote:

Code: Select all

./network/nProtoBuf.h:854:9: error: ‘StreamFrom’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
./network/nProtoBuf.h:854:9: note: use ‘this->StreamFrom’ instead
Apparently, compilers got a little more strict since that branch was last touched. Open network/nProtobuf.h, line 854 and replace "StreamFrom" with "this->StreamFrom". Similar errors should be treated similarly.

A merge from trunk should also work, but there are bound to be very nasty conflicts by now, too.
User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2342
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Re: Trouble compiling the Fortress Ai branch of .4

Post by compguygene »

Thank you for the help. The two errors listed above, lines 854 and 868 were the only two that needed to be fixed. After doing as you suggested, the make and make install went smoothly.
I did take a look at merging, as I do have meager C++ skills. 5 conflicts came up, and they looked beyond my ability to diagnose.
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2342
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Re: Trouble compiling the Fortress Ai branch of .4

Post by compguygene »

Since I am hosting servers again, and I saw that the Fortress ai branch has had a fresh merge with the current 4, I tried it and implemented the fix above. But, I then got this error:

Code: Select all

g++ -DHAVE_CONFIG_H -I. -I..   -I. -I..  -I/usr/include/libxml2   -I./tools -I./resource -I./thirdparty/mathexpr -I./thirdparty/utf8 -I./protobuf -Iprotobuf -O2 -pthread -MT libtools_a-vCore.o -MD -MP -MF .deps/libtools_a-vCore.Tpo -c -o libtools_a-vCore.o `test -f 'tools/values/vCore.cpp' || echo './'`tools/values/vCore.cpp
In file included from /usr/include/boost/iterator/iterator_categories.hpp:22:0,
                 from /usr/include/boost/iterator/iterator_facade.hpp:14,
                 from /usr/include/boost/range/iterator_range_core.hpp:27,
                 from /usr/include/boost/lexical_cast.hpp:30,
                 from tools/values/vCore.cpp:28:
/usr/include/boost/variant/get.hpp: In instantiation of ‘typename boost::add_pointer<T>::type boost::strict_get(boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>*) [with U = tString; T0 = int; T1 = float; T2 = std::__cxx11::basic_string<char>; 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 boost::add_pointer<T>::type = tString*]’:
/usr/include/boost/variant/get.hpp:253:25:   required from ‘typename boost::add_pointer<T>::type boost::get(boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>*) [with U = tString; T0 = int; T1 = float; T2 = std::__cxx11::basic_string<char>; 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 boost::add_pointer<T>::type = tString*]’
tools/values/vCore.cpp:108:47:   required from here
/usr/include/boost/variant/get.hpp:178:5: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’
     BOOST_STATIC_ASSERT_MSG(
     ^
Makefile:2438: recipe for target 'libtools_a-vCore.o' failed
make[3]: *** [libtools_a-vCore.o] Error 1

maybe there is a fix that could be suggested?
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Re: Trouble compiling the Fortress Ai branch of .4

Post by Lucifer »

compguygene wrote: maybe there is a fix that could be suggested?
Yeah, make it not broke any more.

This looks like a boost problem, since it's happening before any actual arma code (other than the #include statement). So, Ummm, if you installed the boost library from a package, try updating the package to the newest version.

Or, alternately, try building the latest version of boost.

Either of those could break arma, though, if there were any changes in boost that arma hasn't been updated to use.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Trouble compiling the Fortress Ai branch of .4

Post by Z-Man »

Nah, those are INSTANTIATION failures. While those can still be the fault of the header, this one even seems to be a static assertion meant to provide a readable compiler error message (and failing, because that is a surprisingly difficult task; good thing there is static_assert now in the standard). Those mean the user of a template did something wrong. Another merge from 0.4/master should fix things, I'll try to do one.
Speaking of which, RECENT merge? I only see one from 2011.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Trouble compiling the Fortress Ai branch of .4

Post by Z-Man »

Merge done, there were some conflicts that I violently resolved by sticking to the version from the fortress_ai branch. As a result, tutorials and challenges that rely on AIs following paths are now broken; those did not exist yet when the branch was started.
User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2342
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Re: Trouble compiling the Fortress Ai branch of .4

Post by compguygene »

Thanks. I was able to build a working binary, and will now put up some servers that use it!
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
Post Reply