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

John O'Sullivan John.OSullivan at BlackBox.com
Wed Jul 18 03:34:00 EDT 2018


Thanks Jonathan!

That was the issue
I was build this using CMake, so I added an explicit include directive for the source directory and can build now.


regards
John
________________________________________
From: Jonathan Rajotte-Julien <jonathan.rajotte-julien at efficios.com>
Sent: 17 July 2018 20:56
To: John O'Sullivan
Cc: lttng-dev at lists.lttng.org
Subject: [EXTERNAL] Re: [lttng-dev] Issues compiling User Space Tracing examples from documentation

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

________________________________

This email and any files transmitted with it are confidential and are intended for the sole use of the individual to whom they are addressed. Black Box Corporation reserves the right to scan all e-mail traffic for restricted content and to monitor all e-mail in general. If you are not the intended recipient or you have received this email in error, any use, dissemination or forwarding of this email is strictly prohibited. If you have received this email in error, please notify the sender by replying to this email.


More information about the lttng-dev mailing list