Index: library/mongodb/README =================================================================== diff -u -r4468c6949ccaca090619183f11a5b4a1988a5a1c -r16324e94fee054ff57d403e5b51cf96117317ea0 --- library/mongodb/README (.../README) (revision 4468c6949ccaca090619183f11a5b4a1988a5a1c) +++ library/mongodb/README (.../README) (revision 16324e94fee054ff57d403e5b51cf96117317ea0) @@ -8,36 +8,58 @@ The current version is tested with - Tcl 8.5 and Tcl 8.6 -- MongoDB v3.0.8 (released Dec 15, 2015) -- mongodb-c-driver 1.3.1 (released Jan 18, 2016) +- MongoDB v3.4.0 (released Nov 26, 2016) +- mongodb-c-driver 1.5.1 (released Dec 17, 2016) +- libbson 1.5.1 (released Dec 17, 2016) Follow the following steps to get MongoDB up and running -and to compile the MongoDB driver for nx: +and to compile the MongoDB driver for NX. + +OBTAIN MONGODB and MONGO-C-DRIVER: + - Compile or obtain mongodb (the database). - Compile or obtain the mongo-c-driver (client interface) cd /usr/local/src + wget https://github.com/mongodb/mongo-c-driver/releases/download/1.5.1/mongo-c-driver-1.5.1.tar.gz + tar zxvf mongo-c-driver-1.5.1.tar.gz + rm -rf mongo-c-driver + ln -s mongo-c-driver-1.5.1 mongo-c-driver + cd mongo-c-driver + ./configure --disable-automatic-init-and-cleanup + make + sudo make install + + Alternatively, one can get the newest version from git + + cd /usr/local/src git clone https://github.com/mongodb/mongo-c-driver cd mongo-c-driver - sh autogen.sh + sh autogen.sh --disable-automatic-init-and-cleanup make sudo make install -If you experience errors during autogen on debian, you might have to - apt-get install libtool + If you experience errors during autogen on Debian, you might have to + apt-get install libtool -If configure complains about not finding bson, you might have to do - export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + If configure complains about not finding bson, you might have to do + export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig + Note: Version 1.5.1 of the c-driver leads on Mac OS X to a crash on + exit, when configured SASL support (from mac ports) and the flag + "--disable-automatic-init-and-cleanup" is missing. + +COMPILING THE MONGO NSF INTERFACE: + Assume the following installation directories - Tcl: /usr/local/ns/lib/ - mongo-c-driver: /usr/local/src/mongo-c-driver/ -configure the mongodb nsf interface via the following +configure the mongodb NSF interface via the following command in the directory nsf*/library/mongodb/ You will probably have to adjust the paths. @@ -47,12 +69,12 @@ --enable-threads --enable-symbols In order to run the sample script, - * first start the mongdb (eg. mongod) + * first start the mongodb (eg. mongod) - * go to your nsf source directory + * go to your NSF source directory * make sure, the c-driver libraries are on the library path - (assuming the the c-driver was installed in /usr/local/lib) + (assuming the c-driver was installed in /usr/local/lib) export DYLD_LIBRARY_PATH=/usr/local/lib:`pwd` @@ -68,14 +90,14 @@ ./nxsh library/mongodb/example-nx-mongo.tcl - This example script is using the higher level object oriented - interface for nx (nx::mongo). + This example script is using the higher-level object-oriented + interface for NX (nx::mongo). After running this script, you should could check the content in MongoDB: % mongo - MongoDB shell version: 2.6.5 + MongoDB shell version: v3.4.0 connecting to: test > use tutorial switched to db tutorial