[CXX-806] BulkOperation is not applicable to Cent OS 6 c++ driver(libmongodb-devel-2.4.13-1.el6.x86_64) Created: 08/Jan/16  Updated: 11/Sep/19  Resolved: 09/Jan/16

Status: Closed
Project: C++ Driver
Component/s: API
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: gabriel.wang Assignee: Unassigned
Resolution: Done Votes: 0
Labels: legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

1. CentOS 6 (x86_64)
2. libmongodb-devel-2.4.13-1.el6.x86_64



 Description   

1)
../include/cdrdbwriter.h:77: error: ‘mongo::BulkOperationBuilder’ has not been declared
2) compilation tool chains
libtool: link: g++ -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.4.6/crtbeginS.o .libs/libxmscommon_la-logger.o .libs/libxmscommon_la-internalJSONNode.o .libs/libxmscommon_la-JSON_Base64.o .libs/libxmscommon_la-JSONChildren.o .libs/libxmscommon_la-JSONDebug.o .libs/libxmscommon_la-JSONIterators.o .libs/libxmscommon_la-JSONMemory.o .libs/libxmscommon_la-JSONNode.o .libs/libxmscommon_la-JSONNode_Mutex.o .libs/libxmscommon_la-JSONStream.o .libs/libxmscommon_la-JSONValidator.o .libs/libxmscommon_la-JSONWorker.o .libs/libxmscommon_la-JSONWriter.o .libs/libxmscommon_la-libjson.o -lpthread -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.4.6/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/crtn.o -Wl,-soname -Wl,libxmscommon.so.0 -o .libs/libxmscommon.so.0.0.0
libtool: link: (cd ".libs" && rm -f "libxmscommon.so.0" && ln -s "libxmscommon.so.0.0.0" "libxmscommon.so.0")
libtool: link: (cd ".libs" && rm -f "libxmscommon.so" && ln -s "libxmscommon.so.0.0.0" "libxmscommon.so")
libtool: link: ar cru .libs/libxmscommon.a libxmscommon_la-logger.o libxmscommon_la-internalJSONNode.o libxmscommon_la-JSON_Base64.o libxmscommon_la-JSONChildren.o libxmscommon_la-JSONDebug.o libxmscommon_la-JSONIterators.o libxmscommon_la-JSONMemory.o libxmscommon_la-JSONNode.o libxmscommon_la-JSONNode_Mutex.o libxmscommon_la-JSONStream.o libxmscommon_la-JSONValidator.o libxmscommon_la-JSONWorker.o libxmscommon_la-JSONWriter.o libxmscommon_la-libjson.o
libtool: link: ranlib .libs/libxmscommon.a



 Comments   
Comment by Andrew Morrow (Inactive) [ 09/Jan/16 ]

Thanks for the additional information. I'm closing this ticket as there isn't really anything for us to do on our side, but please feel free to re-open it or reach out on the mongodb-user list if you need any further help.

Comment by gabriel.wang [ 08/Jan/16 ]

Hi Andrew,

Thanks very much for your prompt response.
The package I used for CentOS 7 is mongo-cxx-driver-1.0.1-1.el7.x86_64. It works fine although it is a lit bit old. I will try to build the driver according to your recommendation.

Comment by Andrew Morrow (Inactive) [ 08/Jan/16 ]

What package are you using on CentOS 7? Please note that MongoDB does not currently handle the packaging for the C++ driver on any platform, so we do not control which variants are available on each distro version.

Comment by Andrew Morrow (Inactive) [ 08/Jan/16 ]

The BulkOperationBuilder class was only introduced in the MongoDB C++ legacy driver. The driver that you are trying to build against appears to be a packaging of the older "server C++ driver" from MongoDB 2.4. If you want to use the BulkOperationBuilder, you will need to install a version of the legacy C++ driver, available here: https://github.com/mongodb/mongo-cxx-driver. I recommend reading the section on the wiki detailing how to build and install it: https://github.com/mongodb/mongo-cxx-driver/wiki/Download-and-Compile-The-Legacy-Driver.

Comment by gabriel.wang [ 08/Jan/16 ]

In centOS 7(x86_64), the bulkOperation functionality is fine, but when compiling in centOS 6 which install the c++ driver: libmongodb-devel-2.4.13-1.el6.x86_64, compilation failed with message: error: ‘mongo::BulkOperationBuilder’ has not been declared.

I want to know whether is there latest driver for centOS 6 supporting the bulkOperation functionality. Currently, I have to use conditional compilation to differentiate two OS version, and could improve the data operation performance on CentOS 6.

Generated at Wed Feb 07 22:00:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.