Excerpt |
---|
Provides instructions for how to set up the Trafodion build environment. |
...
Table of Contents | ||||
---|---|---|---|---|
|
...
If there isn’t lsb_release command, install with following command.
Code Block | ||||
---|---|---|---|---|
| ||||
sudo yum install redhat-lsb |
Install Required Packages
You need to install the following packages before you can build Trafodion.
...
The following yum commands are used to install the required packages:
Code Block | ||||
---|---|---|---|---|
| ||||
# Install first to avoid dependency problems for the steps below sudo yum install epel-release sudo yum install alsa-lib-devel ant ant-nodeps apr-devel apr-util-devel \ boost-devel cmake device-mapper-multipath dhcp doxygen flex \ gcc-c++ gd git glibc-devel glibc-devel.i686 graphviz-perl gzip \ java-1.7.0-openjdk-devel libX11-devel libXau-devel libaio-devel \ libcurl-devel libibcm.i686 libibumad-devel libibumad-devel.i686 \ libiodbc libiodbc-devel librdmacm-devel librdmacm-devel.i686 \ libxml2-devel lua-devel lzo-minilzo \ net-snmp-devel net-snmp-perl openldap-clients openldap-devel \ openldap-devel.i686 openmotif openssl-devel openssl-devel.i686 \ perl-Config-IniFiles perl-Config-Tiny \ perl-DBD-SQLite perl-Expect perl-IO-Tty perl-Math-Calc-Units \ perl-Params-Validate perl-Parse-RecDescent perl-TermReadKey \ perl-Time-HiRes protobuf-compiler protobuf-devel \ readline-devel rpm-build saslwrapper sqlite-devel libuuid-devel\ unixODBC unixODBC-devel uuid-perl wget xerces-c-devel xinetd ncurses-devel |
Note | ||
---|---|---|
| ||
You cannot build Trafodion unless you’ve installed the required packages. Also, you cannot create the Trafodion Test Environment without these packages. |
Remove pdsh
The Trafodion scripts get confused if pdsh is installed. Remove it for now.
After Trafodion R2.0, this is no longer a requirement. The build scripts can work correctly on a build system installed with PDSH after R2.0. This step is required if one want to build an older version of Trafodion.
Code Block | ||||
---|---|---|---|---|
| ||||
sudo yum -y erase pdsh |
Remove qt-dev
The Trafodion scripts get confused if qt-dev is installed. Remove it for now.
Code Block | ||||
---|---|---|---|---|
| ||||
sudo yum -y erase qt-dev |
Verify Java Version
The Java version must be 1.7.x.
Do the following:
Code Block | ||||
---|---|---|---|---|
| ||||
java -version |
Code Block | ||||
---|---|---|---|---|
| ||||
$ java -version java version "1.7.0_85" OpenJDK Runtime Environment (rhel-2.6.1.3.el6_6-x86_64 u85-b01) OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode) |
Ensure that the Java environment exists and points to your JDK installation. By default Java is located in /usr/lib/java-\<version\>
.
Code Block | ||||
---|---|---|---|---|
| ||||
$ echo $JAVA_HOME $ ls /usr/lib/jvm/java-1.7* /usr/lib/jvm/java-1.7.0: ASSEMBLY_EXCEPTION bin include jre lib LICENSE tapset THIRD_PARTY_README /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.95.x86_64: ASSEMBLY_EXCEPTION bin include jre lib LICENSE tapset THIRD_PARTY_README /usr/lib/jvm/java-1.7.0-openjdk.x86_64: ASSEMBLY_EXCEPTION bin include jre lib LICENSE tapset THIRD_PARTY_README $ export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64 $ ls $JAVA_HOME ASSEMBLY_EXCEPTION bin include jre lib LICENSE tapset THIRD_PARTY_README $ echo -en "export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64\n" >> $HOME/.bashrc |
Ensure that the locale environment.
Code Block | ||||
---|---|---|---|---|
| ||||
$ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=en_US.UTF-8 |
Note | ||
---|---|---|
| ||
Do not point |
Download and Install Trafodion Source Tree
The Trafodion source code contains tools that help you set up the build environment.
If you haven’t done so already, then download and install the Trafodion source tree. Refer to the Source Download instructions in the How-To chapter.
Code Block | ||||
---|---|---|---|---|
| ||||
git clone git://git.apache.org/trafodion.git |
Install Required Build Tools
Trafodion requires that several tools are installed in order to build. These tools are:
Tool | Description |
---|---|
Bison | General-purpose parser generator. |
ICU | Set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. |
LLVM | Collection of modular and reusable compiler and tool-chain technologies. |
Log4cxx | Standard logging framework. Can be installed via yum or built from source code, which requires apr-devel and apr-util-devel packages be installed. |
Maven | Build tool that is only installed if compatible version does not exist. |
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 inter-node and intra-node message passing. |
Protobuf | Protocol compiler for serializing data structures. |
Thrift | Communications and data serialization tool. |
Udis86 | Minimalistic disassembler library (libudis86) for the x86 class of instruction set architectures. |
Zookeeper | Coordination service for distributed applications. It exposes common services such as naming, configuration management, synchronization, and group services. |
You can perform the required installation using the Trafodion traf_tools_setup.sh
script (described below).
traf_tools_setup.sh
traf_tools_setup.sh
is a script that uses wget
to download the appropriate tar file, build, and install the required tool into a directory of your choice for each tool required tools.
The advantage of this method is that all the correct tools are downloaded and built in a single directory. That directory is referenced in the build using environment variable TOOLSDIR, though individual tools can be specified in different locations.
Info |
---|
The script assumes you want all the tools in the same destination directory. You may want to modify |
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 |
Install Procedure
Run traf_tools_setup.sh
to install all dependent tools:
Install the required Build tools. This takes some time to complete.
Code Block language bash $ cd ~/mysource/trafodion/install $ mkdir ~/trafodion-download ~/trafodion-build-tools $ ./traf_tools_setup.sh -d ~/trafodion-download -i ~/trafodion-build-tools INFO: Starting tools build on Mon Jan 25 12:30:41 PST 2016 Tools install directory /home/trafdeveloper/trafodion-build-tools does not exist, do you want to to create it? y/n : y INFO: Created directory /home/trafdeveloper/trafodion-build-tools INFO: Tar download location: /home/trafdeveloper/download INFO: Tool install directory location: /home/trafdeveloper/trafodion-build-tools INFO: LogFile location: /home/trafdeveloper/mysource/incubator-trafodion/install/traf_tools_setup.log *********************************************************** INFO: Installing MPI on Mon Jan 25 12:30:45 PST 2016 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 Mon Jan 25 13:18:31 PST 2016 INFO: List of tools directory: apache-log4cxx-0.10.0 apache-maven-3.3.3 bison_3_linux dest-llvm-3.2 dest-mpich-3.0.4 hadoop-2.6.0 icu4c_4.4 protobuf-2.5.0 thrift-0.9.0 udis86-1.7.2 zookeeper-3.4.5
Export
TOOLSDIR
in your environment or ~/.trafodion file.Code Block language bash export TOOLSDIR=$HOME/trafodion-build-tools echo -en "export TOOLSDIR=$HOME/trafodion-build-tools\n" >> $HOME/.bashrc
Verify Build Environment
Check Maven Installation
Code Block | ||||
---|---|---|---|---|
| ||||
mvn --version Apache Maven 3.3.3 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 05:51:28-0800) Maven home: /opt/apache-maven-3.3.3 Java version: 1.7.0_95, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.95.x86_64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "2.6.32-504.el6.x86_64", arch: "amd64", family: "unix" |
PATH
environmental variable in .bashrc
or .profile
. Reload as needed.
Code Block | ||
---|---|---|
| ||
PATH=$PATH:$TOOLSDIR/apache-maven-3.3.3/bin echo -en "export PATH=\$PATH:\$TOOLSDIR/apache-maven-3.3.3/bin\n" >> $HOME/.bashrc |
Validate Environmental Variables
Do a final check of your environmental variables and path:
Code Block | ||||
---|---|---|---|---|
| ||||
$ source $HOME/.bashrc $ # JAVA_HOME must be 1.7.x JDK $ echo $JAVA_HOME /usr/lib/jvm/java-1.7.0-openjdk.x86_64 $ # TOOLSDIR must point to the directory where you installed the Trafodion build tools $ echo $TOOLSDIR /home/trafodion/trafodion-build-tools $ # Maven must be available $ mvn --version Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T11:57:37+00:00) Maven home: /home/centos/trafodion-build-tools/apache-maven-3.3.3 Java version: 1.7.0_95, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.95.x86_64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "2.6.32-504.1.3.el6.x86_64", arch: "amd64", family: "unix" $ # g++ version 4.4.7 is required $ g++ --version g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16) Copyright (C) 2010 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. $ # date string without special character $ date Tue Oct 24 20:13:04 PDT 2017 |
...