[lttng-dev] Errors compiling converted tp file

Yan Grange ygrange at gmail.com
Wed Dec 10 10:16:06 EST 2014


Hi,

Thanks for that.  I have asked our sysadmin to install a newer version via this method. Even though he gets several severe-lloking errors in this process

$ apt-get install liblttng-ust-dev

Building initial module for 3.2.0-61-generic
Errors were encountered while processing:
 lttng-modules-dkms
 Error!  Build of lttng-probe-printk.ko failed for: 3.2.0-61-generic (x86_64)

In the make log, we find the following three lines:

/var/lib/dkms/lttng-modules/2.5.x+stable+bzr633+pack21+201412020446~ubuntu12.04.1/build/probes/Makefile:30: File /usr/src/linux-headers-3.2.0-61-generic/virt/kvm/iodev.h not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.
/var/lib/dkms/lttng-modules/2.5.x+stable+bzr633+pack21+201412020446~ubuntu12.04.1/build/probes/Makefile:142: Files /usr/src/linux-headers-3.2.0-61-generic/fs/btrfs/*.h not found. Probe "btrfs" is disabled. Use full kernel source tree to enable it.
/var/lib/dkms/lttng-modules/2.5.x+stable+bzr633+pack21+201412020446~ubuntu12.04.1/build/probes/Makefile:158: Files /usr/src/linux-headers-3.2.0-61-generic/fs/ext4/*.h not found. Probe "ext4" is disabled. Use full kernel source tree to enable it.

The full kernel source tree is already installed. 

However it actually works to create a header file from a tp file and compile (and run) the code. However I now get in trouble when executing:

$ lttng list --userspace
Error: Unable to list UST events: Undefined command
Error: Command error

So I guess something still went somewhat wrong but I can't really see what.

Cheers

Yan Grange

On 9 dec. 2014, at 21:26, Jérémie Galarneau <jeremie.galarneau at efficios.com> wrote:

> On Tue, Dec 9, 2014 at 2:02 PM, Yan Grange <ygrange at gmail.com> wrote:
>> Hi,
>> 
>> It reports:
>> lttng version 2.0.1 - Annedd'ale
>> 
> 
> Hmm... unfortunately, we don't support 2.0 anymore. Would you mind
> testing with a more recent version?
> 
> You can use the LTTng PPA to install the 2.5 version following this
> documentation:
> https://lttng.org/docs/#doc-ubuntu-ppa
> 
> Let me know how that works out.
> 
> Jérémie
> 
>> Regards,
>> 
>> Yan
>> --
>> Y. Grange
>> 
>>> Op 9 dec. 2014 om 19:42 heeft Jérémie Galarneau <jeremie.galarneau at efficios.com> het volgende geschreven:
>>> 
>>>> 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
> 
> 
> 
> -- 
> Jérémie Galarneau
> EfficiOS Inc.
> http://www.efficios.com




More information about the lttng-dev mailing list