Building mesos from source

Install the required software for building

Download JDK from Oracle website and set following env variables

export JAVA_HOME=/home/jagat/development/tools/jdk1.6.0_45
export PATH=$PATH:$JAVA_HOME/bin

Install software for build stuff

Copy paste this

sudo apt-get install -y cmake git-core git-svn subversion checkinstall build-essential dh-make debhelper ant ant-optional autoconf automake liblzo2-dev libzip-dev sharutils libfuse-dev reprepro libtool libssl-dev asciidoc xmlto ssh curl

sudo apt-get install -y devscripts

sudo apt-get build-dep pkg-config dh-autoreconf python-dev libcurl4-openssl-dev libboost-all-dev libunwind8-dev


Clone the code

git clone https://git-wip-us.apache.org/repos/asf/mesos.git mesos


Go to directory where code is copied

cd mesos

All of the commands below should finish without errors.

./bootstrap


./configure

make



-----------------

Some of the errors i got and solved

mbolic-functions
checking consistency of all components of python development environment... no
configure: error: in `/home/jagat/development/code/berkley/mesos':
configure: error:
  Could not link test program to Python. Maybe the main Python library has been
  installed in some non-standard library path. If so, pass it to configure,
  via the LDFLAGS environment variable.
  Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
  ============================================================================
   ERROR!
   You probably have to install the development version of the Python package
   for your distribution.  The exact name of this package varies among them.
  ============================================================================

See `config.log' for more details
jagat@nanak-P570WM:~/development/code/berkley/mesos$ apt-cache search python27



Solution
Install python-dev


sudo apt-get install python-dev



checking for curl_global_init in -lcurl... no
configure: error: cannot find libcurl
  -------------------------------------------------------------------
  You can avoid this with --without-curl, but it will mean executor
  and task resources cannot be downloaded over http.
  -------------------------------------------------------------------



Solution
sudo apt-get instal libcurl4-openssl-dev




checking whether -pthread is sufficient with -shared... yes
checking for backtrace in -lunwind... no
configure: error: failed to determine linker flags for using Java (bad JAVA_HOME or missing support for your architecture?)


Solution
Download JDK from

set env variable as

export JAVA_HOME=/home/jagat/development/tools/jdk1.6.0_45


export PATH=$PATH:$JAVA_HOME/bin


----


And in end it fails wiht this message

cc1plus: all warnings being treated as errors
make[2]: *** [sched/libmesos_no_3rdparty_
la-sched.lo] Error 1
make[2]: Leaving directory `/home/jagat/development/tools/mesos-0.13.0/build/src'
make[1]: *** [check] Error 2
make[1]: Leaving directory `/home/jagat/development/tools/mesos-0.13.0/build/src'
make: *** [check-recursive] Error 
Solution

Read this
http://www.mail-archive.com/dev@mesos.apache.org/msg02267.html

or shortcut

open

mesos/src/Makefile.am:
 
Replace 
 
MESOS_CPPFLAGS += -Wall -Werror

With below line

MESOS_CPPFLAGS += -Wall -Werror -Wno-unused-local-typedefs. 



No comments:

Post a Comment

Please share your views and comments below.

Thank You.