Ensure standard library linked to boost matches mongo C++ driver's - mongodb

I want to install MongoDB C++ client. I read in its manual that:
On systems offering multiple C++ standard libraries, you must ensure
that the standard library linked into boost matches that linked into
the driver.
My O.S is ubuntu 14.04.
Does the above quote applies to my system?
How do I ensure which standard library is linked into the boost which I installed apt-get install libboost-all-dev?
In case libboost-all-dev is not linked against c++11, do I need to build from source?
My application is going to be using multi threading, do I need to make sure boost, mongodb C++ client and other libraries are linked using some multi threaded flag?

Ubuntu is not a system that is offering multiple C++ standard libraries. e.g. in ubuntu you would use GPLish libstdc++ and don't need the libc++.
I don't know how to tell whether the boost package for ubuntu was linked with c++11 but it must have since once I matched my mongo to be linked with c++11 it - mongo stopped crashing.
So if you are using ubuntu and want to use mongo legacy c++ driver you should build mongo with the c++11 flag.
for example:
scons --c++11 install

Related

How to decide which MongoDB binary to install on MacOS?

The official documentation of MongoDB provides two commands for downloading binaries:
brew install mongodb
brew install mongodb --with-openssl
I want to know what are the differences between the two of them. Primarily, I would like to understand which binary should I download under what scenarios?
Recent versions of the MongoDB Homebrew recipe include SSL by default (which matches the default downloads from the MongoDB Download Center). The --with-openssl option has been removed and there is no longer a need to choose between versions. The MongoDB documentation will be updated to reflect this (see DOCS-10347).
Distributions with TLS/SSL support are recommended (even if you aren't currently using this feature) so you have the option available. Third party cloud-hosted services (eg. MongoDB Atlas) generally require network encryption, and this is also one of the recommendations in the MongoDB Security Checklist for protecting your own deployments.
Do you need TLS/SSL support?
If the answer is "no", use command 1.
If the answer is "I don't know", use command 1.
If the answer is "yes", use command 2.
Command 1 will download MongoDB pre-compiled binaries, that don't include TLS/SSL support. Command 2 will compile MongoDB source code with TLS/SSL support, which is useful if you want the communication between your application and MongoDB to be encrypted, or if you're trying to access a database that only accept encrypted connections.
Command 1 will be much faster than command 2 since it will only fetch binaries rather than compiling plenty of stuff.

Any attempts at MongoDB on AIX

I have a project for which it would be desirable to run MongoDB on AIX 6.1 on a Power 6 box. AIX is not a supported platform for MongoDB and I will have a bash at building it from source. Has anyone tried this already?
I plan to use GNU G++ 4.2 PPC and I have the latest SCons running on Python 2.6, so the build tools run.
My initial impression is that there are a lot of platform dependencies in the .h files that I have encountered. It does not look like a no-brainer by any stretch to get AIX/Power running. Any words of wisdom whether it is or is not likely to be successful?
You will have to port several things as there is some very specific x86/x86_64 assembly as part of the MongoDB sources: https://github.com/mongodb/mongo/blob/master/src/mongo/platform/atomic_intrinsics_gcc.h Just like with ARM, this is not going to be a trivial task.
See some references:
https://jira.mongodb.org/browse/SERVER-1811
https://github.com/wtfuzz/mongo-arm

Include drivers with application installation

I have created an application in C# that relies on a specific driver (a custom virtual hid driver based on VMulti).
Currently, I have everything working and I want to combine both the application and driver into one installation package. As of right now, my application part has a .exe file and a .dll file. My driver has an .inf and .sys file, hidkmdf.sys, and WdfCoInstaller01009.dll (this dll is from the WDK). I am not able to install the driver through the traditional method of right-clicking the inf and clicking install. Instead, I use devcon to install it (command is "install inffile.inf hardwareid")
I tried using InstallShield LE, but I am only able to install the application, not the driver. After doing some searching, I found people using DIFxAPP to create the installation framework for drivers, however, I am not sure if this can be integrated into InstallShield so that the driver is installed during the application installation process.
So my main question is: What is the best and simplest method for combining application and driver installation into one package (meaning the setup.exe will install both the driver and the application)?
I am very new to driver development and application deployment, so any suggestions are welcome.
Thank You
EDIT: It is preferred that the solution does not require any paid tools.
Acctually, exists a many ways to implement this which depends on your Windows Installers skills.
You didn't specify target OSes for your application, that's why can I give you some ways:
PnpUtil.exe internal Windows 7 utility (only for Windows 7)
DPInst.exe included to WDK
DifXAPI merge module.
You can install drivers with help of all these utils via Custom Actions.
NOTE: That your driver SHOULD BE signed, otherwise you will receive error during silent installation.

Deploying linux CUDA app

I've compiled a cu program on my laptop, using NVIDIA CUDA 5 toolkit. A very basic interface, using only terminal output. Then I went on to test how it runs on my desktop PC (both have Ubuntu 12.04 LTS installed).
On the desktop PC I get this error message:
error while loading shared libraries: libcudart.so.5.0: cannot open shared object file: No such file or directory
Ok, I get it, some libs are not installed. But do I really need to install CUDA toolkit on every PC where I'd want my compiled code to run?
To deploy a CUDA runtime API application on linux you only need to do two things:
Make sure that the machine in question has a CUDA compatible card and a minimum driver version which matches the CUDA Toolkit you used to build the application (you can find information regarding both of these in the release notes of the toolkit)
Distribute the runtime library (so cudart.so) that you built the application against with the executable. If you used any other libraries from the toolkit (like CUBLAS, CUFFT, CUSPARSE, etc) you need to inlcude those too. The CUDA runtime library is versioned and you have to have the libraries which match the toolkit you are building with. You may need to use the LD_LIBRARY_PATH environment variable to ensure that the correct versions of the libraries are found by the link loader. Often a simple shell script which acts the canonical application, settings LD_LIBRARY_PATH variable and running the built executable is the best way to do this.
If you get those two things right, it should just work.

MongoDB PowerPC installation for Squeeze

Im trying to install MongoDB on Debian Squeeze but I keep on getting an error: Error unable to located package, this I think is because I'm running on powerpc, and on the internet Im only getting client-based installations for MongoDB. I was wondering if there is a server installation of MongoDB for Debian Squeeze PowerPC
PowerPC is not officially supported by 10gen as it requires an Intel processor. While there have been some attempts to make it work -- they're not official.
One is here, but it's very out of date (it's version is 1.8, and the current MongoDB version is 2.2).
The only supported way is to install the MongoDB on an Intel chipset, and use a driver for your favorite programming language to connect to the Database. Those apparently work on PowerPCs, etc. for many languages (according to the docs, but I've never tried it).