How to install Membase from source on Debian Lenny 64
Hi all
I would greatly appreciate if any of you could tell me step by step how to install Membase from source. I have tried it but had several issues - mostly dependencies missing.
Yes that is the guide I have been following and everything went smoothly until this message appeared:
checking for libevent directory... configure: error:
You need to upgrade libevent to a version that supports:
* event_base_loopbreak
* evutil_socketpair
* evutil_make_socket_nonblocking
You can get it from http://www.monkey.org/~provos/libevent/
Therefore I did:
wget http://www.monkey.org/~provos/libevent-1.4.9-stable.tar.gz
tar xvfz libevent-1.4.9-stable.tar.gz
cd libevent-1.4.9-stable
./configure; make; make install
... and I get this message back:
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: in `/tmp/libevent-1.4.13-stable':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
... and if I check that log I see this detail:
configure:2974: checking whether the C compiler works
configure:2984: ./a.out
./configure: line 2986: ./a.out: Permission denied
So now I'm a bit stuck :(
Hope you can help.
A permission denied there is rather unusual. What does an "ls -l" say about the a.out that is generated.
Also useful may be a few lines from the file config.log related to this specific test. It won't be at the very end of config.log, but if you search that file for the "a.out: Permission denied" and post the lines around there, we can probably figure it out.
I tried to find the a.out with sudo find / -name a.out but nothing was returned.
Here is the entire config.log:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ ./configure --prefix=/usr/local
## --------- ##
## Platform. ##
## --------- ##
hostname = ps42037
uname -m = x86_64
uname -r = 2.6.33.3-vs2.3.0.36.30.4-swap-nooomloop-nolivelock-oom-jt3
uname -s = Linux
uname -v = #13 SMP Wed May 26 15:49:33 PDT 2010
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/X11R6/bin
## ----------- ##
## Core tests. ##
configure:2077: checking for a BSD-compatible install
configure:2145: result: /usr/bin/install -c
configure:2156: checking whether build environment is sane
configure:2199: result: yes
configure:2224: checking for a thread-safe mkdir -p
configure:2263: result: /bin/mkdir -p
configure:2276: checking for gawk
configure:2292: found /usr/bin/gawk
configure:2303: result: gawk
configure:2314: checking whether make sets $(MAKE)
configure:2336: result: yes
configure:2575: checking for gcc
configure:2591: found /usr/bin/gcc
configure:2602: result: gcc
configure:2834: checking for C compiler version
configure:2842: gcc --version >&5
gcc (Debian 4.3.2-1.1) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2846: $? = 0
configure:2853: gcc -v >&5
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-cld --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1)
configure:2857: $? = 0
configure:2864: gcc -V >&5
gcc: '-V' option must have argument
configure:2868: $? = 1
configure:2891: checking for C compiler default output file name
configure:2913: gcc conftest.c >&5
configure:2917: $? = 0
configure:2955: result: a.out
configure:2974: checking whether the C compiler works
configure:2984: ./a.out
./configure: line 2986: ./a.out: Permission denied
configure:2988: $? = 126
configure:2995: error: in `/tmp/libevent-1.4.13-stable':
configure:2999: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /tmp/libevent-1.4.13-stable/missing --run aclocal-1.10'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /tmp/libevent-1.4.13-stable/missing --run tar'
AR=''
AUTOCONF='${SHELL} /tmp/libevent-1.4.13-stable/missing --run autoconf'
AUTOHEADER='${SHELL} /tmp/libevent-1.4.13-stable/missing --run autoheader'
AUTOMAKE='${SHELL} /tmp/libevent-1.4.13-stable/missing --run automake-1.10'
AWK='gawk'
BUILD_WIN32_FALSE=''
BUILD_WIN32_TRUE=''
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DSYMUTIL=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
F77=''
FFLAGS=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIBTOOL_DEPS=''
LN_S=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /tmp/libevent-1.4.13-stable/missing --run makeinfo'
MKDIR_P='/bin/mkdir -p'
NMEDIT=''
OBJEXT=''
PACKAGE='libevent'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='1.4.13-stable'
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_F77=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='$(SHELL) /tmp/libevent-1.4.13-stable/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE "libevent"
#define VERSION "1.4.13-stable"
configure: exit 1
Looking at the log is unfortunately not telling me much. I don't quite know if the build system for libevent is any different, but I wouldn't expect this.
You may want to look for an updated .deb or apt repo with a proper libevent for you. It's a popular library, so it must be there somewhere.
If you can't, then perhaps try this:
1) Ensure you're not root
2) Re-extract the libevent tarball
3) Run ./configure
4) Run make
If you get this far without errors, you'll want to run make install as root, with "sudo make install".
Sorry for all the troubles. I am sure I can help you get there but it may require a bit of back and forth.
Hi
It is no trouble for me I'm just glad you will take the time to help me.
I think I have come a little bit further now. Originally, I made an install script with this inside:
cd /tmp
wget http://monkey.org/~provos/libevent-1.4.13-stable.tar.gz
tar xzvf libevent-1.4.13-stable.tar.gz
cd libevent-1.4.13-stable
sh ./configure --prefix=/usr/local && make && make install
... and then I would use sudo scriptname.sh, then everything inside would be executed as root (I think) - so therefore I followed your advice and did every command 1 by 1 and the only command used with sudo is make install and I did also leave out cd /tmp so the install was initiated from my home folder - and actually no error came back to me (as far as I could tell, the /tmp/libevent-1.4.13-stable/config.log is the same as copied here, i.e not been written to) - but sadly the message reappeared again:
checking for libevent directory... configure: error:
You need to upgrade libevent to a version that supports:
* event_base_loopbreak
* evutil_socketpair
* evutil_make_socket_nonblocking
You can get it from http://www.monkey.org/~provos/libevent/
make[1]: *** [memcached/Makefile] Fejl 1
make[1]: Forlader katalog '/home/membase_1/membase-server-community_1.6.4.1_src'
make: *** [/tmp/membase-build/bin/memcached] Fejl 2
... so again I'm stuck.
Actually, you're probably quite a bit closer. The only thing missing, now that you have libevent installed, is to show the individual component where to find it. This is mostly covered on this page:
http://wiki.membase.org/display/membase/Building+on+Linux+from+source#Bu...
Chances are you need to modify this line in the Makefile:
MEMCACHED_CONFIGURE_FLAGS=$(CONFIGURE_FLAGS)
To be more like this:
MEMCACHED_CONFIGURE_FLAGS=$(CONFIGURE_FLAGS) --with-libevent=/usr/local
But first check that libevent ended up in /usr/local. You can do this by just doing "ls" for "/usr/local/lib/libevent*" or with a find for "libevent.so*".
You're nearly there!
Thank you so much - yes I'm almost there, but the installation did not complete - these are the last few lines with errors (Fejl means error and Forlader means leaves):
libtool: link: g++ -pipe -O0 -DDEBUG -pedantic -Wall -Wundef -Wshadow -fdiagnostics-show-option -Wformat -fno-strict-aliasing -Wno-strict-aliasing -Wextra -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long -Wmissing-declarations -Wredundant-decls -std=gnu++0x -o vbucketmigrator src/binarymessagepipe.o src/buckets.o src/sockstream.o src/vbucketmigrator.o src/isasl.o src/mutex_pthread.o -L/tmp/membase-build/lib -levent -lpthread
src/vbucketmigrator.o: In function `check_stdin_thread':
/home/membase_1/membase-server-community_1.6.4.1_src/vbucketmigrator/src/vbucketmigrator.cc:428: undefined reference to `event_base_loopbreak'
collect2: ld returned 1 exit status
make[3]: *** [vbucketmigrator] Fejl 1
make[3]: Forlader katalog '/home/membase_1/membase-server-community_1.6.4.1_src/vbucketmigrator'
make[2]: *** [all] Fejl 2
make[2]: Forlader katalog '/home/membase_1/membase-server-community_1.6.4.1_src/vbucketmigrator'
make[1]: *** [vbucketmigrator/vbucketmigrator] Fejl 2
make[1]: Forlader katalog '/home/membase_1/membase-server-community_1.6.4.1_src'
make: *** [/tmp/membase-build/bin/vbucketmigrator] Fejl 2
Is this a software error or is it because I'm missing some other dependencies - to me it seems to be software related.
Hi
I actually managed to install, not like suggested in this topic but like described on this page:
http://wiki.membase.org/display/membase/Membase+Installation+Steps#Memba...
So many thanks for all taking their time to help me here.
Hi there! Just want to confirm that you've followed the directions here (http://wiki.membase.org/display/membase/Building+on+Linux+from+source) and are still having problems?
Can you provide the specific errors or dependencies that you are missing?
Thanks!
Perry
Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overview
Call or email "sales -at- couchbase-dot- com" today!