Skip to contentSkip to conversation

babletrace with python bindings

DISCUSSION Mathieu Desnoyers 3 participants 5 messages Dec 19, 2012 – Jan 13, 2013 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 31 lines · * ajonwa ajonwa ([email protected]) wrote:

Hello everyone,

I get the following error message while attempting to compile babeltrace with python bindings:

CC _babeltrace_la-babeltrace_wrap.lo
babeltrace_wrap.c: In function '_wrap__bt_ctf_field_type':
babeltrace_wrap.c:4621:56: warning: passing argument 1 of 'bt_ctf_field_type' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:158:18: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_int_signedness':
babeltrace_wrap.c:4643:51: warning: passing argument 1 of 'bt_ctf_get_int_signedness' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:167:5: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_int_base':
babeltrace_wrap.c:4665:45: warning: passing argument 1 of 'bt_ctf_get_int_base' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:172:5: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_int_byte_order':
babeltrace_wrap.c:4687:51: warning: passing argument 1 of 'bt_ctf_get_int_byte_order' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:178:5: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_int_len':
babeltrace_wrap.c:4709:39: warning: passing argument 1 of 'bt_ctf_get_int_len' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:184:9: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_encoding':
babeltrace_wrap.c:4731:66: warning: passing argument 1 of 'bt_ctf_get_encoding' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:190:26: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_array_len':
babeltrace_wrap.c:4753:46: warning: passing argument 1 of 'bt_ctf_get_array_len' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:196:5: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function 'init_babeltrace':
babeltrace_wrap.c:6020:61: error: 'BT_SEEK_END' undeclared (first use in this function)
babeltrace_wrap.c:6020:61: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [_babeltrace_la-babeltrace_wrap.lo] Error 1

Quoted 3 lines

I got the source code by checking out bindings/python (git checkout bindings/python).

I will be grateful if someone would tell how to fix the error.

This branch is currently in development, and might be out of sync with the master branch of babeltrace at the moment. We don't have immediate plans to work on it, but bontributions are welcome.

Thanks,

Mathieu

Quoted 11 lines

Thanks,

Geoffrey

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Signature · 4 lines
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

A message that is not in the archive (sent off-list or not yet received): 20121219183932.GA9587@Krystal

#3 lore raw
Quoted 32 lines · Mathieu Desnoyers
Quoted 31 lines · * ajonwa ajonwa ([email protected]) wrote:

Hello everyone,

I get the following error message while attempting to compile babeltrace with python bindings:

CC _babeltrace_la-babeltrace_wrap.lo
babeltrace_wrap.c: In function '_wrap__bt_ctf_field_type':
babeltrace_wrap.c:4621:56: warning: passing argument 1 of 'bt_ctf_field_type' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:158:18: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_int_signedness':
babeltrace_wrap.c:4643:51: warning: passing argument 1 of 'bt_ctf_get_int_signedness' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:167:5: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_int_base':
babeltrace_wrap.c:4665:45: warning: passing argument 1 of 'bt_ctf_get_int_base' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:172:5: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_int_byte_order':
babeltrace_wrap.c:4687:51: warning: passing argument 1 of 'bt_ctf_get_int_byte_order' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:178:5: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_int_len':
babeltrace_wrap.c:4709:39: warning: passing argument 1 of 'bt_ctf_get_int_len' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:184:9: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_encoding':
babeltrace_wrap.c:4731:66: warning: passing argument 1 of 'bt_ctf_get_encoding' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:190:26: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_array_len':
babeltrace_wrap.c:4753:46: warning: passing argument 1 of 'bt_ctf_get_array_len' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:196:5: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function 'init_babeltrace':
babeltrace_wrap.c:6020:61: error: 'BT_SEEK_END' undeclared (first use in this function)
babeltrace_wrap.c:6020:61: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [_babeltrace_la-babeltrace_wrap.lo] Error 1

Quoted 3 lines
Quoted 3 lines

I got the source code by checking out bindings/python (git checkout bindings/python).

I will be grateful if someone would tell how to fix the error.

Babeltrace API changed since this was made. To fix it, simply edit the appropriate lines of the
lttng.i.in swig file in extras/bindings/swig/python (see the
CTF/EVENTS.H section of the file) and make sure all function declarations match the ones in include/ctf/events.h From the error message, most (if not all) *const struct definition* args must be changed to *const struct declaration*
This might yield some errors in the Python code itself regarding Definition objects.
That class would need to be rewritten to fit the new API, along with the corresponding functions. But it should compile anyway
Also the 3 BT_SEEK_END lines must be changed to BT_SEEK_LAST

Hope this helps
Danny

Quoted 18 lines

This branch is currently in development, and might be out of sync with the master branch of babeltrace at the moment. We don't have immediate plans to work on it, but bontributions are welcome.

Thanks,

Mathieu

Quoted 9 lines

B
Thanks,

Geoffreyget_int_s
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 34 lines · Danny Serres
Quoted 33 lines · Mathieu Desnoyers
Quoted 32 lines · * ajonwa ajonwa ([email protected]) wrote:

Hello everyone,

I get the following error message while attempting to compile
babeltrace with python bindings:

CC _babeltrace_la-babeltrace_wrap.lo
babeltrace_wrap.c: In function '_wrap__bt_ctf_field_type':
babeltrace_wrap.c:4621:56: warning: passing argument 1 of 'bt_ctf_field_type' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:158:18: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_int_signedness':
babeltrace_wrap.c:4643:51: warning: passing argument 1 of 'bt_ctf_get_int_signedness' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:167:5: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_int_base':
babeltrace_wrap.c:4665:45: warning: passing argument 1 of 'bt_ctf_get_int_base' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:172:5: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_int_byte_order':
babeltrace_wrap.c:4687:51: warning: passing argument 1 of 'bt_ctf_get_int_byte_order' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:178:5: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_int_len':
babeltrace_wrap.c:4709:39: warning: passing argument 1 of 'bt_ctf_get_int_len' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:184:9: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_encoding':
babeltrace_wrap.c:4731:66: warning: passing argument 1 of 'bt_ctf_get_encoding' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:190:26: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function '_wrap__bt_ctf_get_array_len':
babeltrace_wrap.c:4753:46: warning: passing argument 1 of 'bt_ctf_get_array_len' from incompatible pointer type [enabled by default] ../../include/babeltrace/ctf/events.h:196:5: note: expected 'const struct declaration *' but argument is of type 'const struct definition *' babeltrace_wrap.c: In function 'init_babeltrace':
babeltrace_wrap.c:6020:61: error: 'BT_SEEK_END' undeclared (first use in this function)
babeltrace_wrap.c:6020:61: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [_babeltrace_la-babeltrace_wrap.lo] Error 1

Quoted 7 lines
Quoted 4 lines
Quoted 4 lines

I got the source code by checking out bindings/python (git
checkout bindings/python).

I will be grateful if someone would tell how to fix the error.

Babeltrace API changed since this was made. To fix it, simply edit the appropriate lines of the
lttng.i.in swig file in extras/bindings/swig/python (see the
CTF/EVENTS.H section of the file) and

I meant bindings/python/babeltrace.i.in

Quoted 30 lines

make sure all function declarations match the ones in include/ctf/events.h
From the error message, most (if not all) *const struct definition* args must be changed to *const struct declaration*
This might yield some errors in the Python code itself regarding Definition objects. That class would need to be rewritten to fit the new API, along with the corresponding functions. But it should compile anyway
Also the 3 BT_SEEK_END lines must be changed to BT_SEEK_LAST

Hope this helps
Danny

Quoted 18 lines

This branch is currently in development, and might be out of sync with the master branch of babeltrace at the moment. We don't have immediate plans to work on it, but bontributions are welcome.

Thanks,

Mathieu

Quoted 9 lines

B
Thanks,

Geoffreyget_int_s
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

#6 lore raw
In reply to a message not in the archive
Quoted 12 lines

-----Original Message-----
From: Mathieu Desnoyers [mailto:[email protected]]
Sent: Thursday, 20 December 2012 5:10 AM
To: ajonwa ajonwa
Cc: [email protected]
Subject: Re: [lttng-dev] babletrace with python bindings

Quoted 3 lines · * ajonwa ajonwa ([email protected]) wrote:

Hello everyone,

I get the following error message while attempting to compile

babeltrace with python bindings:

[...]

Quoted 3 lines

This branch is currently in development, and might be out of sync with the master branch of babeltrace at the moment. We don't have immediate plans to work on it, but bontributions are welcome.

Apologies for the late reply. I just wanted to point out that if you check out commit 24a3136a383, it does build. It's an older version of babeltrace, but does work despite some bugs.

The main bug I recall is that iterator.set_pos(babeltrace.IterPos(babeltrace.SEEK_BEGIN)) doesn't fail immediately, and works in some traces, but sometimes results in a subsequent assertion failure in the Python interpreter after a few events have been read, or returns a bogus event at the start of the trace. Quite possibly this is a babeltrace bug that has been fixed already.

Regards,
David

----------------------------------------------------------------------
The information contained in this transmission may be confidential. Any disclosure, copying, or further distribution of confidential information is not permitted unless such privilege is explicitly granted in writing by Quantum. Quantum reserves the right to have electronic communications, including email and attachments, sent across its networks filtered through anti virus and spam software programs and retain such messages in order to comply with applicable data security and retention requirements. Quantum is not responsible for the proper and complete transmission of the substance of this communication or for any delay in its receipt.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw
Quoted 21 lines · * David OShea ([email protected]) wrote:
Quoted 12 lines

-----Original Message-----
From: Mathieu Desnoyers [mailto:[email protected]]
Sent: Thursday, 20 December 2012 5:10 AM
To: ajonwa ajonwa
Cc: [email protected]
Subject: Re: [lttng-dev] babletrace with python bindings

Quoted 3 lines · * ajonwa ajonwa ([email protected]) wrote:

Hello everyone,

I get the following error message while attempting to compile

babeltrace with python bindings:

[...]

Quoted 3 lines

This branch is currently in development, and might be out of sync with the master branch of babeltrace at the moment. We don't have immediate plans to work on it, but bontributions are welcome.

Apologies for the late reply. I just wanted to point out that if you check out commit 24a3136a383, it does build. It's an older version of babeltrace, but does work despite some bugs.

Quoted 7 lines

The main bug I recall is that iterator.set_pos(babeltrace.IterPos(babeltrace.SEEK_BEGIN)) doesn't fail immediately, and works in some traces, but sometimes results in a subsequent assertion failure in the Python interpreter after a few events have been read, or returns a bogus event at the start of the trace. Quite possibly this is a babeltrace bug that has been fixed already.

Probably by this commit:

commit 08ac0e0801251211279f9deb07f9cbbbd712d9c5

Author: Mathieu Desnoyers <[email protected]>
Date:   Fri Nov 9 13:02:59 2012 -0500

Fix SEEK_BEGIN for streams that do not contain any event

Thanks,

Mathieu

Quoted 6 lines

Regards,
David

----------------------------------------------------------------------
The information contained in this transmission may be confidential. Any disclosure, copying, or further distribution of confidential information is not permitted unless such privilege is explicitly granted in writing by Quantum. Quantum reserves the right to have electronic communications, including email and attachments, sent across its networks filtered through anti virus and spam software programs and retain such messages in order to comply with applicable data security and retention requirements. Quantum is not responsible for the proper and complete transmission of the substance of this communication or for any delay in its receipt.

Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com