[lttng-dev] Errors compiling converted tp file

Jérémie Galarneau jeremie.galarneau at efficios.com
Tue Dec 9 13:42:37 EST 2014


On Tue, Dec 9, 2014 at 8:48 AM, Yan Grange <ygrange at gmail.com> wrote:
> Hi,
>
> I try to reproduce the examle of tracing an application in user space as present in the documentation. The conversion of the .tp file, which is a copy paste of the example in the docs provides me with many errors…
>
> I am using gcc 4.6.3 on Ubuntu 12.04 (LTS). I have the following lttng-packages installed:
> liblttng-ctl-dev
> liblttng-ctl0
> liblttng-ust-dev
> liblttng-ust0
> lttng-modules-dkms
> lttng-tools
>

Hi,

Which version of lttng are you using?

Jérémie

> Am I doing something wrong or is there some issue with my environment?
>
>
> The following errors occur:
>
> ~/lttng$ lttng-gen-tp hello-tp.tp
>
> In file included from hello-tp.c:7:0:
> hello-tp.h:13:20: error: missing ')' after "defined"
> hello-tp.h:13:21: error: missing binary operator before token "TP_H"
> In file included from /usr/include/lttng/tracepoint-event.h:39:0,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> ././hello-tp.h:13:20: error: missing ')' after "defined"
> ././hello-tp.h:13:21: error: missing binary operator before token "TP_H"
> In file included from /usr/include/lttng/tracepoint-event.h:41:0,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> /usr/include/lttng/ust-tracepoint-event.h:103:6: error: ‘_TP_COMBINE_TOKENS’ declared as function returning a function
> /usr/include/lttng/ust-tracepoint-event.h:116:6: error: ‘_TP_COMBINE_TOKENS’ declared as function returning a function
> /usr/include/lttng/ust-tracepoint-event.h:116:6: error: redefinition of ‘_TP_COMBINE_TOKENS’
> /usr/include/lttng/ust-tracepoint-event.h:103:6: note: previous definition of ‘_TP_COMBINE_TOKENS’ was here
> In file included from /usr/include/lttng/ust-tracepoint-event.h:118:0,
>                  from /usr/include/lttng/tracepoint-event.h:41,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> ././hello-tp.h: In function ‘_TP_COMBINE_TOKENS’:
> ././hello-tp.h:13:20: error: missing ')' after "defined"
> ././hello-tp.h:13:21: error: missing binary operator before token "TP_H"
> In file included from /usr/include/lttng/ust-tracepoint-event.h:138:0,
>                  from /usr/include/lttng/tracepoint-event.h:41,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> ././hello-tp.h: At top level:
> ././hello-tp.h:13:20: error: missing ')' after "defined"
> ././hello-tp.h:13:21: error: missing binary operator before token "TP_H"
> In file included from /usr/include/lttng/ust-tracepoint-event.h:215:0,
>                  from /usr/include/lttng/tracepoint-event.h:41,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> ././hello-tp.h:13:20: error: missing ')' after "defined"
> ././hello-tp.h:13:21: error: missing binary operator before token "TP_H"
> In file included from /usr/include/lttng/ust-tracepoint-event.h:233:0,
>                  from /usr/include/lttng/tracepoint-event.h:41,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> ././hello-tp.h:13:20: error: missing ')' after "defined"
> ././hello-tp.h:13:21: error: missing binary operator before token "TP_H"
> In file included from /usr/include/lttng/ust-tracepoint-event.h:292:0,
>                  from /usr/include/lttng/tracepoint-event.h:41,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> ././hello-tp.h:13:20: error: missing ')' after "defined"
> ././hello-tp.h:13:21: error: missing binary operator before token "TP_H"
> In file included from /usr/include/lttng/ust-tracepoint-event.h:340:0,
>                  from /usr/include/lttng/tracepoint-event.h:41,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> ././hello-tp.h:13:20: error: missing ')' after "defined"
> ././hello-tp.h:13:21: error: missing binary operator before token "TP_H"
> In file included from /usr/include/lttng/ust-tracepoint-event.h:433:0,
>                  from /usr/include/lttng/tracepoint-event.h:41,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> ././hello-tp.h:13:20: error: missing ')' after "defined"
> ././hello-tp.h:13:21: error: missing binary operator before token "TP_H"
> In file included from /usr/include/lttng/ust-tracepoint-event.h:454:0,
>                  from /usr/include/lttng/tracepoint-event.h:41,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> ././hello-tp.h:13:20: error: missing ')' after "defined"
> ././hello-tp.h:13:21: error: missing binary operator before token "TP_H"
> In file included from /usr/include/lttng/ust-tracepoint-event.h:474:0,
>                  from /usr/include/lttng/tracepoint-event.h:41,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> ././hello-tp.h:13:20: error: missing ')' after "defined"
> ././hello-tp.h:13:21: error: missing binary operator before token "TP_H"
> In file included from /usr/include/lttng/ust-tracepoint-event.h:501:0,
>                  from /usr/include/lttng/tracepoint-event.h:41,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> ././hello-tp.h:13:20: error: missing ')' after "defined"
> ././hello-tp.h:13:21: error: missing binary operator before token "TP_H"
> In file included from /usr/include/lttng/tracepoint-event.h:41:0,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> /usr/include/lttng/ust-tracepoint-event.h:516:39: error: ‘_TP_COMBINE_TOKENS’ declared as function returning an array
> /usr/include/lttng/ust-tracepoint-event.h:516:21: error: function ‘_TP_COMBINE_TOKENS’ is initialized like a variable
> In file included from /usr/include/lttng/ust-tracepoint-event.h:517:0,
>                  from /usr/include/lttng/tracepoint-event.h:41,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> ././hello-tp.h:13:20: error: missing ')' after "defined"
> ././hello-tp.h:13:21: error: missing binary operator before token "TP_H"
> In file included from /usr/include/lttng/tracepoint-event.h:41:0,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> /usr/include/lttng/ust-tracepoint-event.h:518:1: error: empty scalar initializer
> /usr/include/lttng/ust-tracepoint-event.h:518:1: error: (near initialization for ‘_TP_COMBINE_TOKENS’)
> /usr/include/lttng/ust-tracepoint-event.h:528:15: error: function ‘_TP_COMBINE_TOKENS’ is initialized like a variable
> /usr/include/lttng/ust-tracepoint-event.h:528:32: error: conflicting types for ‘_TP_COMBINE_TOKENS’
> /usr/include/lttng/ust-tracepoint-event.h:116:6: note: previous definition of ‘_TP_COMBINE_TOKENS’ was here
> /usr/include/lttng/ust-tracepoint-event.h:529:2: error: field name not in record or union initializer
> /usr/include/lttng/ust-tracepoint-event.h:529:2: error: (near initialization for ‘_TP_COMBINE_TOKENS’)
> /usr/include/lttng/ust-tracepoint-event.h:529:2: error: invalid initializer
> /usr/include/lttng/ust-tracepoint-event.h:529:2: error: (near initialization for ‘_TP_COMBINE_TOKENS’)
> /usr/include/lttng/ust-tracepoint-event.h:530:2: error: field name not in record or union initializer
> /usr/include/lttng/ust-tracepoint-event.h:530:2: error: (near initialization for ‘_TP_COMBINE_TOKENS’)
> /usr/include/lttng/ust-tracepoint-event.h:530:35: error: ‘__event_desc___’ undeclared here (not in a function)
> /usr/include/lttng/ust-tracepoint-event.h:530:52: error: ‘hello_world’ undeclared here (not in a function)
> /usr/include/lttng/ust-tracepoint-event.h:531:2: error: field name not in record or union initializer
> /usr/include/lttng/ust-tracepoint-event.h:531:2: error: (near initialization for ‘_TP_COMBINE_TOKENS’)
> In file included from /usr/include/lttng/tracepoint-event.h:41:0,
>                  from hello-tp.h:33,
>                  from hello-tp.c:7:
> /usr/include/lttng/ust-tracepoint-event.h:546:1: error: ‘_TP_COMBINE_TOKENS’ declared as function returning a function
> /usr/include/lttng/ust-tracepoint-event.h:546:1: error: conflicting types for ‘_TP_COMBINE_TOKENS’
> /usr/include/lttng/ust-tracepoint-event.h:528:32: note: previous declaration of ‘_TP_COMBINE_TOKENS’ was here
> /usr/include/lttng/ust-tracepoint-event.h: In function ‘_TP_COMBINE_TOKENS’:
> /usr/include/lttng/ust-tracepoint-event.h:550:47: error: ‘__probe_desc___’ undeclared (first use in this function)
> /usr/include/lttng/ust-tracepoint-event.h:550:47: note: each undeclared identifier is reported only once for each function it appears in
> /usr/include/lttng/ust-tracepoint-event.h: At top level:
> /usr/include/lttng/ust-tracepoint-event.h:555:1: error: ‘_TP_COMBINE_TOKENS’ declared as function returning a function
> /usr/include/lttng/ust-tracepoint-event.h:555:1: error: redefinition of ‘_TP_COMBINE_TOKENS’
> /usr/include/lttng/ust-tracepoint-event.h:546:1: note: previous definition of ‘_TP_COMBINE_TOKENS’ was here
> /usr/include/lttng/ust-tracepoint-event.h: In function ‘_TP_COMBINE_TOKENS’:
> /usr/include/lttng/ust-tracepoint-event.h:557:43: error: ‘__probe_desc___’ undeclared (first use in this function)
>
>
> Cheers and thanks
>
> Yan Grange
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list