0

It's been 2 days I'm trying to install the driver C++ of MongoDB but I keep running into the same mistake ( in Mac OS X environnement )

In file included from /opt/local/include/boost/filesystem/operations.hpp:24,
             from /opt/local/include/boost/filesystem/convenience.hpp:22,
             from pch.h:83,
             from pch.cpp:18:
/opt/local/include/boost/filesystem/config.hpp:16:5: error: #error Compiling Filesystem      version 3 file with BOOST_FILESYSTEM_VERSION defined != 3
In file included from util/goodies.h:22,
             from pch.h:161,
             from pch.cpp:18:
 util/concurrency/mutex.h: In function 'boost::xtime mongo::incxtimemillis(long long int)':

Before installing the lib ( by doing "scons" ), I installed pcre and boost via portmac ( sudo port install boost ).

Any ideas ? I'm really stuck right now..

Thx guys.

flocks
  • 218
  • 2
  • 13
  • What version of `boost` did you install? And what version of the C++ driver are you trying to compile? It looks like you may have installed an incompatible version of boost from ports. – Stennie Jul 19 '12 at 02:00

2 Answers2

2

You need downgrade the boost library to 1.45 or earlier version to build the mongodb, because it depend on the boost::filesystem v2, but the latest boost (after v1.46) is using boost::filesystem v3 by default.

http://www.boost.org/users/history/version_1_46_0.html

Filesystem: Version 3 of the library is now the default.

Flier Lu
  • 191
  • 4
0

I had the same problem, and downgrading to boost 1.45 got it compiled for me (thanks Flier Lu). I use MacPorts to install Boost; here's instructions on how to downgrade:

https://trac.macports.org/wiki/howto/InstallingOlderPort

Community
  • 1
  • 1
Duke Robillard
  • 141
  • 1
  • 5