Permalink
Browse files

Updated README, added check when running bootstrap that ensures the s…

…cript is being run from the proper directory, and removed the .template from the configure scripts.

git-svn-id: https://svn.apache.org/repos/asf/incubator/mesos/trunk@1295333 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent ebfb806 commit 9d54ad4ee039af12dec05c4ef390645fc38479e7 @benh benh committed Feb 29, 2012
View
122 README
@@ -1 +1,121 @@
-See the wiki at https://github.com/mesos/mesos/wikis.
+Building and Installing
+=======================
+
+For the impatient:
+
+ $ ./configure
+ $ make
+ $ make check
+ $ make install
+
+Alternatively (and recommended), use a remote build directory:
+
+ $ mkdir build
+ $ cd build
+ $ ../configure
+ $ make
+ $ make check
+ $ make install
+
+If you can't seem to find configure then you probably downloaded the
+source, you'll need to "bootstrap" your development environment with:
+
+ $ ./bootstrap
+
+There are numerous configuration options that might be applicable to
+you. Check them out via:
+
+ $ ./configure --help
+
+The specific options that might be relevant include:
+
+ --disable-java don't build Java bindings
+ --disable-python don't build Python bindings
+ --disable-webui don't build webui (requires Python 2.6)
+ --disable-optimize don't try to compile with optimizations
+ --without-included-zookeeper
+ excludes building and using the included ZooKeeper
+ package in lieu of a system installed version (note,
+ however, that no attempt is made to find the package
+ and explicitly setting CPPFLAGS and LDFLAGS as
+ appropriate may be necessary)
+
+And the specific environment variables that might be relevant are:
+
+ JAVA_HOME location of Java Development Kit (JDK)
+ JAVA_CPPFLAGS
+ preprocessor flags for JDK
+ JAVA_LDFLAGS
+ linker flags for JDK
+ PYTHON which Python interpreter to use
+
+We've tailored a few scripts with the configure options and
+environment variables necessary for different environments:
+
+ ./configure.amazon-linux-64
+ ./configure.centos-5.4-64
+ ./configure.macosx
+ ./configure.ubuntu-hardy-64
+ ./configure.ubuntu-karmic-64
+ ./configure.ubuntu-lucid-64
+ ./configure.ubuntu-natty-64
+
+
+Java
+====
+
+During configuraiton we attempt to determine a suitable location for
+JDK so that we can build JNI based libraries. If we can not do so, you
+may need to try setting JAVA_HOME, JAVA_CPPFLAGS, or JAVA_LDFLAGS
+manually.
+
+The resulting libmesos.a/so/dylib will include the Java bindings (JNI)
+if they are enabled (which they are by default, and can be disabled
+with the '--disable-java' configuration option). The Mesos JAR can be
+found in [build]/src (where [build] represents a remote build
+directory if any).
+
+
+Python
+======
+
+We build a Python egg that can be included in the PYTHONPATH when
+running Python based frameworks. The Python egg is built in
+[build]/src/python/dist (where [build] represents a remote build
+directory if any).
+
+
+Running Mesos before Installing
+===============================
+
+After running 'make' but before running 'make install' you can run any
+of the binaries but certain environment variables must be set up first
+(see [build]/bin/mesos-build-env.sh.in). It's advisable to run the
+binaries by using the wrapper scripts provided in [build]/bin. Note
+that these scripts also have a GDB variant that starts the binaries in
+GDB when you want to debug.
+
+
+Examples and Tests
+==================
+
+After running 'make check' there will be a collection of examples and
+tests that get built. Check out [build]/src/examples and
+[build]/src/examples/java and [build]/src/examples/python. In
+addition, see [build]/bin for scripts that can run the tests and also
+launch the tests in GDB.
+
+
+Installing
+==========
+
+Note that 'make install' may require superuser privileges. Consider
+changing the installation prefix (i.e., the '--prefix=...'
+configuration option) or doing 'make install DESTDIR=...'.
+
+
+As always, if you run into any issues please email:
+
+ mesos-dev@incubator.apache.org
+
+(Remember to include as much debug information as possible.)
View
@@ -1,5 +1,13 @@
#!/bin/sh
+# Make sure that we are in the right directory.
+if test ! -f configure.ac; then
+ cat >&2 <<__EOF__
+You must run bootstrap from the root of the distribution.
+__EOF__
+ exit 1
+fi
+
# Note that we don't use '--no-recursive' becuase older versions of
# autoconf/autoreconf bail with that option. Unfortunately this means
# that we'll modify a lot of files in third_party/libprocess, but that
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec `dirname ${0}`/configure JAVA_HOME=/usr/lib/jvm/java-1.6.0 ${@}
View
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec `dirname ${0}`/configure LDFLAGS=-lunwind-x86_64 JAVA_HOME=/usr/java/default ${@}
View
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+ENV_VARS= # Empty by default.
+
+# Set environment variables JAVA_HOME and JAVA_CPPFLAGS for 10.7 since
+# the JAVA_HOME discovered during configure using 'java.home' does not
+# have the JNI headers.
+case `sw_vers -productVersion` in
+ 10.7*)
+ test ! -z "${JAVA_HOME}" || \
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+
+ test ! -z "${JAVA_CPPFLAGS}" || \
+ JAVA_CPPFLAGS=-I${JAVA_HOME}/../Headers
+
+ ENV_VARS="JAVA_HOME=${JAVA_HOME} JAVA_CPPFLAGS=${JAVA_CPPFLAGS}"
+ ;;
+esac
+
+exec `dirname ${0}`/configure ${ENV_VARS} ${@}
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-$(dirname $0)/configure \
- --with-python-headers=/usr/include/python2.6 \
- --with-java-home=/usr/lib/jvm/java-1.6.0 \
- --with-webui \
- --with-included-sqlite \
- --with-included-zookeeper $@
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-export LDFLAGS=-lunwind-x86_64
-
-$(dirname $0)/configure \
- --with-python-headers=/usr/include/python2.6 \
- --with-java-home=/usr/java/default \
- --with-webui \
- --with-included-zookeeper $@
View
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-if test -z "$JAVA_HOME"; then
- JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-fi
-
-if test -z "$JAVA_HEADERS"; then
- JAVA_HEADERS=/System/Library/Frameworks/JavaVM.framework/Headers
-fi
-
-$(dirname $0)/configure \
- --with-python-headers=/usr/include/python2.6 \
- --with-java-home=$JAVA_HOME \
- --with-java-headers=$JAVA_HEADERS \
- --with-webui \
- --with-included-zookeeper $@
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-export PYTHON=python2.5
-
-$(dirname $0)/configure \
- --with-python-headers=/usr/include/python2.5 \
- --with-java-home=/usr/lib/jvm/java-6-openjdk \
- --with-webui \
- --with-included-zookeeper $@
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-$(dirname $0)/configure \
- --with-python-headers=/usr/include/python2.6 \
- --with-java-home=/usr/lib/jvm/java-6-sun \
- --with-webui \
- --with-included-zookeeper $@
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-$(dirname $0)/configure \
- --with-python-headers=/usr/include/python2.6 \
- --with-java-home=/usr/lib/jvm/java-6-openjdk \
- --with-webui \
- --with-included-zookeeper $@
@@ -1,8 +0,0 @@
-#!/bin/sh
-export PYTHON=python2.7
-
-$(dirname $0)/configure \
- --with-python-headers=/usr/include/python2.7 \
- --with-java-home=/usr/lib/jvm/java-6-sun \
- --with-webui \
- --with-included-zookeeper $@
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec `dirname ${0}`/configure JAVA_HOME=/usr/lib/jvm/java-6-openjdk ${@}
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec `dirname $0`/configure PYTHON=python2.7 ${@}
@@ -156,7 +156,7 @@ fi
if [[ "$DOWNLOADED" == "1" ]] ; then
echo "Building Mesos..."
pushd /root/mesos > /dev/null 2>&1
- ./configure.template.ubuntu-lucid-64
+ ./configure.ubuntu-lucid-64
make clean
make
popd > /dev/null 2>&1
@@ -156,7 +156,7 @@ fi
if [[ "$DOWNLOADED" == "1" ]] ; then
echo "Building Mesos..."
pushd /root/mesos > /dev/null 2>&1
- ./configure.template.ubuntu-lucid-64
+ ./configure.ubuntu-lucid-64
make clean
make
popd > /dev/null 2>&1
@@ -156,7 +156,7 @@ fi
if [[ "$DOWNLOADED" == "1" ]] ; then
echo "Building Mesos..."
pushd /root/mesos > /dev/null 2>&1
- ./configure.template.ubuntu-lucid-64
+ ./configure.ubuntu-lucid-64
make clean
make
popd > /dev/null 2>&1
@@ -151,7 +151,7 @@ fi
if [[ "$DOWNLOADED" == "1" ]] ; then
echo "Building Mesos..."
pushd /root/mesos > /dev/null 2>&1
- ./configure.template.ubuntu-lucid-64
+ ./configure.ubuntu-lucid-64
make clean
make
popd > /dev/null 2>&1

0 comments on commit 9d54ad4

Please sign in to comment.