I'm attempting to build FG from source, so that I can make some additions to get this to work: http://forum.flightgear.org/viewtopic.php?f=18&t=21561 Hooray has been very helpful, and I'd like to contribute something useful if I can get this rolling. I'm running Mac OS X 10.9, FYI.
I've followed the Superbuild instructions on the wiki, and gotten to the point of running make to build the program(s). I'm hitting an error that I don't understand at all, this being my first shot at building something from source. Here's the error from the terminal:
- Code: Select all
[ 28%] Performing build step for 'OpenRTI'
Scanning dependencies of target OpenRTI
[ 1%] Building CXX object src/OpenRTI/CMakeFiles/OpenRTI.dir/AbstractMessage.cpp.o
[ 2%] Building CXX object src/OpenRTI/CMakeFiles/OpenRTI.dir/AbstractMessageEncoding.cpp.o
[ 2%] Building CXX object src/OpenRTI/CMakeFiles/OpenRTI.dir/AbstractMessageSender.cpp.o
[ 3%] Building CXX object src/OpenRTI/CMakeFiles/OpenRTI.dir/AbstractProtocolLayer.cpp.o
[ 4%] Building CXX object src/OpenRTI/CMakeFiles/OpenRTI.dir/AbstractProtocolSocket.cpp.o
[ 4%] Building CXX object src/OpenRTI/CMakeFiles/OpenRTI.dir/AbstractServerNode.cpp.o
[ 5%] Building CXX object src/OpenRTI/CMakeFiles/OpenRTI.dir/AbstractServer.cpp.o
[ 6%] Building CXX object src/OpenRTI/CMakeFiles/OpenRTI.dir/AbstractSocketEvent.cpp.o
[ 6%] Building CXX object src/OpenRTI/CMakeFiles/OpenRTI.dir/Attributes.cpp.o
[ 7%] Building CXX object src/OpenRTI/CMakeFiles/OpenRTI.dir/InternalAmbassador.cpp.o
[ 8%] Building CXX object src/OpenRTI/CMakeFiles/OpenRTI.dir/InternalTimeManagement.cpp.o
[ 8%] Building CXX object src/OpenRTI/CMakeFiles/OpenRTI.dir/Federate.cpp.o
/fgfs/fgmetabuild/src/OpenRTI/src/OpenRTI/Federate.cpp:930:28: error: call to
member function 'erase' is ambiguous
_objectInstanceHandleMap.erase(i);
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/map:934:14: note:
candidate function
iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/map:936:15: note:
candidate function
size_type erase(const key_type& __k)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/map:939:15: note:
candidate function not viable: requires 2 arguments, but 1 was provided
iterator erase(const_iterator __f, const_iterator __l)
^
In file included from /fgfs/fgmetabuild/src/OpenRTI/src/OpenRTI/Federate.cpp:20:
In file included from /fgfs/fgmetabuild/src/OpenRTI/src/OpenRTI/Federate.h:24:
In file included from /fgfs/fgmetabuild/src/OpenRTI/src/OpenRTI/HandleAllocator.h:25:
/fgfs/fgmetabuild/src/OpenRTI/src/OpenRTI/Handle.h:50:19: warning: comparison of
0 <= unsigned expression is always true [-Wtautological-compare]
_handle((S(0) <= handle && T(handle) < invalid()) ? T(handle) : invalid())
~~~~ ^ ~~~~~~
/fgfs/fgmetabuild/src/OpenRTI/src/OpenRTI/Handle.h:163:1: note: in instantiation
of function template specialization 'OpenRTI::Handle<unsigned
int>::Handle<unsigned long>' requested here
DECLARE_HANDLE_TYPE(AttributeHandle, uint32_t)
^
/fgfs/fgmetabuild/src/OpenRTI/src/OpenRTI/Handle.h:140:5: note: expanded from
macro 'DECLARE_HANDLE_TYPE'
Handle<Type>(handle) \
^
/fgfs/fgmetabuild/src/OpenRTI/src/OpenRTI/Federate.cpp:403:59: note: in
instantiation of function template specialization
'OpenRTI::AttributeHandle::AttributeHandle<unsigned long>' requested here
const Attribute* attribute = objectClass.getAttribute(k);
^
1 warning and 1 error generated.
make[5]: *** [src/OpenRTI/CMakeFiles/OpenRTI.dir/Federate.cpp.o] Error 1
make[4]: *** [src/OpenRTI/CMakeFiles/OpenRTI.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [src/OpenRTI-stamp/OpenRTI-build] Error 2
make[1]: *** [CMakeFiles/OpenRTI.dir/all] Error 2
make: *** [all] Error 2
Also, here's my cmake settings:
This was a clean git clone from the fgmeta folder.
The Mac instructions are a bit thin, shall we say, so once I get this working I might have to leave a note or two on the wiki.
If anyone could kindly point me in the right direction, or let me know where to look, I'd be a very happy man!