Provides instructions for how to set up the Trafodion build environment.
The Build Environment must be created before you can build the Trafodion code.
Supported Platforms
RedHat or CentOS 6.4, 6.5, or 6.6 are supported.
Warning
6.7 and newer (including 7.x) do not work due to an incompatible version of the gcc compiler — you need gcc 4.4.7.
$ cat /etc/*release* CentOS release 6.6 (Final) LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch cat: /etc/lsb-release.d: Is a directory CentOS release 6.6 (Final) CentOS release 6.6 (Final) cpe:/o:centos:linux:6:GA
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:
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 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 \ openssl-static perl-Config-IniFiles perl-Config-Tiny \ qt-devel qt-config \ 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 saslwrapper sqlite-devel \ unixODBC unixODBC-devel uuid-perl wget xerces-c-devel xinetd
Warning
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.
sudo yum -y erase pdsh
Verify Java Version
The Java version must be 1.7.x.
Do the following:
java -version
$ 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\>
.
$ 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 "export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64" >> $HOME/.bashrc
Warning
Do not point $JAVA_HOME
to /usr
. The Trafodion build needs access to the complete JDK directory tree.
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.
git clone git://git.apache.org/incubator-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. |
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.
The script assumes you want all the tools in the same destination directory. You may want to modify traf_tools_setup.sh
for your specific environment.
In the sections below, incubator-trafodion
represents the root directory where you installed the Trafodion source.
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.
$ cd ~/mysource/incubator-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: 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
Export
TOOLSDIR
in your environment or ~/.trafodion file.export TOOLSDIR=$HOME/trafodion-build-tools echo "export TOOLSDIR=$HOME/trafodion-build-tools" >> $HOME/.bashrc
Verify Build Environment
Check Maven Installation
mvn --version Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 05:51:28-0800) Maven home: /opt/apache-maven-3.0.5 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.
PATH=$PATH:$TOOLSDIR/apache-maven-3.3.3/bin echo "PATH=\$PATH:\$TOOLSDIR/apache-maven-3.3.3/bin" >> $HOME/.bashrc
Check qmake Installation
QMake version 2.01a Using Qt version 4.6.2 in /usr/lib64
If qmake is not found, then you should add qmake to your PATH
environmental variable in .bashrc
or .profile
. Reload as needed.
$ sudo find /usr | grep qmake | grep -v conf /usr/bin/qmake-qt4 /usr/lib64/qt4/bin/qmake-qt4 /usr/lib64/qt4/bin/qmake /usr/lib64/qt4/mkspecs/symbian-sbsv2/flm/qt/qmake_store_build.flm /usr/lib64/qt4/mkspecs/symbian-sbsv2/flm/qt/qmake_post_link.flm /usr/lib64/qt4/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm /usr/lib64/qt4/mkspecs/symbian-sbsv2/flm/qt/qmake_extra_pre_targetdep.flm $ PATH=$PATH:/usr/lib64/qt4/bin/ $ echo "PATH=\$PATH:/usr/lib64/qt4/bin/" >> $HOME/.bashrc
Validate Environmental Variables
Do a final check of your environmental variables and path:
$ 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" $ # qmake must be available $ qmake --version QMake version 2.01a Using Qt version 4.6.2 in /usr/lib64 $ # 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. $