Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
Describes how to download, build, and install build tools required for Apache Trafodion. |
Table of Contents |
---|
...
Required Build Tools
Several tools This page describes the tools that need to be manually downloaded, built and installed on a system used to build Trafodion. The location of the tools is configurable and can be specified in the Trafodion configuration file. The Trafodion configuration file template is located in <Trafodion download directory>/apache-trafodion-1.3.0-incubating/core/sqf/LocalSettingsTemplate.sh. Following the directory structure shown in the template file makes it easier to specify the location of these tools for the build. This means you will only need to set the TOOLSDIR environment variable to the value of the common parent directory before building Trafodion.
Several tools need to be downloaded, built, and installed. They include:
- MPICH – This tools in an implementation of the Message Passing Interface (MPI) standard. For use in Trafodion, MPICH must be built to force sockets to be used in both internode and intranode message passing.
- Bison – This tools is a general-purpose parser generator.
- Udis86 – this tool is a minimalistic disassembler library (libudis86) for the x86 class of instruction set architectures.
- LLVM is a collection of modular and reusable compiler and toolchain technologies.
- ICU is a setup of C/C++ and Java libraries providing Unicode and Globalization support for software applications.
- Zookeeper – is a coordination service for distributed applications. It exposes common services such as naming, configuration management, synchronization, and group services.
- Thrift – is a communications and data serialization tool
- Maven: Build tool that is only installed if compatible version does not exist
...
, and installed:
Tool | Description |
---|---|
MPICH | An implementation of the Message Passing Interface (MPI) standard. For use in Trafodion, MPICH must be built to force sockets to be used in both internode and intranode message passing. |
Bison | General-purpose parser generator. |
Udis86 | Minimalistic disassembler library (libudis86) for the x86 class of instruction set architectures. |
LLVM | Collection of modular and reusable compiler and toolchain technologies. |
ICU | Setup of C/C++ and Java libraries providing Unicode and Globalization support for software applications. |
Zookeeper | Coordination service for distributed applications. It exposes common services such as naming, configuration management, synchronization, and group services. |
Thrift | Communications and data serialization tool. |
Maven | Build tool that is only installed if compatible version does not exist. |
log4cxx | standard logging framework for C++ |
hadoop | shared libraries for libhadoop, libhdfs, and hdfs header file |
You can install these tools using one of the following methods:
- traf_tools_setup.sh installation: a script that uses wget to download the appropriate tar file, builds, and installs the required tool into a directory of your choice for each
...
- tool listed above. The advantage of this method is that all the correct tools are downloaded and built in a single directory. Before building, a single environment variable needs to be set called TOOLSDIR.
Manual installation: if one or more of these tools are already installed in your environment or if you want to verify the download location before accepting software, then you can install each tool separately. The advantage of this method is you don't have to reinstall tools that you already have installed. However, there may be an issue with incompatibility between the existing tools and versions required by Trafodion. If you choose this method, you need export the following variables before building:
export BISON="<tool location>/bison_3_linux/bin/bison"
export LLVM="<tool location>/dest-llvm-3.2"
export UDIS86="<tool location>/udis86-1.7.2"
export ICU="<tool location>/icu4.4"
export MPICH_ROOT="<tool location>/dest-mpich-3.0.4"
export ZOOKEEPER_DIR="<tool location>/zookeeper-3.4.5"
export THRIFT_LIB_DIR="<tool location>/thrift-0.9.0/lib"
export THRIFT_INC_DIR="<tool location>/thrift-0.9.0/include"
export LOG4CXX_LIB_DIR="<tool location>/apache-log4cxx-0.10.0/lib"
export HADOOP_BLD_LIB="<tool location>/hadoop-2.6.0/lib/native"
export HADOOP_BLD_INC="<tool location>/hadoop-2.6.0/include"
traf_tools_setup.sh Installation
Note |
---|
You may want to modify traf_tools_setup.sh for your specific environment. Example: if you already have Zoopkeeper installed, you may not want to re-install it. You may need root or sudo access to installs the tools in desired locations. In the sections below, incubator-trafodion represents the root directory where you installed the Trafodion source. (If you have not yet downloaded Trafodion source, please do so now.) |
Code Block | ||||
---|---|---|---|---|
| ||||
cd <Trafodion source directory>/install
./traf_tools_setup.sh -h
Usage: ./traf_tools_setup.sh -d <downloaddir> -i <installdir>
-d <downloaddir> - location of download directory
-i <installdir> - location of install directory
-h - help
example: traf_tools_setup.sh -d /home/userx/download -i /home/userx/tools |
Run traf_tools_setup.sh to install all dependent tools.
Code Block | ||||
---|---|---|---|---|
| ||||
$ mkdir ~/download
$ ./traf_tools_setup.sh -d ~/download -i ~/tools
INFO: Starting tools build on Fri Nov 6 21:33:53 PST 2015
Tools install directory /home/centos/tools does not exist, do you want to to create it? y/n : y
INFO: Created directory /home/centos/tools
INFO: Tar download location: /home/centos/download
INFO: Tool install directory location: /home/centos/tools
INFO: LogFile location: /home/centos/incubator-trafodion/install/traf_tools_setup.log
***********************************************************
INFO: Installing MPI on Fri Nov 6 21:34:00 PST 2015
INFO: downloaded tar file: mpich-3.0.4.tar.gz
.
.
.
INFO: downloaded tar file: apache-maven-3.3.3-bin.tar.gz
INFO: Maven installation complete
***********************************************************
INFO: Completed tools build on Fri Nov 6 22:23:22 PST 2015
INFO: List of tools directory:
apache-maven-3.3.3
bison_3_linux
dest-llvm-3.2
dest-mpich-3.0.4
icu4.4
thrift-0.9.0
udis86-1.7.2
zookeeper-3.4.5 |
Note |
---|
Don't move the install directory later. |
Manual Install
In the sections below, the <tool
To install all the tools using the Trafodion provided script, go to "Install tools using traf_tools_setup.sh".
To install each tool individually, go to "Install tools manually"
Install tools using traf_tools_setup.sh
Apache Trafodion provides a script called 'traf_tools_setup.sh' that installs each of these tools for you. This script uses the wget to download the software into a download location, builds the product and installs it into an install directory. This script can be modified to meet the needs of your environment. For example, if you already have Zoopkeeper installed, you may not want to re-install it.
You may need root or SUDO access to install tools in desired location
In the sections below, the <Trafodion installation directory> is the root directory where the Trafodion source has been installed. If you have not yet downloaded Trafodion source, please do it now.
cd <Trafodion download directory>
cd apache-trafodion-1.3.0-incubating/install
In this directory, there is a script called 'traf_tools_setup'.
./traf_tools_setup.sh -h
Usage: ./traf_tools_setup.sh -d <downloaddir> -i <installdir>
-d <downloaddir> - location of download directory (a temp directory that can be deleted later)
-i <installdir> - location of install directory ($TOOLSDIR)
-h - help
example: traf_tools_setup.sh -d /home/userx/download -i /home/userx/tools
Execute 'traf_tools_setup.sh' to install all dependent tools. Note: Don't move the install directory later.
Install tools manually
In the sections below, the <tool installation directory> is the directory where you want the tool to be installed.
MPICH
Trafodion has been built and tested with version Tested Version: 3.0.4
Download: of MPICH. The source tar file can be downloaded from http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz (http://www.mpich.org/downloads). Save the mpich-3.0.4.tar.gz file to your build system and then perform the following commands.
Considerations: For more detailed instructions, see the README file that comes with the source.
Install:
Code Block | ||
---|---|---|
| ||
tar -xzf mpich-3.0.4.tar.gz
cd mpich-3.0.4
./configure --prefix=<tool installation directory>/dest-mpich-3.0.4 --with-device=ch3:sock --disable-f77 --disable-fc
make
make check
make install |
...
Note: <tool <tool installation directory> is the directory where you want MPICH to be installed. If you do not specify the --prefix option, the default location is /usr/local. For more detailed instructions, see the README file that comes with the source.
Bison
Trafodion has been built and tested with version 3.0. To determine if Bison is installed and is compatible:
which bison
bison --version
-prefix option, the default location is /usr/local.
Bison
Tested Version: 3.0
Download: If a version older than 3.0 is returned, please download a later version. The source tar file can be downloaded from http://ftp.gnu.org/gnu/bison/bison-3.0.tar.gz (http://ftp.gnu.org/gnu.org/gnu/bison/). Save the bison-3.0.tar.gz file to your build system and then perform the following commands. /bison/)
Considerations: Refer to the bison INSTALL file for detailed instructions.
Code Block | ||||
---|---|---|---|---|
| ||||
which bison
bison --version |
If the version is older than 3.0, then do the following:
Code Block | ||
---|---|---|
| ||
tar -xzf bison-3.0.tar.gz
cd bison-3.0
./configure --prefix=<tool installation directory>/bison_3_linux
make
make check
make install |
...
Note |
---|
The make check |
...
step may return errors like the following that can be ignored: make[3]: Entering directory `<mydir>/bison-3.0' YACC examples/calc++/calc++-parser.stamp CXX examples/calc++/examples_calc___calc__-calc++-driver.o LEX examples/calc++/calc++-scanner.cc CXX examples/calc++/examples_calc___calc__-calc++-scanner.o g++: ./examples/calc++/calc++-scanner.cc: No such file or directory g++: no input file |
Adjust your PATH if necessary to make sure the correct version is chosen:
which bison
bison – version
Note: For more detailed instructions, see the INSTALL file that comes with the source.
Udis86
to ensure that the correct version is chosen. Rerun the bison --version to verify.
Udis86
Tested Version: 1.7.2
Download: Trafodion has been built and tested with version 1.7.2. The source tar file can be downloaded from http://sourceforge.net/projects/udis86/files/udis86/1.7/udis86-1.7.2.tar.gz (http://udis86.sourceforge.net). Udis86
Consideration: Udis86 is a prerequisite to building the LLVM product. product.
Install:
Code Block | ||
---|---|---|
| ||
tar xzf udis86-1.7.2.tar.gz
cd udis86-1.7.2
./configure --prefix |
...
=<tool installation directory>/udis86-1.7.2 --enable-shared
make
make install |
LLVM
Tested Version: 3.2
Download:
LLVM
Trafodion has been built and tested with version 3.2. Note: Udis86 must be installed on the system before LLVM is built and installed. Trafodion uses a debug build of LLVM for its debug build and a release build of LLVM for its release build. The instructions below are for building both flavors of LLVM, release and debug. The source tar files for LLVM can be downloaded from http://llvm.org/releases/3.2/llvm-3.2.src.tar.gz (http://llvm.org/releases/download.html).org/releases/download.html)
Consideration: Udis86 must be installed on the system before LLVM is built and installed. Building LLVM takes some time to complete, be patient.
Note | |
---|---|
|
...
| |
TBD: LLVM is available via yum. Is yum install a better approach? |
Install:
Code Block | ||
---|---|---|
| ||
# Set BASE_DIR to the top-level directory where the LLVM source will be
# unpacked and the objects compiled.
BASE_DIR=<your-base-dir>
cd $BASE_DIR
tar xzf llvm-3.2.src.tar.gz
export MY_UDIS_INSTALL_DIR=<udis-installation-directory>/udis86-1.7.2
export MY_LLVM_INSTALL_DIR=<llvm-installation-directory>/dest-llvm-3.2/
export MY_LLVM_SRC_DIR=$BASE_DIR/llvm-3.2.src
export MY_LLVM_OBJ_DIR=$BASE_DIR/llvm-3.2.obj/
export LD_LIBRARY_PATH=$MY_UDIS_INSTALL_DIR/lib:$LD_LIBRARY_PATH
export C_INCLUDE_PATH=$MY_UDIS_INSTALL_DIR/include
export CPATH=$MY_UDIS_INSTALL_DIR/include
mkdir -p $MY_LLVM_OBJ_DIR/release
cd $MY_LLVM_OBJ_DIR/release
$MY_LLVM_SRC_DIR/configure --prefix=$MY_LLVM_INSTALL_DIR/release \
--enable-optimized --enable-jit \
--enable-shared --enable-targets=x86,x86_64,cpp \
--with-udis86=$MY_UDIS_INSTALL_DIR/lib \
CFLAGS=-fgnu89-inline
make libs-only
make install-libs
mkdir -p $MY_LLVM_OBJ_DIR/debug
cd $MY_LLVM_OBJ_DIR/debug
$MY_LLVM_SRC_DIR/configure --prefix=$MY_LLVM_INSTALL_DIR/debug \
--enable-optimized --enable-jit \
--enable-debug-runtime --enable-debug-symbols \
--enable-shared --enable-targets=x86,x86_64,cpp \
--with-udis86=$MY_UDIS_INSTALL_DIR/lib \
CFLAGS=-fgnu89-inline
make libs-only
make install-libs |
...
ICU
ITrafodion has been built and tested with version Tested Version: 4.4.0
Download: . The source tar filecan be downloaded from http://download.icu-project.org/files/icu4c/4.4/icu4c-4_4-src.tgz (http://site.icu-project.org/download. )
Install:
Code Block | ||
---|---|---|
| ||
tar -xzf icu4c-4_4-src.tgz
cd icu/source
./runConfigureICU Linux --with-library-suffix=Nv44 --prefix=<tool installation directory>/icu4.4/linux64
make && make check
make install |
...
...
Note |
---|
The following make check |
...
errors can be ignored |
...
.
[All tests passed successfully...] Elapsed Time: 00:00:12.126 make[2]: Leaving directory `/home/centos/icu/source/test/cintltst' --------------- ALL TESTS SUMMARY: ok: testdata iotest cintltst ===== ERRS: intltest make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/home/centos/icu/source/test' make: *** [check-recursive] Error 2 |
Zookeeper
Trafodion has been built and tested with version Tested Version: 3.4.5
Download: . Download a recent stable version of Zookeeper from https://archive.apache.org/dist/zookeeper/zookeeper-3.4.5/zookeeper-3.4.5.tar.gz.
...
Install:
Code Block | ||
---|---|---|
| ||
tar -xzf zookeeper-3.4.5.tar.gz
|
...
cd zookeeper-3.4.5/src/c
|
...
./configure --prefix=<tool installation directory>/zookeeper-3.4.5
|
...
make
|
...
make install |
...
|
Thrift
Tested Version: 0.9.0
Download: Thrift is a communication and data serialization tool. Download source from http://archive.apache.org/dist/thrift/0.9.0/.
Consideration: Behind a firewall, you may need the ant flags to specify a proxy.
Install:
Code Block | ||
---|---|---|
| ||
tar -xzf thrift-0.9.0.tar.gz
cd thrift-0.9.0
./configure --prefix=<tool installation dir>/thrift-0.9.0 --without-qt
make
make install |
...
Maven
Maven
Tested Version: 3.3.3
Download: Maven is a build tool. Download source from http://archive.apache.org/dist/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz.
Considerations: Add Maven to your PATH once it has been installed.
Install:
Code Block | ||
---|---|---|
| ||
tar -xzf apache-maven-3.3.3-bin.tar.gz -C <tool installation directory> |
Please add Maven to your PATH.