README.linux 4.97 KB
Newer Older
Elemer Lelik's avatar
Elemer Lelik committed
1
******************************************************************************
Lenard Nagy's avatar
Lenard Nagy committed
2
* Copyright (c) 2000-2017 Ericsson Telecom AB
Elemer Lelik's avatar
Elemer Lelik committed
3
4
5
6
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
Elemer Lelik's avatar
Elemer Lelik committed
7
8
9
10
11
12
*  Contributors:
*   Balasko, Jeno
*   Baranyi, Botond
*   Lelik, Elemer
*   Pilisi, Gergely
*   Szabados, Kristof
Elemer Lelik's avatar
Elemer Lelik committed
13
14
15
16
17
18
19
20
21
22
23
24
25
******************************************************************************

Build and install Titan on Linux

1.Install required libraries: 
(examples are given for Ubuntu 12.04/14.04; for other Linuxes, pls. use the relevant library installation method)

sudo apt-get install g++ expect libssl-dev libxml2-dev libncurses5-dev flex bison
xutils-dev is needed by makedepend:
sudo apt-get install xutils-dev
The following packages may be needed for titan_eclipse/automatic_build:
sudo apt-get install ant xsltproc

26
2.Clone or update the titan directory from git into /home/<user_id>/titan.core
Elemer Lelik's avatar
Elemer Lelik committed
27

28
29
30
31
32
33
34
35
cd /home/<user_id>/
git clone https://github.com/eclipse/titan.core.git  titan.core

or

Update the already existing local repository:
cd /home/<user_id>/titan.core
git pull https://github.com/eclipse/titan.core.git
Elemer Lelik's avatar
Elemer Lelik committed
36
37
38

3. Configure the build 

Elemer Lelik's avatar
Elemer Lelik committed
39
cd titan.core
Elemer Lelik's avatar
Elemer Lelik committed
40
41

For open source users: check that MakefileFOSS.cfg is present and has the following content:
Elemer Lelik's avatar
Elemer Lelik committed
42
43
44
45
46
47
cat MakefileFOSS.cfg

# Configurations for the Free Open Source Software version
LICENSING := no
USAGE_STATS := no

Elemer Lelik's avatar
Elemer Lelik committed
48
49
50
51
52
If you want to use your build within the Ericsson domain: delete MakefileFOSS.cfg
This will enable Ericsson internal-only licensing and statistics.
 
GEN_PDF set to yes will convert Word documents to PDF using a web service available within Ericsson only.
Alternatively, one can install libreoffice and convert the documentation files as below:
Elemer Lelik's avatar
Elemer Lelik committed
53

Elemer Lelik's avatar
Elemer Lelik committed
54
55
56
57
cd titan.core/userguide
libreoffice -convert-to pdf *.doc *.docx

Several other build options are possible; for details on options please read through the Makefile.cfg.
Elemer Lelik's avatar
Elemer Lelik committed
58
59
60
61
Options can be overridden by the content of  a file named Makefile.personal which can be used to 
adapt to local installation directories, change config options etc.
Below, a small number of typical scenarios are presented.

Elemer Lelik's avatar
Elemer Lelik committed
62
a) JNI  disabled, gcc compiler (default)
Elemer Lelik's avatar
Elemer Lelik committed
63
64

The JNI interface is used by the Eclipse Titan Executor or by the Java Executor API.
Elemer Lelik's avatar
Elemer Lelik committed
65
If you don't need them, Titan can be compiled without JNI. 
Elemer Lelik's avatar
Elemer Lelik committed
66

Elemer Lelik's avatar
Elemer Lelik committed
67
Create ~/titan.core/Makefile.personal to override settings in Makefile.cfg with the following content:
Elemer Lelik's avatar
Elemer Lelik committed
68
69
(replace paths with values relevant to your installation)

Elemer Lelik's avatar
Elemer Lelik committed
70
TTCN3_DIR := /home/<user id>/titan.core/Install
Elemer Lelik's avatar
Elemer Lelik committed
71
72
73
74
75
76
OPENSSL_DIR := /usr
#JDKDIR := /usr/lib/jvm/java-7-openjdk-amd64
XMLDIR := /usr
JNI := no
GEN_PDF := no

Elemer Lelik's avatar
Elemer Lelik committed
77
78
79
80
b) JNI  disabled, clang compiler ver. 3.8

Create ~/titan.core/Makefile.personal to override settings in Makefile.cfg with the following content:
(replace paths with values relevant to your installation). 
Elemer Lelik's avatar
Elemer Lelik committed
81

Elemer Lelik's avatar
Elemer Lelik committed
82
83
84
85
86
87
88
89
TTCN3_DIR := /home/<user id>/titan.core/Install
OPENSSL_DIR := /usr
#JDKDIR := /usr/lib/jvm/java-7-openjdk-amd64
XMLDIR := /usr
JNI := no
GEN_PDF := no
CXX := clang++-3.8
CC := clang-3.8 
Elemer Lelik's avatar
Elemer Lelik committed
90
91


Elemer Lelik's avatar
Elemer Lelik committed
92
c) JNI  enabled, gcc compiler (default)
Elemer Lelik's avatar
Elemer Lelik committed
93
94
95

install JDK   into /home/<user id>/jdk

Elemer Lelik's avatar
Elemer Lelik committed
96
Create ~/titan.core/Makefile.personal to override settings in Makefile.cfg with the following content:
Elemer Lelik's avatar
Elemer Lelik committed
97
(replace paths with values relevant to your installation).
Elemer Lelik's avatar
Elemer Lelik committed
98

Elemer Lelik's avatar
Elemer Lelik committed
99
TTCN3_DIR := /home/<user id>/titan.core/Install
Elemer Lelik's avatar
Elemer Lelik committed
100
101
102
103
104
105
OPENSSL_DIR := /usr
JDKDIR := /usr/lib/jvm/java-7-openjdk-amd64
XMLDIR := /usr
JNI := yes
GEN_PDF := no

Elemer Lelik's avatar
Elemer Lelik committed
106
Note: For Raspberry Pi "-fsigned-char" needs to be added to compiler flags in Makefile.personal:
Elemer Lelik's avatar
Elemer Lelik committed
107

Elemer Lelik's avatar
Elemer Lelik committed
108
COMPILERFLAGS := -Wall -fsigned-char
Elemer Lelik's avatar
Elemer Lelik committed
109

Elemer Lelik's avatar
Elemer Lelik committed
110
4. Run make
Elemer Lelik's avatar
Elemer Lelik committed
111
112
113

make

Elemer Lelik's avatar
Elemer Lelik committed
114
5. Set environment variables
Elemer Lelik's avatar
Elemer Lelik committed
115

Elemer Lelik's avatar
Elemer Lelik committed
116
setenv TTCN3_DIR /home/<user id>/titan.core/Install
Elemer Lelik's avatar
Elemer Lelik committed
117
118
setenv PATH /home/<userid>/titan.core/Install/bin/:${PATH}
setenv LD_LIBRARY_PATH /home/<userid>/titan.core/Install/lib:${LD_LIBRARY_PATH}
Elemer Lelik's avatar
Elemer Lelik committed
119

Elemer Lelik's avatar
Elemer Lelik committed
120
for csh
Elemer Lelik's avatar
Elemer Lelik committed
121

Elemer Lelik's avatar
Elemer Lelik committed
122
or 
Elemer Lelik's avatar
Elemer Lelik committed
123

Elemer Lelik's avatar
Elemer Lelik committed
124
export TTCN3_DIR=/home/<user id>/titan.core/Install
Elemer Lelik's avatar
Elemer Lelik committed
125
126
export PATH=/home/<userid>/titan.core/Install/bin/:${PATH}
export LD_LIBRARY_PATH=/home/<userid>/titan.core/Install/lib:${LD_LIBRARY_PATH}
Elemer Lelik's avatar
Elemer Lelik committed
127

Elemer Lelik's avatar
Elemer Lelik committed
128
for bash
Elemer Lelik's avatar
Elemer Lelik committed
129

Elemer Lelik's avatar
Elemer Lelik committed
130
6. Run make install
Elemer Lelik's avatar
Elemer Lelik committed
131

Elemer Lelik's avatar
Elemer Lelik committed
132
make install
Elemer Lelik's avatar
Elemer Lelik committed
133

Elemer Lelik's avatar
Elemer Lelik committed
134
This will install Titan into  /home/<user id>/titan.core/Install
Elemer Lelik's avatar
Elemer Lelik committed
135
136


Elemer Lelik's avatar
Elemer Lelik committed
137
7. Optionally , run function/regression tests
Elemer Lelik's avatar
Elemer Lelik committed
138

Elemer Lelik's avatar
Elemer Lelik committed
139
cd /home/<user id>/titan.core/function_test
Elemer Lelik's avatar
Elemer Lelik committed
140
141
142

in the following Makefiles 

Elemer Lelik's avatar
Elemer Lelik committed
143
BER_EncDec/Makefile
Elemer Lelik's avatar
Elemer Lelik committed
144
145
146
147
148
149
150
151
152
153
154
155
XER_EncDec/Makefile
Text_EncDec/Makefile
RAW_EncDec/Makefile

edit the value of XMLDIR to match your installation values 

run the tests

make

( or make |& tee outputfile if you want to save the output for verification)

Elemer Lelik's avatar
Elemer Lelik committed
156
cd /home/<user id>/titan.core/regression_test
Elemer Lelik's avatar
Elemer Lelik committed
157
158
159
160
161
162
make run

( or make run |& tee outputfile if you want to save the output for verification)

These tests might run for half an hour (regr.tests)  to two hours (func.tests)

Lenard Nagy's avatar
Lenard Nagy committed
163
8. Optionally, copy Titan into its final directory.
Lenard Nagy's avatar
Lenard Nagy committed
164
From here on, you can continue with the Titan installation guide, see /Install/docs, to set/change environment variables etc.
Elemer Lelik's avatar
Elemer Lelik committed
165
and then, optionally, the Eclipse installation guide.
Elemer Lelik's avatar
Elemer Lelik committed
166