2010-06-05 fchouinard@gmail.com Contributions for bugs 292965, 292963, 293102,...
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.help / html / gettingstarted / install_lttng.html
CommitLineData
f5b3101d
FC
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<HTML>
3<HEAD>
82a1d1f0 4 <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
f5b3101d 5 <TITLE></TITLE>
cb866e08 6 <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Linux)">
f5b3101d 7 <META NAME="CREATED" CONTENT="20091006;11250700">
cb866e08
FC
8 <META NAME="CHANGEDBY" CONTENT="Francois Godin">
9 <META NAME="CHANGED" CONTENT="20100603;15264500">
f5b3101d
FC
10 <STYLE TYPE="text/css">
11 <!--
12 @page { margin: 2cm }
f5b3101d
FC
13 H1 { margin-bottom: 0.21cm }
14 H1.western { font-family: "Nimbus Sans L", sans-serif; font-size: 16pt }
15 H1.cjk { font-family: "Bitstream Vera Sans"; font-size: 16pt }
16 H1.ctl { font-family: "Bitstream Vera Sans"; font-size: 16pt }
17 H3 { margin-bottom: 0.21cm }
18 H3.western { font-family: "Nimbus Roman No9 L", serif }
19 A:link { so-language: zxx }
20 -->
21 </STYLE>
f5b3101d
FC
22</HEAD>
23<BODY LANG="en-CA" DIR="LTR">
82a1d1f0 24<P STYLE="margin-bottom: 0cm"><BR>
f5b3101d
FC
25</P>
26<H1 CLASS="western">Installing LTTv library for Eclipse LTTng plugin</H1>
82a1d1f0 27<P STYLE="margin-bottom: 0.21cm"><BR><BR>
f5b3101d 28</P>
82a1d1f0 29<P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">This
cb866e08
FC
30document describes how to install and configure the LTTv C-code
31library in order to load and parse LTTng traces with the Eclipse LTTng plugin. </FONT>
f5b3101d 32</P>
82a1d1f0 33<P STYLE="margin-bottom: 0cm"><BR>
f5b3101d 34</P>
cb866e08
FC
35<H3 CLASS="western">For the impatient</H3>
36<P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">For each trace format version (v2.3, v2.5 and/or v2.6) you want to process :</P>
f5b3101d 37<UL>
82a1d1f0 38 <LI><P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">Download
cb866e08 39 LTTv application, from
82a1d1f0
WB
40 <A HREF="http://git.dorsal.polymtl.ca/?p=liblttngtrace.git;a=summary">http://git.dorsal.polymtl.ca/?p=liblttngtrace.git;a=summary</A></FONT></P>
41 <LI><P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">Compile
42 it with the JNI support activated :</FONT></P>
f5b3101d
FC
43 <P STYLE="margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>./configure
44 --with-jni-interface &amp;&amp; make &amp;&amp; make install</I></FONT></FONT></P>
82a1d1f0
WB
45 <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Nimbus Roman No9 L, serif">Start
46 Eclipse application making sure the library is in LD_LIBRARY_PATH.</FONT></P>
f5b3101d 47</UL>
cb866e08
FC
48<P STYLE="margin-bottom: 0cm"><BR></P>
49<P STYLE="text-indent: 1.27cm; margin-bottom: 0cm"><FONT FACE="Nimbus Roman No9 L, serif">
50Note: Unless you plan to process legacy traces, version 2.5 and 2.6 should be sufficient for most needs.</FONT>
51</P>
52<P STYLE="text-indent: 1.27cm; margin-bottom: 0cm"><FONT FACE="Nimbus Roman No9 L, serif">
53It didn't work? Please read “Installation steps” section. </FONT>
f5b3101d 54</P>
cb866e08 55<P STYLE="text-indent: 1.27cm; margin-bottom: 0cm"><BR>
f5b3101d 56</P>
cb866e08
FC
57<P STYLE="margin-bottom: 0cm"><FONT FACE="Nimbus Roman No9 L, serif">
58Make sure you install the latest version last (currently v2.6).</FONT></P>
82a1d1f0 59<P STYLE="margin-bottom: 0cm"><BR>
f5b3101d 60</P>
82a1d1f0 61<H3 CLASS="western">Why a C library ?
f5b3101d 62</H3>
cb866e08
FC
63<P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">
64LTTng and LTTv are mostly coded in C (with some parts in even more evil stuff) so
65their functionalities are not directly available in Java. Also, for
66the sake of performance, it was decided to re-use the
67native, multi-platform C library for the low-level functions rather
68than re-implement them in Java. Also, the C library
82a1d1f0
WB
69is under constant development and it would have been a bad idea to
70branch this one just yet.</FONT></P>
cb866e08
FC
71<P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">
72So right now, the normal path for an event through LTTng would be the
82a1d1f0
WB
73following :</FONT></P>
74<P STYLE="margin-left: 0.5cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><I>Linux
75Kernel -&gt; Trace Directory</I></FONT></P>
76<P STYLE="margin-left: 0.5cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><I>(Trace
77Directory read by) LTTv C Library -&gt; JNI (C side) -&gt; JNI (Java
78Side) -&gt; Eclipse LTTng Plugin</I></FONT></P>
79<P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">(Note
cb866e08 80that the kernel is only used to record at trace). </FONT>
82a1d1f0
WB
81</P>
82<P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">For
83all these reasons, the LTTv C library and a JNI (Java Native
84Interface) is needed for java to process LTTng trace. The JNI itself,
cb866e08 85however, is already included in LTTv and it should be easy to build
82a1d1f0
WB
86and to install (using this very installation guide). </FONT>
87</P>
88<P STYLE="margin-bottom: 0cm"><BR>
89</P>
90<H3 CLASS="western">Installation steps
f5b3101d 91</H3>
82a1d1f0
WB
92<P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">First
93on all, we need to download and compile the source of the LTTv
cb866e08 94application, with the JNI support enabled. To do so, follow the 4 steps described in this section.</FONT>
f5b3101d 95</P>
82a1d1f0
WB
96<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><I><B>Note</B>
97: LTTv is responsible of handling the trace format for Eclipse.
98However, as the trace format changed overtime, you might need to
99compile several versions of LTTv if you plan to support multiple
100trace formats. Each “branch” of LTTv should tell you by its name
101which version of the LTTng trace it supports. If you did not generate
102a trace already, you might want to stick with the latest LTTv
cb866e08
FC
103version, otherwise, it is recommended to compile all available versions
104(currently v2.3, v2.5 and v2.6). </I></FONT>
82a1d1f0 105</P>
cb866e08
FC
106<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm; font-style: normal">
107<FONT FACE="Nimbus Roman No9 L, serif"><FONT COLOR="#ff950e"><SPAN STYLE="text-decoration: none"><B><SPAN STYLE="background: transparent">NOTE</SPAN></B></SPAN></FONT><SPAN STYLE="text-decoration: none"><B>:</B></SPAN>
108If you don't know which trace format you need, you may want to get all
109of them to support multiple versions of traces (2.5 and 2.6 are
110more or less mandatory). Just perform the following instructions for each
111trace format.</FONT></P>
112<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm; font-style: normal">
113<FONT FACE="Nimbus Roman No9 L, serif">In all case, make sure you
114install the latest version <i><u>last</u></i> (currently v2.6).</FONT></P>
115<P STYLE="margin-bottom: 0.21cm"><BR><BR>
116</P>
117<OL>
118 <LI><P STYLE="margin-bottom: 0.21cm; text-decoration: none"><FONT FACE="Nimbus Roman No9 L, serif"><I><B>Downloading
119 LTTv</B></I></FONT></P>
120</OL>
121<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">There
122are actually three variants of the LTTv library available for download.</FONT></P>
123<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm; font-style: normal">
124<BR><BR>
82a1d1f0
WB
125</P>
126<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">-
127<B>Beta JNI build (git) </B><FONT COLOR="#ff950e"><B>(PLEASE USE
128THIS)</B></FONT></FONT></P>
129<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">This
130is the very beta tree of LTTv that include the newest JNI changes. It
131is under constant development, so there might be some bugs left, but
132it contains the newer JNI interface, which is probably what you need.</FONT></P>
133<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">This
cb866e08 134is definitely what you should use. You can get it from :</FONT></P>
82a1d1f0 135<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><A HREF="http://git.dorsal.polymtl.ca/?p=liblttngtrace.git;a=summary"><FONT FACE="Nimbus Roman No9 L, serif"><I>http://git.dorsal.polymtl.ca/?p=liblttngtrace.git;a=summary</I></FONT></A></P>
cb866e08
FC
136<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><SPAN STYLE="font-style: normal">
137Then, in the “</SPAN><I><B>heads</B></I>”<SPAN STYLE="font-style: normal"> section
138(below the “</SPAN><I><B>shortlog</B></I>”<SPAN STYLE="font-style: normal">section),
139click on the trace format that suits your need</SPAN> <SPAN STYLE="font-style: normal">.
140In the new download page, click the “</SPAN><I>snapshot</I>”<SPAN STYLE="font-style: normal"> link
141of the top entry (with a marker of the form 'traceformat-n.n') to download the corresponding archive.</SPAN></FONT></P>
82a1d1f0
WB
142<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><BR><BR>
143</P>
144<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">-
145<B>Development build (git) </B></FONT>
146</P>
cb866e08
FC
147<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">
148This is the release candidate of the LTTv application. It contains
82a1d1f0
WB
149features that are under development or too experimental to make it to
150the main tree. It also includes the JNI interface that you need to
cb866e08 151use Eclipse; however, this branch could be a little late on the
82a1d1f0
WB
152beta, so use at your own risk. </FONT>
153</P>
154<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">If
cb866e08
FC
155you want to try, get it from :<BR></FONT></P>
156<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><A HREF="http://lttng.org/cgi-bin/gitweb.cgi?p=lttv.git;a=summary"><FONT FACE="Nimbus Roman No9 L, serif"><I>http://lttng.org/cgi-bin/gitweb.cgi?p=lttv.git;a=summary</I></FONT></A></P>
157<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><SPAN STYLE="font-style: normal">
158Then, in the “</SPAN><I><B>heads</B></I>”<SPAN STYLE="font-style: normal"> section
159(below the “</SPAN><I><B>shortlog</B></I>”<SPAN STYLE="font-style: normal"> and “</SPAN><I><B>tags</B></I>”<SPAN STYLE="font-style: normal">section),
160click on the trace format that suits your need</SPAN> <SPAN STYLE="font-style: normal">.
161In the new download page, click the “</SPAN><I>snapshot</I>”<SPAN STYLE="font-style: normal"> link
162of the top entry (with a marker of the form 'traceformat-n.n') to download the corresponding archive.</SPAN></FONT></P>
163
164
165
166
167
82a1d1f0
WB
168<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><SPAN STYLE="font-style: normal">Then,
169in the “</SPAN><I>head</I>” <SPAN STYLE="font-style: normal">section,
170click on the traceformat that suite your need</SPAN> <SPAN STYLE="font-style: normal">and
171then choose “</SPAN><I>snapshot</I>” <SPAN STYLE="font-style: normal">to
172download its archive.</SPAN></FONT></P>
82a1d1f0
WB
173<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><BR><BR>
174</P>
175<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">-
176<B>Stable release</B></FONT></P>
177<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">This
178is the main LTTv tree. Actually missing the JNI fonctionnality but
179this might be added soon. Until this is done, you should stick with
180development version. </FONT>
181</P>
182<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">If
183you want to try it anyways, you can get it from
184</FONT><A HREF="http://www.lttng.org/?q=node/3"><FONT FACE="Nimbus Roman No9 L, serif"><I>http://www.lttng.org/?q=node/3</I></FONT></A></P>
185<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">Then,
186select “<I>Download the latest lttv-[version].tar.gz</I>” in the
187menu and pick the most recent (usually on top) release.</FONT></P>
188<P STYLE="margin-left: 1.22cm; margin-bottom: 0.21cm"><BR><BR>
189</P>
190<P STYLE="margin-bottom: 0.21cm"><BR><BR>
f5b3101d
FC
191</P>
192<OL START=2>
82a1d1f0
WB
193 <LI><P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><I><B>Decompressing
194 the archive(s)</B></I></FONT></P>
f5b3101d 195</OL>
82a1d1f0
WB
196<P STYLE="margin-left: 1.27cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">You
197now need to archive files where you want them and to uncompress them.
cb866e08 198You need to do this for each LTTv version you downloaded.</FONT></P>
82a1d1f0
WB
199<P STYLE="margin-left: 1.27cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">The
200way to do it in command line would be something like : </FONT>
f5b3101d
FC
201</P>
202<P STYLE="margin-left: 1.27cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>mv
203archive_name.tar.gz /where/you/want</I></FONT></FONT></P>
204<P STYLE="margin-left: 1.27cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>tar
82a1d1f0
WB
205-xvzf archive_name.tar.gz</I></FONT></FONT></P>
206<P STYLE="margin-left: 1.27cm; margin-bottom: 0.21cm"><BR><BR>
f5b3101d 207</P>
82a1d1f0
WB
208<P STYLE="margin-left: 1.27cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">As
209example, this is what I would do for myself :</FONT></P>
f5b3101d 210<P STYLE="margin-left: 1.27cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>mv
82a1d1f0
WB
211liblttngtrace-bcaf565bbfb26d0ac7e4647528230feb61443a01.tar.gz
212/home/william</I></FONT></FONT></P>
f5b3101d 213<P STYLE="margin-left: 1.27cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>tar
82a1d1f0
WB
214-xvzf liblttngtrace-bcaf565bbfb26d0ac7e4647528230feb61443a01.tar.gz</I></FONT></FONT></P>
215<P STYLE="margin-bottom: 0.21cm"><BR><BR>
f5b3101d
FC
216</P>
217<OL START=3>
82a1d1f0 218 <LI><P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><I><B>Configuration</B></I></FONT></P>
f5b3101d 219</OL>
82a1d1f0
WB
220<P STYLE="margin-left: 1.27cm; margin-bottom: 0.21cm; font-style: normal">
221<FONT FACE="Nimbus Roman No9 L, serif"><B>At First</B></FONT></P>
222<P STYLE="margin-left: 1.27cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">Enter
223one of the uncompressed directory, you should use a command like : </FONT>
f5b3101d 224</P>
82a1d1f0
WB
225<P STYLE="margin-left: 1.27cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>cd
226liblttngtrace</I></FONT></FONT></P>
227<P STYLE="margin-left: 1.24cm; margin-bottom: 0cm"><FONT FACE="Nimbus Roman No9 L, serif">(Of
228course “<I>liblttngtrace</I>” need to be the name of the
229uncompressed directory).</FONT></P>
230<P STYLE="margin-left: 1.24cm; margin-bottom: 0cm"><BR>
f5b3101d 231</P>
82a1d1f0 232<P STYLE="margin-left: 1.24cm; margin-bottom: 0cm"><BR>
f5b3101d 233</P>
82a1d1f0
WB
234<P STYLE="margin-left: 1.24cm; margin-bottom: 0cm"><FONT FACE="Nimbus Roman No9 L, serif">If
235you are using any “Development build” (first or second choice of
236the download section), before doing anything, you need to do the
237following : </FONT>
238</P>
239<P STYLE="margin-left: 1.24cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>./autogen.sh</I></FONT></FONT></P>
240<P STYLE="margin-left: 1.24cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">You
241can safetly ignore any errors you get there, we will take care of
242them next. </FONT>
243</P>
244<P STYLE="margin-bottom: 0.21cm"><BR><BR>
245</P>
246<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm; font-style: normal">
247<FONT FACE="Nimbus Roman No9 L, serif"><B>Dependencies</B></FONT></P>
248<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">To
249build LTTv, the folowing dependencies need to be met. A (very)
250incomplete list is the following. Most distribution should have most
251of this stuff, except maybe gtk-dev, glib-dev and libopt that are
252probably missing on most systems.</FONT></P>
253<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">Install
254the missing dependencies using your distribution package manager and
255then jump to the “<I>configure script</I>” step.</FONT></P>
256<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><B>libtool
257(and its dependencies like autotools, autoconf, automake and such...)</B></FONT></FONT></P>
258<P STYLE="margin-left: 2.01cm; margin-bottom: 0.21cm; font-weight: normal">
259<FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><I>(Debian/Ubuntu
260: libtool)</I></FONT></FONT></P>
261<P STYLE="margin-left: 2.01cm; margin-bottom: 0.21cm; font-weight: normal">
262<FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><I>(Fedora/Redhat
263: libtool-2)</I></FONT></FONT></P>
264<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><B>gcc
2653.2 (or better)</B></FONT></FONT></P>
266<P STYLE="margin-left: 1.98cm; margin-bottom: 0.21cm; font-weight: normal">
267<FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><I>(Debian/Ubuntu
268: gcc-3.2)</I></FONT></FONT></P>
269<P STYLE="margin-left: 1.98cm; margin-bottom: 0.21cm; font-weight: normal">
270<FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><I>(Fedora/Redhat
271: gcc-3.2)</I></FONT></FONT></P>
272<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><B>gtk
2732.4 development libraries (or better)</B></FONT></FONT></P>
274<P STYLE="margin-left: 2.04cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><I>(Debian/Ubuntu
275: libgtk2.0, libgtk2.0-dev)</I></FONT></FONT></P>
276<P STYLE="margin-left: 2.04cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><I>(Fedora/Redhat
277: gtk2, gtk2-devel)</I></FONT></FONT></P>
278<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><B>glib
2792.4 development libraries (or better)</B></FONT></FONT></P>
280<P STYLE="margin-left: 2.09cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><I>(Debian/Ubuntu
281: libglib2.0-0, libglib2.0-dev)</I></FONT></FONT></P>
282<P STYLE="margin-left: 2.09cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><I>(Fedora/Redhat
283: glib2, glib2-devel)</I></FONT></FONT></P>
284<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><B>libpopt
285development libraries</B></FONT></FONT></P>
286<P STYLE="margin-left: 2.17cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><I>(Debian/Ubuntu
287: libpopt0, libpopt-dev)</I></FONT></FONT></P>
288<P STYLE="margin-left: 2.17cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><I>(Fedora/Redhat
289: popt)</I></FONT></FONT></P>
290<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><B>libpango
291development libraries</B></FONT></FONT></P>
292<P STYLE="margin-left: 2.12cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><I>(Debian
293: libpango1.0, libpango1.0-dev)</I></FONT></FONT></P>
294<P STYLE="margin-left: 2.12cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><I>(Fedora
295: pango, pango-devel)</I></FONT></FONT></P>
296<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><B>libc6
297development librairies </B></FONT></FONT>
298</P>
299<P STYLE="margin-left: 2.09cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><I>(Debian
300: libc6, libc6-dev)</I></FONT></FONT></P>
301<P STYLE="margin-left: 2.09cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT SIZE=2><I>(Fedora
302: glibc, glibc)<BR></I></FONT></FONT><BR><BR>
303</P>
304<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><B>Configure
305step</B></FONT></P>
306<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">LTTv
307have several compile options that you can turn on/off. To see a full
308list, type the following : </FONT>
f5b3101d 309</P>
f5b3101d 310<P STYLE="margin-left: 1.3cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>./configure
82a1d1f0 311–help<BR></I></FONT></FONT><BR><BR>
f5b3101d 312</P>
82a1d1f0
WB
313<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">The
314following option is <U><B>essential</B></U> for Eclipse to work :</FONT></P>
f5b3101d 315<P STYLE="margin-left: 1.3cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>--with-jni-interface
82a1d1f0 316Build JNI interface between C and java. Need java include files.
f5b3101d
FC
317[default=no]<BR></I></FONT></FONT><BR><BR>
318</P>
82a1d1f0
WB
319<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">The
320following options may be useful for you as well : </FONT>
f5b3101d
FC
321</P>
322<P STYLE="margin-left: 1.3cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>1)
82a1d1f0
WB
323--prefix=PREFIX install architecture-independent files in PREFIX
324[/usr/local] </I></FONT></FONT>
f5b3101d 325</P>
f5b3101d 326<P STYLE="margin-left: 1.3cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>2)
82a1d1f0
WB
327--with-lttv Build whole LTTV system, as opposed to only the trace
328reading library [default=yes]</I></FONT></FONT></P>
f5b3101d 329<P STYLE="margin-left: 1.3cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>3)
82a1d1f0
WB
330--with-java-jdk=DIR Use java jdk from DIR. Ex : $JAVA_HOME.</I></FONT></FONT></P>
331<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><BR><BR>
332</P>
333<P STYLE="margin-left: 1.27cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">1)
334Change PREFIX to something in your home if you don't have root access
335on your system.</FONT></P>
336<P STYLE="margin-left: 1.85cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">Use
337a flag like : --prefix=/home/your_name/a_directory</FONT></P>
338<P STYLE="margin-left: 1.27cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">2)
339Unless you need LTTv Gtk gui, you better turn off turn off LTTv UI
340compilation. </FONT>
341</P>
342<P STYLE="margin-left: 1.85cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">Use
343the flag : --without-lttv</FONT></P>
344<P STYLE="margin-left: 1.27cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">3)
345On some (most?) system, configure will need you to indicate where it
346can find the java JDK to compile the JNI. </FONT>
347</P>
348<P STYLE="margin-left: 1.85cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">Use
349a flag like : --with-java-jdk=/where/java-jdk/is</FONT></P>
350<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><BR><BR>
351</P>
352<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">As
353example, here is what I would use :</FONT></P>
f5b3101d
FC
354<P STYLE="margin-left: 1.3cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>./configure
355--prefix=/home/william/apps --without-lttv
356--with-java-jdk=/usr/local/jdk1.6.0_13 --with-jni-interface </I></FONT></FONT>
357</P>
82a1d1f0 358<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><BR><BR>
f5b3101d 359</P>
82a1d1f0
WB
360<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">Fix
361any missing dependencies errors and move to the next step.</FONT></P>
362<P STYLE="margin-bottom: 0.21cm"><BR><BR>
f5b3101d
FC
363</P>
364<OL START=4>
82a1d1f0
WB
365 <LI><P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><I><B>Build
366 and install</B></I></FONT></P>
f5b3101d 367</OL>
82a1d1f0
WB
368<P STYLE="margin-left: 1.32cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">Now
369that program is correctly configured, we can try to build it. Type
370the following command (this can take a while) :</FONT></P>
f5b3101d 371<P STYLE="margin-left: 1.32cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>make</I></FONT></FONT></P>
82a1d1f0 372<P STYLE="margin-left: 1.32cm; margin-bottom: 0.21cm"><BR><BR>
f5b3101d 373</P>
82a1d1f0
WB
374<P STYLE="margin-left: 1.32cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">When
375it is over, make sure there were no error during the compilation and
376issue the following command : </FONT>
f5b3101d
FC
377</P>
378<P STYLE="margin-left: 1.32cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>sudo
379make install</I></FONT></FONT></P>
82a1d1f0
WB
380<P STYLE="margin-left: 1.32cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">OR
381if you don't have root acess AND changed the --prefix=PREFIX flag
382during the configuration :</FONT></P>
f5b3101d
FC
383<P STYLE="margin-left: 1.32cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>make
384install </I></FONT></FONT>
385</P>
82a1d1f0
WB
386<P STYLE="margin-left: 1.32cm; margin-bottom: 0.21cm"><BR><BR>
387</P>
388<P STYLE="margin-left: 1.32cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">LTTv
389should now be installed on your system. </FONT>
f5b3101d 390</P>
82a1d1f0
WB
391<P STYLE="margin-left: 1.32cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">Get
392back to the step <I>3) “Configuration” </I>and do the same
393operations for all the LTTv version that were downloaded to install
394them on your system. </FONT>
f5b3101d 395</P>
82a1d1f0 396<P STYLE="margin-bottom: 0.21cm"><BR><BR>
f5b3101d
FC
397</P>
398<OL START=5>
82a1d1f0
WB
399 <LI><P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><I><B>Set
400 library path</B></I></FONT></P>
f5b3101d 401</OL>
82a1d1f0 402<P STYLE="margin-left: 1.3cm; margin-bottom: 0cm"><FONT FACE="Nimbus Roman No9 L, serif">Now
f5b3101d
FC
403that LTTv is installed, we need to make sure Eclipse can find its
404library easily. The best way to do so is to ajust the
82a1d1f0 405LD_LIBRARY_PATH. </FONT>
f5b3101d 406</P>
82a1d1f0 407<P STYLE="margin-left: 1.3cm; margin-bottom: 0cm"><BR>
f5b3101d 408</P>
82a1d1f0 409<P STYLE="margin-left: 1.3cm; margin-bottom: 0cm"><FONT FACE="Nimbus Roman No9 L, serif">The
f5b3101d 410following should work on most system if your shell is BASH or KSH <U>(in
82a1d1f0 411case of doubt try this one)</U> :</FONT></P>
f5b3101d 412<P STYLE="margin-left: 1.3cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>export
82a1d1f0
WB
413LD_LIBRARY_PATH=”/usr/local/lib:$LD_LIBRARY_PATH”</I></FONT></FONT></P>
414<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">OR
415if you changed the --prefix=PREFIX flag during the configuration :</FONT></P>
f5b3101d 416<P STYLE="margin-left: 1.3cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>export
82a1d1f0
WB
417LD_LIBRARY_PATH=”/where_you_set_prefix/lib:$LD_LIBRARY_PATH”</I></FONT></FONT></P>
418<P STYLE="margin-left: 1.3cm; margin-bottom: 0cm"><BR>
f5b3101d 419</P>
82a1d1f0 420<P STYLE="margin-left: 1.3cm; margin-bottom: 0cm"><BR>
f5b3101d 421</P>
82a1d1f0
WB
422<P STYLE="margin-left: 1.3cm; margin-bottom: 0cm"><FONT FACE="Nimbus Roman No9 L, serif">If
423you are using a CSH or TCSH shell, this might be what you need : </FONT>
f5b3101d
FC
424</P>
425<P STYLE="margin-left: 1.3cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>setenv
82a1d1f0
WB
426LD_LIBRARY_PATH /usr/local/lib\:$LD_LIBRARY_PATH</I></FONT></FONT></P>
427<P STYLE="margin-left: 1.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">OR
428if you changed the --prefix=PREFIX flag during the configuration :</FONT></P>
f5b3101d 429<P STYLE="margin-left: 1.3cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>setenv
82a1d1f0
WB
430LD_LIBRARY_PATH /where_you_set_prefix/lib\:$LD_LIBRARY_PATH</I></FONT></FONT></P>
431<P STYLE="margin-left: 1.3cm; margin-bottom: 0cm"><BR>
f5b3101d 432</P>
82a1d1f0 433<P STYLE="margin-left: 1.3cm; margin-bottom: 0cm"><FONT FACE="Nimbus Roman No9 L, serif">If
f5b3101d 434you have root access on the system, if can be a good idea to run
82a1d1f0 435ldconfig as well :</FONT></P>
f5b3101d
FC
436<P STYLE="margin-left: 1.3cm; margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>sudo
437ldconfig</I></FONT></FONT></P>
82a1d1f0 438<P STYLE="margin-left: 1.3cm; margin-bottom: 0cm"><BR>
f5b3101d 439</P>
82a1d1f0 440<P STYLE="margin-left: 1.3cm; margin-bottom: 0cm"><FONT FACE="Nimbus Roman No9 L, serif"><I><U>Note
f5b3101d 441these settings will disapears on logout</U>, you mght consider adding
82a1d1f0 442this to your autostart or setting it system wide! </I></FONT>
f5b3101d 443</P>
82a1d1f0 444<P STYLE="margin-left: 1.3cm; margin-bottom: 0cm"><BR>
f5b3101d 445</P>
82a1d1f0
WB
446<P STYLE="margin-left: 1.3cm; margin-bottom: 0cm"><FONT FACE="Nimbus Roman No9 L, serif">You
447should be ready to start Eclipse now.</FONT></P>
448<P STYLE="margin-bottom: 0cm"><BR>
f5b3101d
FC
449</P>
450<H3 CLASS="western">FAQ</H3>
cb866e08 451<OL>
82a1d1f0
WB
452 <LI><P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><I>When
453 trying to start LTTng in Eclipse, I end up with the following
454 exception :<BR></I><FONT COLOR="#000080"><FONT FACE="Monospace"><FONT SIZE=2><I><U>org.eclipse.linuxtools.lttng.trace.LTTngTraceException</U></I></FONT></FONT></FONT><FONT COLOR="#ff0000"><FONT FACE="Monospace"><FONT SIZE=2><I>:
455 Failed to initialize library! Is the trace version supported?</I></FONT></FONT></FONT></FONT></P>
cb866e08
FC
456 <P ALIGN=LEFT><FONT COLOR="#ff0000"><FONT FACE="Monospace"><FONT SIZE=2>Make
457 sure you have the correct LTTv library compiled. (openTrace)</FONT></FONT></FONT></P>
82a1d1f0
WB
458 <P STYLE="margin-top: 0.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><FONT COLOR="#000000"><FONT SIZE=3><SPAN STYLE="font-style: normal">This
459 mean you do not have the correct LTTv library available on your
460 system. Go back to the section </SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=3><I>&quot;1)
cb866e08
FC
461 – Download”</I></FONT></FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#000000"><FONT SIZE=3><SPAN STYLE="font-style: normal">and
462 make sure you downloaded (and installed) the correct version of LTTv
463 to support the format of trace you want to read. As example, if your
464 trace is of LTTng format 2.3, you will need to download and install
465 the archive marked as “traceformat-2.3”.</SPAN></FONT></FONT></FONT></P>
82a1d1f0
WB
466</OL>
467<P STYLE="margin-bottom: 0.21cm"><BR><BR>
468</P>
cb866e08 469<OL START=2>
82a1d1f0
WB
470 <LI><P STYLE="margin-top: 0.3cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><I>When
471 trying to import a trace, I get an error message and I have one of
472 the following exception in the Eclipse Console :
473 <BR></I><FONT COLOR="#000080"><FONT FACE="Monospace"><FONT SIZE=2><I><U>org.eclipse.linuxtools.lttng.trace.LTTngTraceException</U></I></FONT></FONT></FONT><FONT COLOR="#ff0000"><FONT FACE="Monospace"><FONT SIZE=2><I>:
474 ERROR : Unrecognized/unsupported trace version.</I></FONT></FONT></FONT></FONT></P>
475 <P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">OR</FONT></P>
476 <P STYLE="margin-bottom: 0.21cm"><FONT FACE="Monospace"><FONT SIZE=2><I><FONT COLOR="#000080"><U>org.eclipse.linuxtools.lttng.trace.LTTngTraceException</U></FONT><FONT COLOR="#ff0000">:
477 ERROR : Call to JniTraceVersion() failed.</FONT></I></FONT></FONT></P>
478 <P STYLE="margin-top: 0.2cm; margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">In
479 that case, either your LTTv version is very old and does not
480 recognize your trace version or you are using a very new trace
481 version that is not yet supported. You probably want to check if
482 there is a newer version of LTTv that you could use. Please refer to
483 the section <I>&quot;1) – Download” for the correct links.</I></FONT></P>
484</OL>
485<P STYLE="margin-bottom: 0.21cm"><BR><BR>
486</P>
487<OL START=3>
488 <LI><P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif"><I>When
489 trying to start LTTng in Eclipse, I end up with the following
490 exception :<BR></I><FONT COLOR="#ff0000"><FONT FACE="Monospace"><FONT SIZE=2><I>Exception
491 in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: no
492 lttvtraceread in java.library.path</I></FONT></FONT></FONT></FONT></P>
493 <P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">This
494 basically mean that Java can not find the C library you just
495 compile. To find any C library, java would normally need to be
496 passed a flag like “-Djava.library.path=/somewhere/lib” but
497 there seems to be a bug in Eclipse about it, as defined here :
498 <A HREF="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290068">https://bugs.eclipse.org/bugs/show_bug.cgi?id=290068</A></FONT></P>
499 <P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">Therefore,
500 the workaround is to make sure to pass a correct LD_LIBRARY_PATH to
501 Eclipse (see section above about “<I>Set library path</I>”). The
502 best way to make sure the flag is corerctly passed is to add it in
503 front of the command that is called to start Eclipse, on the command
504 line or in the desktop shortcut itself. </FONT>
f5b3101d 505 </P>
82a1d1f0
WB
506 <P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">As
507 example, here is the shortcut I use to call Eclipse :</FONT></P>
f5b3101d
FC
508 <P STYLE="margin-bottom: 0.3cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>export
509 LD_LIBRARY_PATH=&quot;/usr/local/lib&quot;;
510 /usr/local/eclipse/eclipse</I></FONT></FONT></P>
f5b3101d
FC
511</OL>
512<P STYLE="margin-bottom: 0.3cm"><BR><BR>
513</P>
82a1d1f0
WB
514<OL START=4>
515 <LI><P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">I
516 did what you said in 1) but I'm still getting the same error
517 <I>:<BR></I><FONT COLOR="#ff0000"><FONT FACE="Monospace"><FONT SIZE=2><I>Exception
f5b3101d 518 in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: no
82a1d1f0
WB
519 lttvtraceread in java.library.path</I></FONT></FONT></FONT></FONT></P>
520 <P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">If
521 your LD_LIBRARY_PATH is correct, then the only reason why you might
522 get this error is that you did not compile the JNI interface inside
523 LTTv. <BR>Go back to “<I>Installation steps</I>” and make sure
524 you used the development version of LTTv and that you compiled it
525 with the --<I>with-jni-interface</I> <SPAN STYLE="font-style: normal">flag</SPAN>.</FONT></P>
f5b3101d 526</OL>
82a1d1f0 527<P STYLE="margin-bottom: 0.21cm"><BR><BR>
f5b3101d 528</P>
82a1d1f0
WB
529<OL START=5>
530 <LI><P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">When
531 I run LTTng in Eclipse, at some point, I am getting an error like
532 this :</FONT></P>
533 <P STYLE="margin-bottom: 0cm"><FONT COLOR="#ff0000"><FONT FACE="Monospace"><FONT SIZE=2><I>Exception
f5b3101d
FC
534 in thread &quot;main&quot; java.lang.Error: Unresolved compilation
535 problem: </I></FONT></FONT></FONT>
f5b3101d
FC
536 </P>
537</OL>
82a1d1f0
WB
538<P ALIGN=LEFT STYLE="margin-left: 1.3cm; margin-bottom: 0cm"><FONT COLOR="#ff0000"><FONT FACE="Monospace"><FONT SIZE=2><I>The
539method ltt_someFunction() is undefined for the type JniXYZ</I></FONT></FONT></FONT></P>
540<OL START=6>
541 <P STYLE="margin-bottom: 0.21cm"><FONT FACE="Nimbus Roman No9 L, serif">This
542 may happen if the LTTv version you are using is not recent enought.
543 Make sure you are using the latest development version, recompile
544 the latest one if needed. If this doesn't work, make sure you use
545 the “Beta” JNI Build, as described in “<I>Download</I>”
546 section. If nothing work, please submit a bug report. </FONT>
f5b3101d 547 </P>
f5b3101d 548</OL>
82a1d1f0 549<P STYLE="margin-bottom: 0.21cm"><BR><BR>
f5b3101d
FC
550</P>
551</BODY>
cb866e08 552</HTML>
This page took 0.052123 seconds and 5 git commands to generate.