Help compiling community edition of couchbase from github

Is there updated documentation on how to build the Community Edition of couchbase from github?
The page at http://www.couchbase.com/wiki/display/couchbase/Building+Couchbase+from+Source+on+Linux is outdated and the readme at https://github.com/couchbase/tlm/ doesn’t detail the various build flags needed.

I’m not sure I understand what you mean by “build flags needed”? I’ve submitted most of the content in https://github.com/couchbase/tlm/blob/master/README.markdown and I’m not aware of any special build flags needed?

I needed to pass BUILD_TYPE, COUCHBASE_MEMORY_ALLOCATOR and BUILD_ENTERPRISE to get something almost usable as community edition. Even then tcmalloc seems to be missing and I’m not seeing memory usage in stats… So it does “build” following the said instructions but it’s not complete. There’s missing bits of info that I’m trying to get from searching the interwebs.

If you are building on one of the “supported platforms” you should not need to set any variables in order to get a “working community edition” (you can set PREFIX to set the install prefix to the location for your installation). On supported platforms it will download all precompiled dependencies and automatically set variables like COUCHBASE_MEMORY_ALLOCATOR to the right values. For “non-supported” platforms you should try to build the “cbdeps” package depot in tlm/deps/packages and put them in ~/.cbdepscache and it’ll use the bits from there (you might have to update the manifest files and scripts to identify your platform). (btw. we’ve switched to jemalloc for !windows).

(the above information should be true for the 4.x version of couchbase).

Aah… that could be it. I’m pulling the 3.0.3-MP1.xml and trying to build that as community edition.

Do you recall the ones used to build 3.x properly?
I’m finding various ones across the web like DTCMALLOC_SMALL_BUT_SLOW, enable-minimal, disable-sasl, tcmalloc_minimal, and many others that make my head spin.
I’m builing, testing, building, testing, etc… it’d be nice if you helped me narrow it down :smile:

Trying to build on a supported platform I believe… Debian7.

Oh, you’re building 3.0.x series… hmm… Its been a loooong time since I did that :wink: I guess I’ll have to ping someone that might remember (or retry myself…)

new to Couchbase CE myself but did my first time source install on CentOS 7.1 on top of my Centmin Mod LEMP web stack (alot of dependencies already taken care of with the exception of a few)

yum -y install snappy snappy-devel v8 v8-devel erlang erlang-snappy
curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/bin/repo
chmod a+x /usr/bin/repo
cd /opt
mkdir couchbase
cd couchbase
repo init -u git://github.com/couchbase/manifest.git -m released/3.0.4.xml
repo sync
make

HTH

Just now to make sense of what to do next (why i joined the forums)

@trond should be using 4.0.x ? or should I stick with learning 3.0.x as a CouchBase noob ? :slight_smile:

We’ve spent a fair amount of time trying to make the build process of Couchbase 4.x a lot easier than the 3.x (and will continue to improve it)… Personally I think I would have started playing around with 4.x if your goal is to learn more about Couchbase…

I’ve decided to try out the 4.x build and I have to agree with your statement, it is a lot simpler to build.
I went with the manifest released/4.1.0.xml and it seems to have compiled fine using defaults and CMAKE_BUILD_TYPE=Release.
But ‘make test’ gives these 4 errors:

98% tests passed, 4 tests failed out of 160

Total Test time (real) = 3628.46 sec

The following tests FAILED:
1 - platform-dirutils-test (Failed)
15 - memcached-config (OTHER_FAULT)
41 - memcached-auditconfig-test (Failed)
58 - ep-engine-engine-tests (Failed)
Errors while running CTest
make: *** [test] Error 8

Any hints on how to fix these please?

You should probably post the logs containing the reason why they failed :wink:

here it is!
http://pastebin.com/Cp9hQh2D