README.linux 6.56 KB
Newer Older
balaskoa's avatar
balaskoa committed
1
cd******************************************************************************
balaskoa's avatar
balaskoa committed
2
* Copyright (c) 2000-2020 Ericsson Telecom AB
Elemer Lelik's avatar
Elemer Lelik committed
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v2.0
Elemer Lelik's avatar
Elemer Lelik committed
5
* which accompanies this distribution, and is available at
6
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.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
13
*   Fekete, Tamas
Elemer Lelik's avatar
Elemer Lelik committed
14
15
16
17
18
19
******************************************************************************

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)
Elemer Lelik's avatar
Elemer Lelik committed
20
sudo apt-get install g++ expect libssl-dev libxml2-dev libncurses5-dev flex bison libedit2 libedit-devel
balaskoa's avatar
balaskoa committed
21
22
23
 (SLED 14.0: sudo zypper in libopenssl-devel,  g++, flex, bison already installed)
 (RHEL: g++, flex, bison already installed)

Elemer Lelik's avatar
Elemer Lelik committed
24
25
xutils-dev is needed by makedepend:
sudo apt-get install xutils-dev
balaskoa's avatar
balaskoa committed
26
27
(SLED 14.0: - )

28
29
Install optional packages required some tests:

Elemer Lelik's avatar
Elemer Lelik committed
30
The following packages may be needed for titan_eclipse/automatic_build:
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Ubuntu: sudo apt-get install ant xsltproc ant-junit
(SLED 12.4: sudo zypper install ant-junit ; libxslt-tools already installed)
(RHEL: sudo yum install ant ant-junit# xsltproc already installed)
(SUSE 15.1: -)

The regression test requires xmllint. The package containing it: libxml2-utils
ubuntu: sudo apt install libxml2-utils
suse: sudo zypper install libxml2-tools
rhel: sudo yum install libxml2-devel


Performance test requires pcap
ubuntu: sudo apt-get install libpcap0.8-dev
suse: sudo zypper install libpcap-devel libpcap1
Elemer Lelik's avatar
Elemer Lelik committed
45

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

48
49
50
51
52
53
54
55
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
56
57
58

3. Configure the build 

Elemer Lelik's avatar
Elemer Lelik committed
59
cd titan.core
Elemer Lelik's avatar
Elemer Lelik committed
60
61

For open source users: check that MakefileFOSS.cfg is present and has the following content:
Elemer Lelik's avatar
Elemer Lelik committed
62
63
64
65
66
67
cat MakefileFOSS.cfg

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

Elemer Lelik's avatar
Elemer Lelik committed
68
69
If you want to use your build within the Ericsson domain: delete MakefileFOSS.cfg
This will enable Ericsson internal-only licensing and statistics.
Elemer Lelik's avatar
Elemer Lelik committed
70

balaskoa's avatar
balaskoa committed
71
72
73
74
75
76
77
#This paragraph is obsolete 
#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:
#cd titan.core/userguide
#libreoffice -convert-to pdf *.doc *.docx

GEN_PDF set to yes will convert .adoc documents to pdf using asciidoctor-pdf
Elemer Lelik's avatar
Elemer Lelik committed
78
79

Several other build options are possible; for details on options please read through the Makefile.cfg.
Elemer Lelik's avatar
Elemer Lelik committed
80
81
82
83
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.

84
85
86
87
88
Note: For each scenario below on Raspberry Pi "-fsigned-char" needs to be added to compiler flags in Makefile.personal:

COMPILERFLAGS := -Wall -fsigned-char


Elemer Lelik's avatar
Elemer Lelik committed
89
a) JNI  disabled, gcc compiler (default)
Elemer Lelik's avatar
Elemer Lelik committed
90
91

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

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

Elemer Lelik's avatar
Elemer Lelik committed
97
TTCN3_DIR := /home/<user id>/titan.core/Install
Elemer Lelik's avatar
Elemer Lelik committed
98
99
100
101
102
103
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
104
105
106
107
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
108

Elemer Lelik's avatar
Elemer Lelik committed
109
110
111
112
113
114
115
116
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
117
118


Elemer Lelik's avatar
Elemer Lelik committed
119
c) JNI  enabled, gcc compiler (default)
Elemer Lelik's avatar
Elemer Lelik committed
120
121
122

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

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

Elemer Lelik's avatar
Elemer Lelik committed
126
TTCN3_DIR := /home/<user id>/titan.core/Install
Elemer Lelik's avatar
Elemer Lelik committed
127
OPENSSL_DIR := /usr
128
JDKDIR := /home/<user id>/jdk
Elemer Lelik's avatar
Elemer Lelik committed
129
130
131
XMLDIR := /usr
JNI := yes
GEN_PDF := no
132
COMPILERFLAGS += -Wall -Wlogical-op -I/home/<user id>/jdk/include -I/usr/include
Elemer Lelik's avatar
Elemer Lelik committed
133

Elemer Lelik's avatar
Elemer Lelik committed
134
135
136
137
138
139
d) For Alpine Linux, an appropriate flag has to be set:

:
ALPINE_LINUX := yes
:

Elemer Lelik's avatar
Elemer Lelik committed
140

Elemer Lelik's avatar
Elemer Lelik committed
141
4. Run make
Elemer Lelik's avatar
Elemer Lelik committed
142
143
144

make

Elemer Lelik's avatar
Elemer Lelik committed
145
5. Set environment variables
Elemer Lelik's avatar
Elemer Lelik committed
146

Elemer Lelik's avatar
Elemer Lelik committed
147
setenv TTCN3_DIR /home/<user id>/titan.core/Install
Elemer Lelik's avatar
Elemer Lelik committed
148
setenv PATH /home/<userid>/titan.core/Install/bin:${PATH}
Elemer Lelik's avatar
Elemer Lelik committed
149
setenv LD_LIBRARY_PATH /home/<userid>/titan.core/Install/lib:${LD_LIBRARY_PATH}
Elemer Lelik's avatar
Elemer Lelik committed
150

Elemer Lelik's avatar
Elemer Lelik committed
151
for csh
Elemer Lelik's avatar
Elemer Lelik committed
152

Elemer Lelik's avatar
Elemer Lelik committed
153
or 
Elemer Lelik's avatar
Elemer Lelik committed
154

Elemer Lelik's avatar
Elemer Lelik committed
155
export TTCN3_DIR=/home/<user id>/titan.core/Install
Elemer Lelik's avatar
Elemer Lelik committed
156
export PATH=/home/<userid>/titan.core/Install/bin:${PATH}
Elemer Lelik's avatar
Elemer Lelik committed
157
export LD_LIBRARY_PATH=/home/<userid>/titan.core/Install/lib:${LD_LIBRARY_PATH}
Elemer Lelik's avatar
Elemer Lelik committed
158

Elemer Lelik's avatar
Elemer Lelik committed
159
for bash
Elemer Lelik's avatar
Elemer Lelik committed
160

Elemer Lelik's avatar
Elemer Lelik committed
161
6. Run make install
Elemer Lelik's avatar
Elemer Lelik committed
162

Elemer Lelik's avatar
Elemer Lelik committed
163
make install
Elemer Lelik's avatar
Elemer Lelik committed
164

Elemer Lelik's avatar
Elemer Lelik committed
165
This will install Titan into  /home/<user id>/titan.core/Install
Elemer Lelik's avatar
Elemer Lelik committed
166
167


Elemer Lelik's avatar
Elemer Lelik committed
168
7. Optionally , run function/regression tests
Elemer Lelik's avatar
Elemer Lelik committed
169

Elemer Lelik's avatar
Elemer Lelik committed
170
cd /home/<user id>/titan.core/function_test
Elemer Lelik's avatar
Elemer Lelik committed
171
172
173

in the following Makefiles 

Elemer Lelik's avatar
Elemer Lelik committed
174
BER_EncDec/Makefile
Elemer Lelik's avatar
Elemer Lelik committed
175
176
177
178
179
180
181
182
183
184
185
186
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
187
cd /home/<user id>/titan.core/regression_test
Elemer Lelik's avatar
Elemer Lelik committed
188
189
190
191
192
193
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
194
8. Optionally, copy Titan into its final directory.
Lenard Nagy's avatar
Lenard Nagy committed
195
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
196
and then, optionally, the Eclipse installation guide.
Elemer Lelik's avatar
Elemer Lelik committed
197

Elemer Lelik's avatar
Elemer Lelik committed
198

Elemer Lelik's avatar
Elemer Lelik committed
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
9. Important Note:  In later Debian and derived (Ubuntu etc.)  distributions Titan is avalable directly from repositories 
and can be installed with:

apt-get install eclipse-titan

However, environment variables and your Makefile will still have to be configured manually:

export TTCN3_DIR=/usr
export PATH=$TTCN3_DIR/bin/:${PATH}
export LD_LIBRARY_PATH=$TTCN3_DIR/lib:${LD_LIBRARY_PATH}

Add to your Makefile the appropriate flags:

# Flags for the C++ preprocessor (and makedepend as well):
CPPFLAGS = ..... -I/usr/include/titan

and 

# Flags for the linker:
LDFLAGS = -L/usr/lib/titan 
Elemer Lelik's avatar
Elemer Lelik committed
219
220
221