[lttng-dev] Issues compiling User Space Tracing examples from documentation

Jonathan Rajotte-Julien jonathan.rajotte-julien at efficios.com
Tue Jul 17 15:56:47 EDT 2018


Hi John,

On Tue, Jul 17, 2018 at 02:37:06PM +0000, John O'Sullivan wrote:
> Hi ,
> I am trying to use some user space tracing, following the example shown here:
> https://lttng.org/docs/v2.10/
> In the section Trace a user application, I am using the sample provided
> As soon as I compile
> 
> gccarm -c -I <path to my includes>  hello-tp.c

Could it be possible that you are missing the current dir include ?

The gcc command from the doc:

   gcc -c -I. hello-tp.c

I also have on my machine a particular way of building etc. but it works quite
fine with the good import:

joraj@~/lttng/master/test2[0]$ gcc -c -I. $CPPFLAGS hello-tp.c
+ gcc -c -I. -I/home/joraj/lttng/master//install/include hello-tp.c

But I get the same error you have if I remove the local dir include option ("-I .")

joraj@~/lttng/master/test2[0]$ gcc -c  $CPPFLAGS hello-tp.c
    + gcc -c -I/home/joraj/lttng/master//install/include hello-tp.c
    In file included from hello-tp.c:4:0:
    hello-tp.h:5:28: fatal error: ./hello-tp.h: No such file or directory
     #define TRACEPOINT_INCLUDE "./hello-tp.h"

Make sure to instruct gcc to look a the current directory for this particular
example.

Cheers

-- 
Jonathan Rajotte-Julien
EfficiOS


More information about the lttng-dev mailing list