Contains how-to information referenced from other chapters in this guide.
Source Download
You can obtain the Trafodion source code using one of these methods:
Git Fork
If you intend to make changes to the Trafodion source tree, then install the source tree from GitHub.
Install Git Tools
If you haven’t done so already, install the Git Tools:
- Download the appropriate tool version; Linux or Windows: http://git-scm.com/downloads.
- Set up your git environment: GitHub Documentation
- Ensure that you register your ssh keys.
Download Trafodion Source Tree
You download the Trafodion source tree once the git tools have been installed.
Fork Trafodion Repository
You create a private fork of Trafodion on https://github.com/apache/trafodion. Use the fork button top-right on the page to create your fork, which will be named <your-github-id>_fork
.
The following examples use trafdeveloper
to represent <your-github-id>
.
Clone Trafodion Repository
Use the git shell to perform this task.
# Move to the directory where you want to install the Trafodion source code. cd mysource # Clone the Trafodion source code git clone git://git.apache.org/trafodion.git # Change to the Trafodion source-tree directory cd trafodion # Register your fork as a remote branch git remote add trafdeveloper_fork git@github.com:trafdeveloper/trafodion
Create Task Branch
You create a task branch to make changes to the Trafodion source tree. Typically, we name the branches after the Jira we are working on. In this example, the Jira is: TRAFODION-1507.
# Ensure that you have the latest changes git fetch --all # Checkout source git checkout -b TRAFODION-1507 origin/master
tar/zip Download
Typically, you download the Trafodion source tree as a tar/zip file if you don’t intend the change the source code. For example, when you want to build the Trafodion binaries only.
tar file
Download Location: https://dist.apache.org/repos/dist/release/trafodion/
Open the
trafodion
folder.PGP Key
The source tar file has been signed with one of the pgp keys, which is included in the download location’s KEYS file.
Open the folder containing the version you want to download. For example: apache-trafodion-1.3.0-incubating
Download the
-src
file that fits your security needs. For example:apache-trafodion-1.3.0-incubating-src.tar.gz
Unpack the tar file:
mkdir <target-directory> tar -xzf <tar file> -C <target-directory> # Change direcotry name to match GitHub download name; makes this guide simpler to write. mv <target-directory>/apache-trafodion-<version>-incubating <target-directory>/trafodion
Example
$ mkdir ~/mysource $ tar -xzf apache-trafodion-1.3.0-incubating-src.tar.gz -C ~/mysource $ ls mysource apache-trafodion-1.3.0-incubating $ ls mysource/apache-trafodion-1.3.0-incubating core DISCLAIMER.txt env.sh licenses Makefile pom.xml README.txt win-odbc64 dcs docs install LICENSE.txt NOTICE.txt RAT_README.txt tests wms $ # Change directory name to match GitHub download name; makes this guide simpler to write. $ mv mysource/apache-trafodion-1.3.0-incubating mysource/trafodion $ ls mysource trafodion
zip File
Click on Download ZIP at https://github.com/apache/trafodion. The zip file will be named trafodion-master.zip
.
- If necessary, FTP the zip file to your Linux development environment using WinSCP or a similar tool.
Unzip to the target directory.
Unzip Trafodion Sourceunzip -q trafodion-master.zip -d mysource
Example
Unzip Example$ unzip -q trafodion-master.zip -d mysource $ ls mysource trafodion-master $ ls mysource/trafodion-master core DISCLAIMER.txt env.sh licenses Makefile pom.xml README.txt win-odbc64 dcs docs install LICENSE.txt NOTICE.txt RAT_README.txt tests wms $ # Change directory name to match GitHub download name; makes this guide simpler to write. $ mv mysource/trafodion-master mysource/trafodion $ ls mysource trafodion
Git Cheat Sheet
Download Git Tools
Refer to Git Tools Download.
Set-Up Git Environment
Refer to GitHub Documentation
Setup ssh Keys
Refer to ssh Keys.
Fork Trafodion Source Tree
trafdeveloper_fork
Clone Repository
Do the following:
# Move to the directory where you want to install the Trafodion source code. cd mysource # Clone the Trafodion source code git clone git://git.apache.org/incubator-trafodion.git # Change to the source-tree directory cd incubator-trafodion # Register your fork as a remote branch git remote add <your-git-id>_fork git@github.com:<your-git-id>/incubator-trafodion
# Move to the directory where you want to install the Trafodion source code. cd mysource # Clone the Trafodion source code git clone git://git.apache.org/incubator-trafodion.git # Register your fork as a remote branch git remote add trafdeveloper_fork git@github.com:trafdeveloper/incubator-trafodion
Create Task Branch
Do the following:
# Ensure that you have the latest changes git fetch --all # Checkout source git checkout -b TRAFODION-<jira-number> origin/master
# Ensure that you have the latest changes git fetch --all # Checkout source git checkout -b TRAFODION-1507 origin/master
Commit Changes
Do the following:
# Commit changes git commit -a # Dry-run check against main branch git push -n <your-git-id>_fork HEAD # Push changes to your private fork git push <your-git-id>_fork TRAFODION-1507
# Commit changes git commit -a # Dry-run check against main branch git push -n trafdeveloper_fork HEAD # Push changes to your private fork git push trafdeveloper_fork TRAFODION-1507
Create Pull Request
Do one of the following:
- Issue a
git pull-request
from the git shell. - Generate the pull request using the GitHub web interface.
git pull-request
Checkout Code
Do the following:
git checkout TRAFODION-<jira-number>
git checkout TRAFODION-1507
Build Tools Manual Install
In the sections below, the <tool installation directory>
is the directory where you want the tool to be installed.
BISON
- Tested Version: 3.0
- Download: http://ftp.gnu.org/gnu/bison/bison-3.0.tar.gz (http://ftp.gnu.org/gnu/bison/)
- Considerations: Refer to the bison INSTALL file for detailed instructions.
Determine Bison Version:
which bison bison --version
If the version is older than 3.0, then do the following:
tar -xzf bison-3.0.tar.gz cd bison-3.0 ./configure --prefix=<tool installation directory>/bison_3_linux make make check make install
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
to ensure that the correct version is chosen. Rerun thebison --version
to verify.
ICU
- Tested Version: 4.4.0
- Download: http://download.icu-project.org/files/icu4c/4.4/icu4c-4_4-src.tgz (http://site.icu-project.org/download)
Install:
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
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
LLVM
- Tested Version: 3.2
- Download: http://llvm.org/releases/3.2/llvm-3.2.src.tar.gz
- Consideration: Udis86 must be installed on the system before LLVM is built and installed. Building LLVM takes some time to complete, be patient.
Install:
# 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
Maven
- Tested Version: 3.3.3
- Download: 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:
tar -xzf apache-maven-3.3.3-bin.tar.gz -C <tool installation directory>
MPICH
- Tested Version: 3.0.4
- Download: http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz (http://www.mpich.org/downloads)
- Considerations: For more detailed instructions, see the README file that comes with the source.
Install:
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
<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
.
Thrift
- Tested Version: 0.9.0
- Download: http://archive.apache.org/dist/thrift/0.9.0/
- Consideration: Behind a firewall, you may need the ant flags to specify a proxy.
Install:
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
Udis86
- Tested Version: 1.7.2
- Download: http://sourceforge.net/projects/udis86/files/udis86/1.7/udis86-1.7.2.tar.gz (http://udis86.sourceforge.net)
- Consideration: Udis86 is a prerequisite to building the LLVM product.
Install:
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
Zookeeper
- Tested Version: 3.4.5
- Download: https://archive.apache.org/dist/zookeeper/zookeeper-3.4.5/zookeeper-3.4.5.tar.gz
Install:
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