Tangram-II Installation Tutorial: Ubuntu Linux 12.04 LTS x86 (32 Bits)
Note: The Tangram-II tool is currently incompatible with 64 bits Linux. Thus, be sure you're installing it on 32 bits Linux. We recommend you to run the "uname -i" command to make sure you're running 32 bits (i386) Linux.
Step 1 - Package Dependencies
In order to install all needed packages, proceed with the following command:
user@host:~/tangram2$ sudo apt-get install openssh-server vim libqt3-mt-dev libqt3-mt \
qt3-assistant qt3-linguist nedit build-essential flex bison gnuplot libxaw7-dev libreadline-dev \
tcsh libtool autoconf xutils-dev gcc-4.5 gcc-4.5-base g++-4.5 libncurses5-dev \
xfonts-75dpi xfonts-100dpi openjdk-7-jdk tgif
TGIF requires some fonts provided by the xfonts-75dpi package. Thus, you need to force X to rebuild its font information cache files. You can do this by rebooting linux, or by providing the following command:
user@host:~/tangram2$ sudo fc-cache -f -v
Also, you will need to set gcc-4.5 as your default compiler, so you can compile Tangram-II. Tangram-II will not work on gcc >= 4.6:
user@host:~/tangram2$ sudo ln -fs /usr/bin/gcc-4.5 /usr/bin/gcc
user@host:~/tangram2$ sudo ln -fs /usr/bin/g++-4.5 /usr/bin/g++
Step 2 - Setting Environment Variables
The Tangram2 tool makes use of a set of Linux environment variables. Some of them are needed to compile the code, prior to the installation, and some of them are needed to run the Tangram2 tool. For simplicity, we recommend you setting all environment variables before starting to
compile the code.
- If you're installing Tangram2 in your own account, add all four lines below to your ~/.bashrc file
- If you're performing a system wide installation of Tangram2 (i.e. all users), create the file /etc/profile.d/tangram2.sh and add the following lines:
export QTDIR=/usr/share/qt3
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
export TANGRAM2_HOME=/usr/local/Tangram2
export PATH=$PATH:$TANGRAM2_HOME/bin
Note that, on this example, the TANGRAM2_HOME environment variable is pointing to the /usr/local/Tangram2 directory. Thus, this is a system wide installation.
After creating the desired environment variable configuration file, you'll need to reload it before going to the next step. Depending on the
type of installation you choose (user acount or system wide), enter:
user@host:~/tangram2$ . ~/.bashrc
or
user@host:~/tangram2$ . /etc/profile.d/tangram2.sh
Step 3 - Compiling and Installing
-
System wide installation:
cd ‹tangram2_source_code_dir›
./configure <---------------------(note: don't use sudo here)
make <---------------------(note: don't use sudo here)
sudo make install <-------------------- (note: use sudo *only* here)
-
User account installation:
cd ‹tangram2_source_code_dir›
./configure --prefix=/home/user <------(note: don't use sudo here)
make <------(note: don't use sudo here)
make install <------(note: don't use sudo here)
Note 1: If you choose the user account installation, don't forget to set the TANGRAM2_HOME (see Step 2) according to the directory chosen to the --preffix option at the configure command.
Note 2: On this (user account installation) example the Tangram2 tool would be installed into the /home/user/Tangram2 directory.