-
-
Save yruss972/92a4060fe2a54f2caa8a to your computer and use it in GitHub Desktop.
Compile couchbase 2.5.1 on SmartOS base64 14.1 image (as root)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Setup destination directory | |
# | |
export MY_CB_DIR=/opt/couchbase | |
mkdir ${MY_CB_DIR} | |
# Install pre-requisite packages | |
/opt/local/bin/pkgin -y in libtool-base autoconf automake git gcc47 gnupg gmake libevent icu py27-expat snappy erlang-15 subversion-base go gettext | |
# | |
# Build gperftools pre-requisite | |
# | |
wget https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.2.1.tar.gz | |
tar -xvzf gperftools-2.2.1.tar.gz | |
cd gperftools-2.2.1 | |
./configure --enable-minimal --enable-shared --disable-static --prefix=${MY_CB_DIR} | |
make install | |
cd .. | |
(cd ${MY_CB_DIR}/include; mv google deprecated-google; ln -s gperftools google;) | |
# | |
# Get Google repo tool | |
# | |
curl https://storage.googleapis.com/git-repo-downloads/repo > /opt/local/bin/repo | |
chmod 755 /opt/local/bin/repo | |
# | |
# Build V8 v3.19.0 | |
# | |
wget -O v8-3.19.0.tar.gz 'https://github.com/v8/v8/archive/3.19.0.tar.gz' | |
tar -xvzf v8-3.19.0.tar.gz | |
cd v8-3.19.0 | |
make dependencies | |
make library=shared ./out/Makefile.native | |
sed -i -e '/rpath/d' -e 's,crsT,crs,' -e '/do_cmd,regen_makefile/d' out/Makefile.native out/samples/lineprocessor.target.native.mk out/samples/process.target.native.mk out/samples/shell.target.native.mk out/src/d8.target.native.mk out/tools/gyp/v8.target.native.mk out/tools/gyp/v8_shell.target.native.mk | |
make x64 library=shared -j 4 | |
cp out/x64.release/lib.target/libv8.so ${MY_CB_DIR}/lib | |
cp include/* ${MY_CB_DIR}/include/ | |
cd .. | |
# | |
# Setup for actual couchbase build | |
# | |
mkdir -p ~/.couchbase/build | |
cat > ~/.couchbase/build/Makefile.extra <<!END! | |
OPTIONS += CPPFLAGS="-I$(PREFIX)/include -m64" | |
OPTIONS += LDFLAGS="-R/opt/local/lib -L$(PREFIX)/lib -R$(PREFIX)/lib -m64" | |
OPTIONS += CXX="g++ -m64 -L/opt/local/lib -I/opt/local/include" | |
OPTIONS += CC="gcc -m64 -I/opt/local/include -L/opt/local/lib" | |
memcached_EXTRA_OPTIONS += --enable-tcmalloc-minimal | |
!END! | |
git config --global user.email "[email protected]" | |
git config --global color.ui auto | |
mkdir compile | |
cd compile | |
repo init -u git://github.com/couchbase/manifest.git -m released/2.5.1.xml | |
repo sync | |
sed -i 's#-L/opt/local/gcc47/lib ##' /opt/local/lib/libevent.la /opt/local/lib/libsnappy.la | |
make PREFIX=${MY_CB_DIR} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you have this up and running now. I saw on the mailing list that there were some issues.