Closed karpase closed 8 years ago
ros_mongodb_build.txt full log is attached here :-(
Thanks, Erez Karpas
I guess that the issue is that F23 uses the mongo-cxx-client library. This is compiled with the "-std=c++11" flag by default. It is necessary that code using this library is built with the same flag for compatibility...
Can you elaborate what you think would have to be changed? Would we have to build mongodb_store with -std=c++11
as well? I recall this having some issues with ROS and - more definitely - PCL (at least in Ubuntu). Maybe, @karpase can try and just add the flag in your catkin_make call? I think we ought to not add this flag in general, but what does @hawesie think?
Hi All, Adding set(CMAKE_CXX_FLAGS "-std=gnu++11 ${CMAKE_CXX_FLAGS}")
to the top-level CMakeLists.txt helped, and everything now compiles just fine.
You might consider enabling c++11 only when it is supported - see here.
Thanks, Erez.
Great, @timn, thanks for the hint.
Thanks folks. @karpase if you've added that linked fix, please could you open a PR?
Hi, I tried to build from source on a Fedora 23 machine with ROS Indigo, and got a compilation error. The first error is:
[ 83%] Building CXX object mongodb_store/mongodb_store/CMakeFiles/message_store.dir/src/message_store.cpp.o In file included from /usr/include/c++/5.3.1/atomic:38:0, from /usr/include/mongo/platform/atomic_word_cxx11.h:29, from /usr/include/mongo/platform/atomic_word.h:21, from /usr/include/mongo/base/status.h:23, from /usr/include/mongo/util/assert_util.h:23, from /usr/include/mongo/bson/bsontypes.h:20, from /usr/include/mongo/bson/bsonelement.h:25, from /usr/include/mongo/bson/bsonobj.h:27, from /usr/include/mongo/client/bulk_operation_builder.h:20, from /usr/include/mongo/client/dbclientinterface.h:29, from /usr/include/mongo/client/dbclient_rs.h:23, from /usr/include/mongo/client/dbclient.h:59, from /home/robosim/catkin_ws/src/mongodb_store/mongodb_store/include/mongodb_store/message_store.h:14, from /home/robosim/catkin_ws/src/mongodb_store/mongodb_store/src/message_store.cpp:1: /usr/include/c++/5.3.1/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
The full log is attached.