Google Groups

Re: Building mongo-perf


Brian Carpio May 9, 2012 10:28 AM
Posted in group: mongodb-user
I have successfully built master (but I know you said to build 2.0)
and get the same error as before:

bcarpio@brianc-linux:~/Projects/mongo-perf$ sudo scons
scons: Reading SConscript files ...
Checking for C library mongoclient... yes
Checking for C library boost_thread_mt... no
Checking for C library boost_thread... yes
Checking for C library boost_filesystem_mt... no
Checking for C library boost_filesystem... yes
Checking for C library boost_program_options_mt... no
Checking for C library boost_program_options... yes
Checking for C library boost_system_mt... no
Checking for C library boost_system... yes
scons: done reading SConscript files.
scons: Building targets ...
g++ -o benchmark.o -c -pthread -O3 -g benchmark.cpp
In file included from benchmark.cpp:5:
/usr/local/include/mongo/client/dbclient.h:25:2: error: #error
dbclient.h is for C++ driver consumer use only
scons: *** [benchmark.o] Error 1
scons: building terminated because of errors.
bcarpio@brianc-linux:~/Projects/mongo-perf$

Let me know if I am doing something wrong here..

Thanks,
Brian


On May 9, 10:14 am, Brian Carpio <bcar...@thetek.net> wrote:
> Hey Mathias,
>
> I have done a git clone on:
>
>  git clonehttps://github.com/mongodb/mongo.git
>
> I then did a git checkout on remotes/origin/v2.0:
>
>  git checkout remotes/origin/v2.0
>
> Then I tried to build mongodb:
>
>  sudo scons $(test $(uname) = "Darwin" && echo -n --prefix=/opt/local)
> --full all
>
> But the build fails:
>
> third_party/js-1.7/jsprf.c: In function 'dosprintf':
> third_party/js-1.7/jsprf.c:952: warning: pointer targets in passing
> argument 1 of 'js_OneUcs4ToUtf8Char' differ in signedness
> third_party/js-1.7/jsstr.h:496: note: expected 'uint8 *' but argument
> is of type 'char *'
> gcc -o third_party/js-1.7/jsregexp.o -c -fPIC -fno-strict-aliasing -
> ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -
> fno-builtin-memcmp -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -
> D_FILE_OFFSET_BITS=64 -DXP_UNIX -DJSFILE -DEXPORT_JS_API -
> DJS_C_STRINGS_ARE_UTF8 -DHAVE_VA_COPY -DVA_COPY=va_copy -Ithird_party/
> js-1.7 -Ithird_party/pcre-7.4 -I. third_party/js-1.7/jsregexp.c
> abgcc -o third_party/js-1.7/jsscan.o -c -fPIC -fno-strict-aliasing -
> ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -
> fno-builtin-memcmp -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -
> D_FILE_OFFSET_BITS=64 -DXP_UNIX -DJSFILE -DEXPORT_JS_API -
> DJS_C_STRINGS_ARE_UTF8 -DHAVE_VA_COPY -DVA_COPY=va_copy -Ithird_party/
> js-1.7 -Ithird_party/pcre-7.4 -I. third_party/js-1.7/jsscan.c
> third_party/js-1.7/jsscan.c:112:22: error: jsautokw.h: No such file or
> directory
> third_party/js-1.7/jsscan.c: In function 'FindKeyword':
> third_party/js-1.7/jsscan.c:122: warning: label 'test_guess' defined
> but not used
> third_party/js-1.7/jsscan.c:119: warning: label 'got_match' defined
> but not used
> scons: *** [third_party/js-1.7/jsscan.o] Error 1
> scons: building terminated because of errors.
>
> Maybe my problem is using git and I should download a released tgz
> file from the mongodb website for 2.0? I am going to try master and
> then try and compile mongo-perf and see if that gets me anywhere.
>
> This is somewhat important I get running because I want/need to do
> some performance analysis on EC2 vs my current VMware infrastructure
> to see what the performance ratio is going to be. I know EC2 is going
> to be slower then my VMware environment but I'd like to come up with a
> good ratio with regard to shards in EC2 vs VMware so we know what our
> EC2 footprint is going to be.
>
> Thanks,
> Brian Carpio
>
> On May 7, 12:26 pm, Mathias Stearn <math...@10gen.com> wrote:
>
>
>
>
>
>
>
> > I just pushed some build fixes to mongo-perf. Please refetch and recompile.
> > Note that it is currently only tested building against the stable (2.0)
> > branch of the driver so I'd suggest using that to compile. Lest me know if
> > you are still getting errors.
>
> > On Friday, May 4, 2012 3:45:04 PM UTC-4, Brian Carpio wrote:
>
> > > Thanks for your help Tad! I'll look forward to your update.
>
> > > Brian Carpio
>
> > > On May 4, 1:10 pm, Tad Marshall <t...@10gen.com> wrote:
> > > > Sorry for the false start ... I'm also having trouble building
> > > mongo-perf
> > > > and I spoke to the author, who will look at it soon.  So, it's not you,
> > > the
> > > > code is in flux and mongo-perf is not quite sync-ed up with the most
> > > recent
> > > > changes in the MongoDB C++ driver.  I'll post an update when I get the
> > > "all
> > > > clear".
>
> > > > On Tuesday, May 1, 2012 3:34:04 PM UTC-4, Brian Carpio wrote:
>
> > > > > Hi,
>
> > > > > I'm currently trying to build mono-perf using this guide here:
>
> > > > >http://blog.beyondfog.com/mongodb-how-to-benchmark-and-test-performan...
>
> > > > > I have build mongo from source using scons and everything went fine
> > > > > but when I try and build mono-perf using scons I get the following
> > > > > error maybe this guide is missing a step. Also when I check
> > > /usr/local/
> > > > > include/mongo I don't see the platform directory, it does exist in my
> > > > > ~/Projects/mongo/src/mongo/platform directory.
>
> > > > > ~/Projects/mongo-perf$ sudo scons
> > > > > scons: Reading SConscript files ...
> > > > > Checking for C library mongoclient... yes
> > > > > Checking for C library boost_thread-mt... yes
> > > > > Checking for C library boost_filesystem-mt... yes
> > > > > Checking for C library boost_program_options-mt... yes
> > > > > Checking for C library boost_system-mt... yes
> > > > > scons: done reading SConscript files.
> > > > > scons: Building targets ...
> > > > > g++ -o benchmark.o -c benchmark.cpp
> > > > > In file included from /usr/local/include/mongo/client/dbclient.h:30,
> > > > >                  from benchmark.cpp:1:
> > > > > /usr/local/include/pch.h:28:34: error: mongo/platform/basic.h: No such
> > > > > file or directory
> > > > > In file included from /usr/local/include/pch.h:76,
> > > > >                  from /usr/local/include/mongo/client/dbclient.h:30,
> > > > >                  from benchmark.cpp:1:
> > > > > /usr/local/include/mongo/util/assert_util.h:24:37: error: mongo/
> > > > > platform/compiler.h: No such file or directory
> > > > > In file included from /usr/local/include/pch.h:76,
> > > > >                  from /usr/local/include/mongo/client/dbclient.h:30,
> > > > >                  from benchmark.cpp:1:
> > > > > /usr/local/include/mongo/util/assert_util.h:150: error: expected
> > > > > constructor, destructor, or type conversion before 'void'
> > > > > /usr/local/include/mongo/util/assert_util.h:152: error: expected
> > > > > constructor, destructor, or type conversion before 'void'
> > > > > /usr/local/include/mongo/util/assert_util.h:157: error: expected
> > > > > constructor, destructor, or type conversion before 'void'
> > > > > /usr/local/include/mongo/util/assert_util.h:158: error: expected
> > > > > constructor, destructor, or type conversion before 'void'
> > > > > /usr/local/include/mongo/util/assert_util.h:163: error: expected
> > > > > constructor, destructor, or type conversion before 'void'
> > > > > /usr/local/include/mongo/util/assert_util.h:165: error: expected
> > > > > constructor, destructor, or type conversion before 'void'
> > > > > /usr/local/include/mongo/util/assert_util.h:166: error: expected
> > > > > constructor, destructor, or type conversion before 'void'
> > > > > /usr/local/include/mongo/util/assert_util.h: In function 'void
> > > > > mongo::fassert(int, bool)':
> > > > > /usr/local/include/mongo/util/assert_util.h:175: error:
> > > > > 'fassertFailed' was not declared in this scope
> > > > > In file included from /usr/local/include/pch.h:76,
> > > > >                  from /usr/local/include/mongo/client/dbclient.h:30,
> > > > >                  from benchmark.cpp:1:
> > > > > /usr/local/include/mongo/util/assert_util.h: At global scope:
> > > > > /usr/local/include/mongo/util/assert_util.h:219: error: expected
> > > > > constructor, destructor, or type conversion before 'void'
> > > > > /usr/local/include/mongo/util/assert_util.h: In function 'void
> > > > > mongo::assertStreamGood(unsigned int, std::string, std::ios&)':
> > > > > /usr/local/include/mongo/util/assert_util.h:222: error:
> > > > > 'streamNotGood' was not declared in this scope
> > > > > In file included from /usr/local/include/mongo/util/goodies.h:24,
> > > > >                  from /usr/local/include/pch.h:78,
> > > > >                  from /usr/local/include/mongo/client/dbclient.h:30,
> > > > >                  from benchmark.cpp:1:
> > > > > /usr/local/include/mongo/bson/util/misc.h: In member function 'time_t
> > > > > mongo::Date_t::toTimeT() const':
> > > > > /usr/local/include/mongo/bson/util/misc.h:93: error: 'verifyFailed' is
> > > > > not a member of 'mongo'
> > > > > /usr/local/include/mongo/bson/util/misc.h:94: error: 'verifyFailed' is
> > > > > not a member of 'mongo'
> > > > > In file included from /usr/local/include/mongo/util/goodies.h:25,
> > > > >                  from /usr/local/include/pch.h:78,
> > > > >                  from /usr/local/include/mongo/client/dbclient.h:30,
> > > > >                  from benchmark.cpp:1:
> > > > > /usr/local/include/mongo/util/concurrency/mutex.h: In constructor
> > > > > 'mongo::SimpleMutex::SimpleMutex(const char*)':
> > > > > /usr/local/include/mongo/util/concurrency/mutex.h:151: error:
> > > > > 'verifyFailed' is not a member of 'mongo'
> > > > > /usr/local/include/mongo/util/concurrency/mutex.h: In destructor
> > > > > 'mongo::SimpleMutex::~SimpleMutex()':
> > > > > /usr/local/include/mongo/util/concurrency/mutex.h:154: error:
> > > > > 'verifyFailed' is not a member of 'mongo'
> > > > > /usr/local/include/mongo/util/concurrency/mutex.h: In member function
> > > > > 'void mongo::SimpleMutex::lock()':
> > > > > /usr/local/include/mongo/util/concurrency/mutex.h:158: error:
> > > > > 'verifyFailed' is not a member of 'mongo'
> > > > > /usr/local/include/mongo/util/concurrency/mutex.h: In member function
> > > > > 'void mongo::SimpleMutex::unlock()':
> > > > > /usr/local/include/mongo/util/concurrency/mutex.h:159: error:
> > > > > 'verifyFailed' is not a member of 'mongo'
> > > > > /usr/local/include/mongo/util/concurrency/mutex.h: In destructor
> > > > > 'mongo::RecursiveMutex::scoped_lock::~scoped_lock()':
> > > > > /usr/local/include/mongo/util/concurrency/mutex.h:191: error:
> > > > > 'verifyFailed' is not a member of 'mongo'
> > > > > In file included from /usr/local/include/pch.h:78,
> > > > >                  from /usr/local/include/mongo/client/dbclient.h:30,
> > > > >                  from benchmark.cpp:1:
> > > > > /usr/local/include/mongo/util/goodies.h: In function 'void
> > > > > mongo::strcpy_s(char*, unsigned int, const char*)':
> > > > > /usr/local/include/mongo/util/goodies.h:122: error: 'verifyFailed' is
> > > > > not a member of 'mongo'
> > > > > In file included from /usr/local/include/mongo/util/log.h:28,
> > > > >                  from /usr/local/include/pch.h:80,
> > > > >                  from...
>
> read more »