compiling mongo-client on OS X Maveriks

76 views
Skip to first unread message

Freddy Martinez Garcia

unread,
Apr 22, 2014, 12:45:13 AM4/22/14
to mongod...@googlegroups.com
hi guys

i’m a new mac user, and i coming from linux where i had compiled the mongo c++ driver a thousand times…. i had download the c++ driver from https://github.com/algernon/libmongo-client.git

after that i had installed automaker package to have the autoconf command

i had read the http://www.mongodb.org/about/tutorial/build-mongodb-on-os-x/

i run autoconf -i, and after that… i run ./configure and i have the following error….

reddys-MacBook-Pro:libmongo-client freddy$ ./configure --prefix=/Users/freddy/Trabajo/installs/libs/mongo-cxx/libmongo-client/build/
./configure: line 2107: syntax error near unexpected token `1.9'
./configure: line 2107: `AM_INIT_AUTOMAKE(1.9 tar-ustar foreign no-dist-gzip dist-xz subdir-objects)’

someone know about it ?

thanks for help me

best regards

Stephen Steneker

unread,
Apr 22, 2014, 1:16:09 AM4/22/14
to mongod...@googlegroups.com
On Tuesday, 22 April 2014 14:45:13 UTC+10, Freddy Martinez wrote:
i’m a new mac user, and i coming from linux where i had compiled the mongo c++ driver a thousand times…. i had download the c++ driver from https://github.com/algernon/libmongo-client.git

after that i had installed automaker package to have the autoconf command

i had read the http://www.mongodb.org/about/tutorial/build-mongodb-on-os-x/

Hi Freddy,

The Github repo you've linked to is an "alternative" C driver (libmongo-client), and the instructions you are trying to follow seem to be a mix of building the MongoDB server and libmongo-client.

As at MongoDB 2.6, the officially supported C++ driver has moved from the main "mongo" repository to a separate "mongo-cxx" repository:

Some of the documentation is still being updated, however there is a tutorial that should help:
 http://docs.mongodb.org/ecosystem/tutorial/download-and-compile-cpp-driver/

i run autoconf -i, and after that… i run ./configure and i have the following error….

Per the C++ driver tutorial, you should be using scons to build the official driver. The configure/autoconf instructions are for the alternative C driver (libmongo-client).

If you're still having troubles building the official C++ driver, let us know.

Thanks,
Stephen

Freddy Martinez

unread,
Apr 22, 2014, 11:23:11 AM4/22/14
to mongod...@googlegroups.com
Hi Stephen and thanks for your answer

I had read your message and I had download the c++ driver from a new repository on GitHub

when I run scons, I have the following error:

scons: *** No SConstruct file found.
File "/usr/local/Cellar/scons/2.3.1/libexec/scons-local/SCons/Script/Main.py", line 916, in _main

what is the problem now ??

regards and thanks

Freddy Martinez

unread,
Apr 22, 2014, 1:29:33 PM4/22/14
to mongod...@googlegroups.com
Sorry for my last post Stephen... I was making a mistake !!!! and I didn't see... well.. now I have another problem...

I had installed the boost with macport

sudo port install boost

the boost version installed was 1.55, and when I run scons to compile my mongo driver.... I have the following output

Freddys-MacBook-Pro:mongo-cxx-driver freddy$ scons
scons: Reading SConscript files ...
scons version: 2.3.1
python version: 2 7 5 'final' 0
Checking whether the C++ compiler works... (cached) yes
Checking whether the C compiler works... (cached) yes
Checking if C++ compiler "g++" is GCC... (cached) no
Checking if C++ compiler "g++" is clang... (cached) yes
Checking if C compiler "gcc" is clang... (cached) yes
Checking if C compiler supports -Wno-unused-local-typedefs... (cached) no
Checking if C compiler supports -Wno-unused-function... (cached) yes
Checking if C compiler supports -Wno-unused-private-field... (cached) yes
Checking if C compiler supports -Wno-deprecated-declarations... (cached) yes
Checking if C compiler supports -Wno-tautological-constant-out-of-range-compare... (cached) yes
Checking if C compiler supports -Wno-unused-const-variable... (cached) yes
Checking if C compiler supports -mmacosx-version-min=10.6... (cached) yes
Checking for __thread... (cached) no
Checking for C++ header file boost/version.hpp... (cached) yes
Checking for C++ library boost_thread-mt... (cached) no
Checking for C++ library boost_thread... (cached) no
Checking for C++ library boost_system-mt... (cached) no
Checking for C++ library boost_system... (cached) yes
Checking for C header file unistd.h... (cached) yes
Checking whether clock_gettime is declared... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
Target 'build/darwin/normal/arrayExample' depends on the availability of a system provided library for 'boost_thread', but no suitable library was found during configuration.
Target 'build/darwin/normal/arrayExample' depends on the availability of a system provided library for 'boost_thread', but no suitable library was found during configuration.
scons: *** [build/darwin/normal/arrayExample] Error 1
scons: building terminated because of errors.

i was looking into /opt/local/lib and I have the boost libraries, but I don't have libboost_thread.a file, I have lib boost_thread-mt.a file.

another suggestion please ?

regards 

Andrew Morrow

unread,
Apr 22, 2014, 1:36:29 PM4/22/14
to mongod...@googlegroups.com

Hi Freddy -

You haven't said what version/branch of the driver sources you are using, but I think it probably does not matter. The following should work for almost any branch. Can you please try adding --extrapath=/opt/local to your scons invocation? That directory is not searched automatically, so you need to explicitly tell the build system to search there. I'm a little puzzled actually about why it is finding boost/version.hpp without that actually.

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 http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/06c1361c-bd5f-4936-96aa-83ff10082baf%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Freddy Martinez

unread,
Apr 22, 2014, 2:43:07 PM4/22/14
to mongod...@googlegroups.com
Thanks bro... I put and --extrapath=/opt/local solve the problem

thanks to everybody for help me

regards
Reply all
Reply to author
Forward
0 new messages