Compiling error when using mongo-cxx-driver legacy 1.1.0 release on linux

386 views
Skip to first unread message

Félix Robles

unread,
Mar 7, 2016, 6:03:43 AM3/7/16
to mongodb-user
Hi,

I'm on Ubuntu 15.10 64 bits with boost 1.58 scons 2.3.6, python 2.7.10, mongodb version 3.2.3. I get a g++ error while compiling the mongodb legacy cxx drivers 1.1.0:
 
"src/mongo/base/global_initializer.cpp:32:14: error: 'mongo::{anonymous}::_theGlobalInitializer' defined but not used [-Werror=unused-variable]
 Initializer* _theGlobalInitializer = &getGlobalInitializer();"

The full output is here: http://pastebin.com/8gqG6H1K

Any help?

Kind regards,
Felix Robles

Andrew Morrow

unread,
Mar 7, 2016, 8:59:26 AM3/7/16
to mongod...@googlegroups.com

Hi -

Thanks for including the relevant information about your issue in your post. The system compiler on Ubuntu 15.10 is GCC 5, which adds some new warnings, and the driver has not yet been updated to compile cleanly in that environment. Since the build system treats all warnings as errors by default, the build fails.

Would you mind filing an issue in the CXX JIRA project describing the problem so that we can fix it in an upcoming release?

Until we resolve the issue, you can disable the warnings-as-errors behavior by adding the flag --disable-warnings-as-errors to your SCons invocation.

I'll also note that the Ubuntu 15.10 development environment should support the newly released C++11 driver. If you are working on a new project which does not depend on the legacy driver interfaces and can use C++11, the new C++11 driver offers a greatly improved interface and implementation. You can find the C++11 driver on the master branch of the mongo-cxx-driver repository.

Thanks,
Andrew

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/fd75206e-781f-4b87-98bf-a17d0905295b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages