From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Spector Subject: Babeltrace python bindings documentation is no up-to-date Date: Sat, 29 Oct 2016 16:55:15 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2537973453712201997==" Return-path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by evm-lttng-1.efficios.com (Postfix) with ESMTPS id 51D64A0C8E for ; Sat, 29 Oct 2016 13:55:54 +0000 (UTC) Received: by mail-wm0-f51.google.com with SMTP id p190so65844548wmp.1 for ; Sat, 29 Oct 2016 06:55:37 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" To: lttng-dev@lists.lttng.org List-Id: lttng-dev@lists.lttng.org --===============2537973453712201997== Content-Type: multipart/alternative; boundary=047d7bf10a6041f13805400154c7 --047d7bf10a6041f13805400154c7 Content-Type: text/plain; charset=UTF-8 When trying to use the example from http://diamon.org/babeltrace/docs/python/examples/ (pointed to via http://lttng.org/viewers/), the code is not up-to-date. For instance, the first line in the example (import babeltrace.reader) fails as there's no 'reader' to import. I've managed to get over it, but thought it would be better to have a working example code. P.S. I'm running RHEL 7.2 with babeltrace-python-1.2.4-1.el7.x86_64 Best Regards, Jean --047d7bf10a6041f13805400154c7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
When trying to use the example from=C2=A0http://diamon.org/babelt= race/docs/python/examples/ (pointed to via http://lttng.org/viewers/), the code is not up-to-date.
=

For instance, the first line in the example (import bab= eltrace.reader) fails as there's no 'reader' to import.

I've managed to get over it, but thought it would= be better to have a working example code.

P.S. I&= #39;m running RHEL 7.2 with babeltrace-python-1.2.4-1.el7.x86_64
=
Best Regards,
Jean

--047d7bf10a6041f13805400154c7-- --===============2537973453712201997== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbHR0bmctZGV2 IG1haWxpbmcgbGlzdApsdHRuZy1kZXZAbGlzdHMubHR0bmcub3JnCmh0dHBzOi8vbGlzdHMubHR0 bmcub3JnL2NnaS1iaW4vbWFpbG1hbi9saXN0aW5mby9sdHRuZy1kZXYK --===============2537973453712201997==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philippe Proulx Subject: Re: Babeltrace python bindings documentation is no up-to-date Date: Mon, 31 Oct 2016 13:07:01 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from mail-qk0-f181.google.com (mail-qk0-f181.google.com [209.85.220.181]) by evm-lttng-1.efficios.com (Postfix) with ESMTPS id 33AC7A5459 for ; Mon, 31 Oct 2016 17:07:54 +0000 (UTC) Received: by mail-qk0-f181.google.com with SMTP id z190so168914892qkc.2 for ; Mon, 31 Oct 2016 10:07:32 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" To: Jean Spector Cc: "lttng-dev@lists.lttng.org" List-Id: lttng-dev@lists.lttng.org T24gU2F0LCBPY3QgMjksIDIwMTYgYXQgOTo1NSBBTSwgSmVhbiBTcGVjdG9yIDxqZWFuLnNwZWN0 b3JAZ21haWwuY29tPiB3cm90ZToKPiBXaGVuIHRyeWluZyB0byB1c2UgdGhlIGV4YW1wbGUgZnJv bQo+IGh0dHA6Ly9kaWFtb24ub3JnL2JhYmVsdHJhY2UvZG9jcy9weXRob24vZXhhbXBsZXMvIChw b2ludGVkIHRvIHZpYQo+IGh0dHA6Ly9sdHRuZy5vcmcvdmlld2Vycy8pLCB0aGUgY29kZSBpcyBu b3QgdXAtdG8tZGF0ZS4KPgo+IEZvciBpbnN0YW5jZSwgdGhlIGZpcnN0IGxpbmUgaW4gdGhlIGV4 YW1wbGUgKG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ZSBh cyBhIG5vdGUgaW4gdGhlIGdlbmVyYXRlZApkb2N1bWVudGF0aW9uLgoKQlIsClBoaWwKCj4KPiBQ LlMuIEknbSBydW5uaW5nIFJIRUwgNy4yIHdpdGggYmFiZWx0cmFjZS1weXRob24tMS4yLjQtMS5l bDcueDg2XzY0Cj4KPiBCZXN0IFJlZ2FyZHMsCj4gSmVhbgo+Cj4KPiBfX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwo+IGx0dG5nLWRldiBtYWlsaW5nIGxpc3QK PiBsdHRuZy1kZXZAbGlzdHMubHR0bmcub3JnCj4gaHR0cHM6Ly9saXN0cy5sdHRuZy5vcmcvY2dp LWJpbi9tYWlsbWFuL2xpc3RpbmZvL2x0dG5nLWRldgo+Cl9fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fCmx0dG5nLWRldiBtYWlsaW5nIGxpc3QKbHR0bmctZGV2 QGxpc3RzLmx0dG5nLm9yZwpodHRwczovL2xpc3RzLmx0dG5nLm9yZy9jZ2ktYmluL21haWxtYW4v bGlzdGluZm8vbHR0bmctZGV2Cg== From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Spector Subject: Re: Babeltrace python bindings documentation is no up-to-date Date: Mon, 31 Oct 2016 22:02:55 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4508390611288509750==" Return-path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by evm-lttng-1.efficios.com (Postfix) with ESMTPS id 2DD9CA545E for ; Mon, 31 Oct 2016 20:03:39 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id n67so249879996wme.1 for ; Mon, 31 Oct 2016 13:03:17 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" To: Philippe Proulx Cc: "lttng-dev@lists.lttng.org" List-Id: lttng-dev@lists.lttng.org --===============4508390611288509750== Content-Type: multipart/alternative; boundary=047d7bfcfdced3c20105402eb212 --047d7bfcfdced3c20105402eb212 Content-Type: text/plain; charset=UTF-8 Thank you Philippe. Adding a different documentation page for older versions (it's the latest package on RHEL 7.2 - so I'd expect more newbies to encounter this issue) could help anyone trying the Python bindings for the first time. I'm sure you realize that trying the official example and failing can be quite frustrating and could turn off potential users. This is especially true if it comes after other issues(let me know if you'd prefer these to be sent in separate emails): RHEL 7.2 uses python 3.4, but babeltrace-python-1.2.4 requires python 3.3, which is not available anymore - at least not out of the box. Again, I've solved the issue for myself, so it's not a support call. The idea is that it would be great if the initial install+run stage was made less painful. I believe it would increase the user base as, for instance, I was on the verge of giving up after building from source has also failed for me. When trying to build from latest stable source (1.4.0) on RHEL 7.2, I've encountered a couple of issues: 1. configure would fail on popt. "ln -s /usr/lib64/libpopt.so.0 /usr/lib64/libpopt.so" worked around the issue, but there must be a better way (or a line in the README). 2. "python3 -c 'import babeltrace'" would fail with "ImportError: /usr/local/lib64/python3.4/site-packages/babeltrace/_nativebt.so: undefined symbol: PyInstance_Type" That's where I gave up trying to build from source. It could be due to the same python 3.4 - but it's just a guess. ========== To recap, I see 3 issues here: 1. Documentation - any platform 2. Install of the latest babeltrace-python (1.2.4) - RHEL 7.2 3. Building from the latest stable source (1.4.0) - RHEL 7.2 In any case, thanks for the great tool. I hope to put it to good use. Jean On Mon, Oct 31, 2016 at 7:07 PM, Philippe Proulx wrote: > On Sat, Oct 29, 2016 at 9:55 AM, Jean Spector > wrote: > > When trying to use the example from > > http://diamon.org/babeltrace/docs/python/examples/ (pointed to via > > http://lttng.org/viewers/), the code is not up-to-date. > > > > For instance, the first line in the example (import babeltrace.reader) > fails > > as there's no 'reader' to import. > > > > I've managed to get over it, but thought it would be better to have a > > working example code. > > I wrote this doc and it was merged into master more than a year ago. > When writing this doc, I split the `babeltrace` package into the > `reader` and `writer` subpackages to make the autodocumentation with > Sphinx easier. Now it looks like this split was never backported to > v1.2, v1.3, v1.4, and soon v1.5. > > The `Babeltrace 1.2.0` version you see on the front page is just the > current version found when I generated the online version. Really, the > title should say `Babeltrace (master branch)`. The master branch will > become Babeltrace 2.0 soon. In the meantime, simply drop the `reader` > subpackage when you read the doc and try examples. So > > import babeltrace.reader as btreader > > trace_collection = btreader.TraceCollection() > > becomes > > import babeltrace as btreader > > trace_collection = btreader.TraceCollection() > > For the CTF writer part, drop the `writer` subpackage, and import the > `CTFWriter` class: you'll find all the documented classes within this > class (kind of weird, and one of the reasons I created a subpackage > instead): > > import babeltrace.writer as btwriter > > writer = btwriter.Writer(trace_path) > > becomes > > from babeltrace import CTFWriter as btwriter > > writer = btwriter.Writer(trace_path) > > Note that the new subpackage split is backward compatible with the > bindings of v1.x, so the code you write now will continue to work... > forever. > > I might add an equivalent of this response as a note in the generated > documentation. > > BR, > Phil > > > > > P.S. I'm running RHEL 7.2 with babeltrace-python-1.2.4-1.el7.x86_64 > > > > Best Regards, > > Jean > > > > > > _______________________________________________ > > lttng-dev mailing list > > lttng-dev@lists.lttng.org > > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev > > > --047d7bfcfdced3c20105402eb212 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thank you=C2=A0Philippe.

= Adding a different documentation page for older versions (it's the late= st package on RHEL 7.2 - so I'd expect more newbies to encounter this i= ssue) could help anyone trying the Python bindings for the first time.
I'm su= re you realize that trying the official example and failing can be quite fr= ustrating and could turn off potential users. This is especially true if it= comes after other issues(let me know if you'd prefer these to be sent = in separate emails):

RHEL 7.2 uses python 3.4, but=C2=A0babeltrace-python-1.2.4 requires python 3.= 3, which is not available anymore - at least not out of the box.
=
Again, I've solved the issue for myself, so it's not a s= upport call. The idea is that it would be great if the initial install+run = stage was made less painful.
I believe it would increase the user= base as, for instance, I was on the verge of giving up after building from= source has also failed for me.

When trying to bui= ld from latest stable source (1.4.0) on RHEL 7.2, I've encountered a co= uple of issues:
  1. configure would fail on popt. "ln -s= /usr/lib64/libpopt.so.0 /usr/lib64/libpopt.so" worked around the issu= e, but there must be a better way (or a line in the README).
  2. "= python3 -c 'import babeltrace'" would fail with "ImportEr= ror: /usr/local/lib64/python3.4/site-packages/babeltrace/_nativebt.so: unde= fined symbol: PyInstance_Type"
That's where I gave u= p trying to build from source. It could be due to the same python 3.4 - but= it's just a guess.

=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D

To recap, I see 3 issues here:
<= div>
  1. Documentation - any platform
  2. Install of the latest=C2= =A0 babeltrace-python (1.2.4) - RHEL 7.2
  3. Building from the latest stabl= e source (1.4.0) - RHEL 7.2

In any case,= thanks for the great tool. I hope to put it to good use.
Jean


On Mon, Oct 31, 2016 at 7:07 PM, Philippe Proulx &= lt;eeppelitelo= op@gmail.com> wrote:
On Sat, Oct 29, 2016 at 9:55 AM, Jean Spector <jean.spector@gmail.co= m> wrote:
> When trying to use the example from
> http://diamon.org/babeltrace/docs/python= /examples/ (pointed to via
> http://lttng.org/viewers/), the code is not up-to-date.
>
> For instance, the first line in the example (import babeltrace.reader)= fails
> as there's no 'reader' to import.
>
> I've managed to get over it, but thought it would be better to hav= e a
> working example code.

I wrote this doc and it was merged into master more than a year ago.=
When writing this doc, I split the `babeltrace` package into the
`reader` and `writer` subpackages to make the autodocumentation with
Sphinx easier. Now it looks like this split was never backported to
v1.2, v1.3, v1.4, and soon v1.5.

The `Babeltrace 1.2.0` version you see on the front page is just the
current version found when I generated the online version. Really, the
title should say `Babeltrace (master branch)`. The master branch will
become Babeltrace 2.0 soon. In the meantime, simply drop the `reader`
subpackage when you read the doc and try examples. So

=C2=A0 =C2=A0 import babeltrace.reader as btreader

=C2=A0 =C2=A0 trace_collection =3D btreader.TraceCollection()

becomes

=C2=A0 =C2=A0 import babeltrace as btreader

=C2=A0 =C2=A0 trace_collection =3D btreader.TraceCollection()

For the CTF writer part, drop the `writer` subpackage, and import the
`CTFWriter` class: you'll find all the documented classes within this class (kind of weird, and one of the reasons I created a subpackage
instead):

=C2=A0 =C2=A0 import babeltrace.writer as btwriter

=C2=A0 =C2=A0 writer =3D btwriter.Writer(trace_path)

becomes

=C2=A0 =C2=A0 from babeltrace import CTFWriter as btwriter

=C2=A0 =C2=A0 writer =3D btwriter.Writer(trace_path)

Note that the new subpackage split is backward compatible with the
bindings of v1.x, so the code you write now will continue to work...
forever.

I might add an equivalent of this response as a note in the generated
documentation.

BR,
Phil

>
> P.S. I'm running RHEL 7.2 with babeltrace-python-1.2.4-1.el7.= x86_64
>
> Best Regards,
> Jean
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-d= ev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/= mailman/listinfo/lttng-dev
>

--047d7bfcfdced3c20105402eb212-- --===============4508390611288509750== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbHR0bmctZGV2 IG1haWxpbmcgbGlzdApsdHRuZy1kZXZAbGlzdHMubHR0bmcub3JnCmh0dHBzOi8vbGlzdHMubHR0 bmcub3JnL2NnaS1iaW4vbWFpbG1hbi9saXN0aW5mby9sdHRuZy1kZXYK --===============4508390611288509750==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philippe Proulx Subject: Re: Babeltrace python bindings documentation is no up-to-date Date: Mon, 31 Oct 2016 16:38:03 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from mail-qt0-x236.google.com (mail-qt0-x236.google.com [IPv6:2607:f8b0:400d:c0d::236]) by lists.lttng.org (Postfix) with ESMTPS id 32B4615684 for ; Mon, 31 Oct 2016 20:39:06 +0000 (UTC) Received: by mail-qt0-x236.google.com with SMTP id c47so34181449qtc.2 for ; Mon, 31 Oct 2016 13:38:34 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" To: Jean Spector Cc: "lttng-dev@lists.lttng.org" List-Id: lttng-dev@lists.lttng.org T24gTW9uLCBPY3QgMzEsIDIwMTYgYXQgNDowMiBQTSwgSmVhbiBTcGVjdG9yIDxqZWFuLnNwZWN0 b3JAZ21haWwuY29tPiB3cm90ZToKPiBUaGFuayB5b3UgUGhpbGlwcGUuCj4KPiBBZGRpbmcgYSBk aWZmZXJlbnQgZG9jdW1lbnRhdGlvbiBwYWdlIGZvciBvbGRlciB2ZXJzaW9ucyAoaXQncyB0aGUg bGF0ZXN0Cj4gcGFja2FnZSBvbiBSSEVMIDcuMiAtIHNvIEknZCBleHBlY3QgbW9yZSBuZXdiaWVz IHRvIGVuY291bnRlciB0aGlzIGlzc3VlKQo+IGNvdWxkIGhlbHAgYW55b25lIHRyeWluZyB0aGUg UHl0aG9uIGJpbmRpbmdzIGZvciB0aGUgZmlyc3QgdGltZS4KPiBJJ20gc3VyZSB5b3UgcmVhbGl6 ZSB0aGF0IHRyeWluZyB0aGUgb2ZmaWNpYWwgZXhhbXBsZSBhbmQgZmFpbGluZyBjYW4gYmUKPiBx dWl0ZSBmcnVzdHJhdGluZyBhbmQgY291bGQgdHVybiBvZmYgcG90ZW50aWFsIHVzZXJzLgoKSSds bCBtYWtlIHN1cmUgdG8gbWFrZSB0aGUgZG9jIGFzIGNsZWFyIGFzIHBvc3NpYmxlLiBUaGUgbWFp biBwcm9ibGVtIGhlcmUgaXMKdGhhdCB0aGUgbW9kdWxlIGlzIHNpbXBseSBub3QgU3BoaW54LWRv Y3VtZW50ZWQgaW4gQmFiZWx0cmFjZSAxLnguIEkgZ3Vlc3MKSSBjb3VsZCBzZWFyY2ggYW5kIHJl cGxhY2UgdGhlIHBhY2thZ2UgbmFtZXMgaW4gdGhlIGRvYyBiZWZvcmUgcHVibGlzaGluZyBpdC4K SSdsbCBmaW5kIGEgd2F5IHRvIG1ha2UgaXQgY2xlYXI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V3IHN1YnBhY2thZ2Ugc3BsaXQgaXMgYmFja3dhcmQgY29tcGF0aWJsZSB3aXRoIHRoZQo+ PiBiaW5kaW5ncyBvZiB2MS54LCBzbyB0aGUgY29kZSB5b3Ugd3JpdGUgbm93IHdpbGwgY29udGlu dWUgdG8gd29yay4uLgo+PiBmb3JldmVyLgo+Pgo+PiBJIG1pZ2h0IGFkZCBhbiBlcXVpdmFsZW50 IG9mIHRoaXMgcmVzcG9uc2UgYXMgYSBub3RlIGluIHRoZSBnZW5lcmF0ZWQKPj4gZG9jdW1lbnRh dGlvbi4KPj4KPj4gQlIsCj4+IFBoaWwKPj4KPj4gPgo+PiA+IFAuUy4gSSdtIHJ1bm5pbmcgUkhF TCA3LjIgd2l0aCBiYWJlbHRyYWNlLXB5dGhvbi0xLjIuNC0xLmVsNy54ODZfNjQKPj4gPgo+PiA+ IEJlc3QgUmVnYXJkcywKPj4gPiBKZWFuCj4+ID4KPj4gPgo+PiA+IF9fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCj4+ID4gbHR0bmctZGV2IG1haWxpbmcgbGlz dAo+PiA+IGx0dG5nLWRldkBsaXN0cy5sdHRuZy5vcmcKPj4gPiBodHRwczovL2xpc3RzLmx0dG5n Lm9yZy9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vbHR0bmctZGV2Cj4+ID4KPgo+Cl9fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCmx0dG5nLWRldiBtYWlsaW5n IGxpc3QKbHR0bmctZGV2QGxpc3RzLmx0dG5nLm9yZwpodHRwczovL2xpc3RzLmx0dG5nLm9yZy9j Z2ktYmluL21haWxtYW4vbGlzdGluZm8vbHR0bmctZGV2Cg== From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Spector Subject: Re: Babeltrace python bindings documentation is no up-to-date Date: Mon, 31 Oct 2016 22:44:30 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4219971428698823390==" Return-path: Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) by lists.lttng.org (Postfix) with ESMTPS id E190B1569A for ; Mon, 31 Oct 2016 20:45:24 +0000 (UTC) Received: by mail-wm0-x233.google.com with SMTP id n67so251710443wme.1 for ; Mon, 31 Oct 2016 13:44:52 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" To: Philippe Proulx Cc: "lttng-dev@lists.lttng.org" List-Id: lttng-dev@lists.lttng.org --===============4219971428698823390== Content-Type: multipart/alternative; boundary=047d7bf10a60859ef505402f47ed --047d7bf10a60859ef505402f47ed Content-Type: text/plain; charset=UTF-8 On Mon, Oct 31, 2016 at 10:38 PM, Philippe Proulx wrote: > On Mon, Oct 31, 2016 at 4:02 PM, Jean Spector > wrote: > > Thank you Philippe. > > > > Adding a different documentation page for older versions (it's the latest > > package on RHEL 7.2 - so I'd expect more newbies to encounter this issue) > > could help anyone trying the Python bindings for the first time. > > I'm sure you realize that trying the official example and failing can be > > quite frustrating and could turn off potential users. > > I'll make sure to make the doc as clear as possible. The main problem here > is > that the module is simply not Sphinx-documented in Babeltrace 1.x. I guess > I could search and replace the package names in the doc before publishing > it. > I'll find a way to make it clear anyway. > Thank you > > > This is especially > > true if it comes after other issues(let me know if you'd prefer these to > be > > sent in separate emails): > > > > RHEL 7.2 uses python 3.4, but babeltrace-python-1.2.4 requires python > 3.3, > > which is not available anymore - at least not out of the box. > > What do you mean? The bindings work just fine with Python 3.4 and Python > 3.5. > It's a matter of rpm dependencies. Once installed, it might work fine with python 3.4 - but yum just refuses to install it on RHEL 7.2 > > Again, I've solved the issue for myself, so it's not a support call. The > > idea is that it would be great if the initial install+run stage was made > > less painful. > > I believe it would increase the user base as, for instance, I was on the > > verge of giving up after building from source has also failed for me. > > > > When trying to build from latest stable source (1.4.0) on RHEL 7.2, I've > > encountered a couple of issues: > > > > configure would fail on popt. "ln -s /usr/lib64/libpopt.so.0 > > /usr/lib64/libpopt.so" worked around the issue, but there must be a > better > > way (or a line in the README). > > "python3 -c 'import babeltrace'" would fail with "ImportError: > > /usr/local/lib64/python3.4/site-packages/babeltrace/_nativebt.so: > undefined > > symbol: PyInstance_Type" > > > > That's where I gave up trying to build from source. It could be due to > the > > same python 3.4 - but it's just a guess. > > The official channel for reporting bugs is the bug tracker > . If you create an issue > there, we > can ask for details about the environment and context and track the bug to > remember it. > > I have no idea what's going wrong here, but if you create an issue we > can test the > same environment (RHEL 7.2) and see if we can reproduce the bug. > > Will do > > > > ========== > > > > To recap, I see 3 issues here: > > > > Documentation - any platform > > Install of the latest babeltrace-python (1.2.4) - RHEL 7.2 > > Building from the latest stable source (1.4.0) - RHEL 7.2 > > > > > > In any case, thanks for the great tool. I hope to put it to good use. > > Jean > > Thanks for the feedback! We appreciate. > > Phil > > > > > > > On Mon, Oct 31, 2016 at 7:07 PM, Philippe Proulx < > eeppeliteloop@gmail.com> > > wrote: > >> > >> On Sat, Oct 29, 2016 at 9:55 AM, Jean Spector > >> wrote: > >> > When trying to use the example from > >> > http://diamon.org/babeltrace/docs/python/examples/ (pointed to via > >> > http://lttng.org/viewers/), the code is not up-to-date. > >> > > >> > For instance, the first line in the example (import babeltrace.reader) > >> > fails > >> > as there's no 'reader' to import. > >> > > >> > I've managed to get over it, but thought it would be better to have a > >> > working example code. > >> > >> I wrote this doc and it was merged into master more than a year ago. > >> When writing this doc, I split the `babeltrace` package into the > >> `reader` and `writer` subpackages to make the autodocumentation with > >> Sphinx easier. Now it looks like this split was never backported to > >> v1.2, v1.3, v1.4, and soon v1.5. > >> > >> The `Babeltrace 1.2.0` version you see on the front page is just the > >> current version found when I generated the online version. Really, the > >> title should say `Babeltrace (master branch)`. The master branch will > >> become Babeltrace 2.0 soon. In the meantime, simply drop the `reader` > >> subpackage when you read the doc and try examples. So > >> > >> import babeltrace.reader as btreader > >> > >> trace_collection = btreader.TraceCollection() > >> > >> becomes > >> > >> import babeltrace as btreader > >> > >> trace_collection = btreader.TraceCollection() > >> > >> For the CTF writer part, drop the `writer` subpackage, and import the > >> `CTFWriter` class: you'll find all the documented classes within this > >> class (kind of weird, and one of the reasons I created a subpackage > >> instead): > >> > >> import babeltrace.writer as btwriter > >> > >> writer = btwriter.Writer(trace_path) > >> > >> becomes > >> > >> from babeltrace import CTFWriter as btwriter > >> > >> writer = btwriter.Writer(trace_path) > >> > >> Note that the new subpackage split is backward compatible with the > >> bindings of v1.x, so the code you write now will continue to work... > >> forever. > >> > >> I might add an equivalent of this response as a note in the generated > >> documentation. > >> > >> BR, > >> Phil > >> > >> > > >> > P.S. I'm running RHEL 7.2 with babeltrace-python-1.2.4-1.el7.x86_64 > >> > > >> > Best Regards, > >> > Jean > >> > > >> > > >> > _______________________________________________ > >> > lttng-dev mailing list > >> > lttng-dev@lists.lttng.org > >> > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev > >> > > > > > > --047d7bf10a60859ef505402f47ed Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Mon, Oct 31, 2016 at 10:38 PM, Philippe Proulx <= ;eeppeliteloop= @gmail.com> wrote:
On Mon, Oct 31, 2016 at 4:02 PM, Jean Spector <jean.spector@gmail.com> wrote:
> Thank you Philippe.
>
> Adding a different documentation page for older versions (it's the= latest
> package on RHEL 7.2 - so I'd expect more newbies to encounter this= issue)
> could help anyone trying the Python bindings for the first time.
> I'm sure you realize that trying the official example and failing = can be
> quite frustrating and could turn off potential users.

I'll make sure to make the doc as clear as possible. The main pr= oblem here is
that the module is simply not Sphinx-documented in Babeltrace 1.x. I guess<= br> I could search and replace the package names in the doc before publishing i= t.
I'll find a way to make it clear anyway.
Thank you= =C2=A0

> This is especially
> true if it comes after other issues(let me know if you'd prefer th= ese to be
> sent in separate emails):
>
> RHEL 7.2 uses python 3.4, but babeltrace-python-1.2.4 requires python = 3.3,
> which is not available anymore - at least not out of the box.

What do you mean? The bindings work just fine with Python 3.4 and Py= thon 3.5.
It's a matter of rpm dependencies.
=
Once installed, it might work fine with python 3.4 - but yum just refu= ses to install it on RHEL 7.2


> Again, I've solved the issue for myself, so it's not a support= call. The
> idea is that it would be great if the initial install+run stage was ma= de
> less painful.
> I believe it would increase the user base as, for instance, I was on t= he
> verge of giving up after building from source has also failed for me.<= br> >
> When trying to build from latest stable source (1.4.0) on RHEL 7.2, I&= #39;ve
> encountered a couple of issues:
>
> configure would fail on popt. "ln -s /usr/lib64/libpopt.so.0
> /usr/lib64/libpopt.so" worked around the issue, but there must be= a better
> way (or a line in the README).
> "python3 -c 'import babeltrace'" would fail with &qu= ot;ImportError:
> /usr/local/lib64/python3.4/site-packages/babeltrace/_nativeb= t.so: undefined
> symbol: PyInstance_Type"
>
> That's where I gave up trying to build from source. It could be du= e to the
> same python 3.4 - but it's just a guess.

The official channel for reporting bugs is the bug tracker
<https://bugs.lttng.org/projects/babeltrace/&= gt;. If you create an issue there, we
can ask for details about the environment and context and track the bug to<= br> remember it.

I have no idea what's going wrong here, but if you create an issue we can test the
same environment (RHEL 7.2) and see if we can reproduce the bug.

Will do
=C2=A0
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
> To recap, I see 3 issues here:
>
> Documentation - any platform
> Install of the latest=C2=A0 babeltrace-python (1.2.4) - RHEL 7.2
> Building from the latest stable source (1.4.0) - RHEL 7.2
>
>
> In any case, thanks for the great tool. I hope to put it to good use.<= br> > Jean

Thanks for the feedback! We appreciate.

Phil

>
>
> On Mon, Oct 31, 2016 at 7:07 PM, Philippe Proulx <eeppeliteloop@gmail.com>
> wrote:
>>
>> On Sat, Oct 29, 2016 at 9:55 AM, Jean Spector <jean.spector@gmail.com>
>> wrote:
>> > When trying to use the example from
>> > http://diamon.org/babeltrace/do= cs/python/examples/ (pointed to via
>> > http://lttng.org/viewers/), the code is not up-to-date. >> >
>> > For instance, the first line in the example (import babeltrac= e.reader)
>> > fails
>> > as there's no 'reader' to import.
>> >
>> > I've managed to get over it, but thought it would be bett= er to have a
>> > working example code.
>>
>> I wrote this doc and it was merged into master more than a year ag= o.
>> When writing this doc, I split the `babeltrace` package into the >> `reader` and `writer` subpackages to make the autodocumentation wi= th
>> Sphinx easier. Now it looks like this split was never backported t= o
>> v1.2, v1.3, v1.4, and soon v1.5.
>>
>> The `Babeltrace 1.2.0` version you see on the front page is just t= he
>> current version found when I generated the online version. Really,= the
>> title should say `Babeltrace (master branch)`. The master branch w= ill
>> become Babeltrace 2.0 soon. In the meantime, simply drop the `read= er`
>> subpackage when you read the doc and try examples. So
>>
>>=C2=A0 =C2=A0 =C2=A0import babeltrace.reader as btreader
>>
>>=C2=A0 =C2=A0 =C2=A0trace_collection =3D btreader.TraceCollection()=
>>
>> becomes
>>
>>=C2=A0 =C2=A0 =C2=A0import babeltrace as btreader
>>
>>=C2=A0 =C2=A0 =C2=A0trace_collection =3D btreader.TraceCollection()=
>>
>> For the CTF writer part, drop the `writer` subpackage, and import = the
>> `CTFWriter` class: you'll find all the documented classes with= in this
>> class (kind of weird, and one of the reasons I created a subpackag= e
>> instead):
>>
>>=C2=A0 =C2=A0 =C2=A0import babeltrace.writer as btwriter
>>
>>=C2=A0 =C2=A0 =C2=A0writer =3D btwriter.Writer(trace_path)
>>
>> becomes
>>
>>=C2=A0 =C2=A0 =C2=A0from babeltrace import CTFWriter as btwriter >>
>>=C2=A0 =C2=A0 =C2=A0writer =3D btwriter.Writer(trace_path)
>>
>> Note that the new subpackage split is backward compatible with the=
>> bindings of v1.x, so the code you write now will continue to work.= ..
>> forever.
>>
>> I might add an equivalent of this response as a note in the genera= ted
>> documentation.
>>
>> BR,
>> Phil
>>
>> >
>> > P.S. I'm running RHEL 7.2 with babeltrace-python-1.2.4-1.= el7.x86_64
>> >
>> > Best Regards,
>> > Jean
>> >
>> >
>> > _______________________________________________
>> > lttng-dev mailing list
>> > lttng-dev@lists.= lttng.org
>> > https://lists.lttng.org/cgi-= bin/mailman/listinfo/lttng-dev
>> >
>
>

--047d7bf10a60859ef505402f47ed-- --===============4219971428698823390== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbHR0bmctZGV2 IG1haWxpbmcgbGlzdApsdHRuZy1kZXZAbGlzdHMubHR0bmcub3JnCmh0dHBzOi8vbGlzdHMubHR0 bmcub3JnL2NnaS1iaW4vbWFpbG1hbi9saXN0aW5mby9sdHRuZy1kZXYK --===============4219971428698823390==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Jeanson Subject: Re: Babeltrace python bindings documentation is no up-to-date Date: Mon, 31 Oct 2016 16:54:56 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from mail.efficios.com (mail.efficios.com [167.114.142.141]) by lists.lttng.org (Postfix) with ESMTPS id 91BA8156E2 for ; Mon, 31 Oct 2016 21:04:00 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" To: lttng-dev@lists.lttng.org Cc: Jean Spector List-Id: lttng-dev@lists.lttng.org T24gMjAxNi0xMC0zMSAxNjo0NCwgSmVhbiBTcGVjdG9yIHdyb3RlOgo+IEl0J3MgYSBtYXR0ZXIg b2YgcnBtIGRlcGVuZGVuY2llcy4KPiBPbmNlIGluc3RhbGxlZCwgaXQgbWlnaHQgd29yayBmaW5l IHdpdGggcHl0aG9uIDMuNCAtIGJ1dCB5dW0ganVzdAo+IHJlZnVzZXMgdG8gaW5zdGFsbCBpdCBv biBSSEVMIDcuMgoKUkhFTCA3IGRvZXNuJ3Qgc2hpcCB3aXRoIHB5dGhvbiAzIG91dCBvZiB0aGUg Ym94LCB5b3UnbGwgbmVlZCB0byBnZXQgaXQKZnJvbSBhIHNvZnR3YXJlIGNvbGxlY3Rpb24sIGhh dmUgYSBsb29rIGF0IDoKCiAgaHR0cHM6Ly93d3cuc29mdHdhcmVjb2xsZWN0aW9ucy5vcmcvZW4v c2Nscy9yaHNjbC9weXRob24zMy8KCkNoZWVycywKCk1pY2hhZWwKCl9fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCmx0dG5nLWRldiBtYWlsaW5nIGxpc3QKbHR0 bmctZGV2QGxpc3RzLmx0dG5nLm9yZwpodHRwczovL2xpc3RzLmx0dG5nLm9yZy9jZ2ktYmluL21h aWxtYW4vbGlzdGluZm8vbHR0bmctZGV2Cg== From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Jeanson Subject: Re: Babeltrace python bindings documentation is no up-to-date Date: Mon, 31 Oct 2016 17:34:12 -0400 Message-ID: <5054cd88-f909-0d4a-25b2-affc7906b7cb__7855.49985380403$1477949679$gmane$org@efficios.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from mail.efficios.com (mail.efficios.com [167.114.142.141]) by lists.lttng.org (Postfix) with ESMTPS id 9DA3715722 for ; Mon, 31 Oct 2016 21:34:45 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" To: Jean Spector Cc: lttng-dev@lists.lttng.org List-Id: lttng-dev@lists.lttng.org T24gMjAxNi0xMC0zMSAxNzoyMCwgSmVhbiBTcGVjdG9yIHdyb3RlOgo+IEhpIE1pY2hhZWwsCj4g Cj4gVGhhdCdzIHdoZXJlIEkgZ290IHB5dGhvbjMzIGZyb20gZXZlbnR1YWxseSA6LSkKPiBXaGF0 IEkgY2FsbGVkIG91dC1vZi10aGUtYm94IGlzIGFjdHVhbGx5IEVQRUwuCj4gSSBjb3VsZCBqdXN0 IHJ1biAieXVtIGluc3RhbGwgcHl0aG9uMzQiIG9uIG15IFJIRUwgNy4yICh3aGlsZSB0aGUgc2Ft ZQo+IHdvdWxkbid0IHdvcmsgZm9yIHB5dGhvbjMzKSwgc28gZm9yIG1lIGl0IHdhcyB0aGUgbmF0 dXJhbCB2ZXJzaW9uIHRvIHVzZS4KPiBTb2Z0d2FyZSBDb2xsZWN0aW9ucywgdGhvdWdoLCByZXF1 aXJlZCBhZGRpdGlvbmFsIGdvb2dsaW5nLiBBbHNvLCB0aGV5Cj4gZG9uJ3Qgd29yayBvdXQtb2Yt dGhlLWJveCBhZnRlcndhcmRzIGVpdGhlciwgYXMgeW91IGhhdmUgdG8gZW5hYmxlIHRoZQo+IHNj bCBldmVyeSB0aW1lIGJlZm9yZSB1c2luZyBweXRob24zMy4KClllYWgsIHRoZSBjaG9pY2Ugb2Yg dXNpbmcgc29mdHdhcmUgY29sbGVjdGlvbnMgd2FzIG1hZGUgYmVmb3JlIEkgd2FzCmludm9sdmVk IHdpdGggdGhlIHBhY2thZ2luZyBhbmQgc3dpdGNoaW5nIG5vdyB0byBFUEVMIHdvdWxkIGJyZWFr IHRoaW5ncwpmb3IgY3VycmVudCB1c2Vycy4gSSBndWVzcyBpdCBzaG91bGQgYmUgZG9jdW1lbnRl ZCBzb21ld2hlcmUuCgpNaWNoYWVsCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fXwpsdHRuZy1kZXYgbWFpbGluZyBsaXN0Cmx0dG5nLWRldkBsaXN0cy5sdHRu Zy5vcmcKaHR0cHM6Ly9saXN0cy5sdHRuZy5vcmcvY2dpLWJpbi9tYWlsbWFuL2xpc3RpbmZvL2x0 dG5nLWRldgo= From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Spector Subject: Re: Babeltrace python bindings documentation is no up-to-date Date: Mon, 31 Oct 2016 23:20:42 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5756493199771229154==" Return-path: Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) by lists.lttng.org (Postfix) with ESMTPS id CDBC61570A for ; Mon, 31 Oct 2016 21:21:36 +0000 (UTC) Received: by mail-wm0-x22a.google.com with SMTP id n67so253187405wme.1 for ; Mon, 31 Oct 2016 14:21:04 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" To: Michael Jeanson Cc: lttng-dev@lists.lttng.org List-Id: lttng-dev@lists.lttng.org --===============5756493199771229154== Content-Type: multipart/alternative; boundary=001a114b4378fed29e05402fc859 --001a114b4378fed29e05402fc859 Content-Type: text/plain; charset=UTF-8 Hi Michael, That's where I got python33 from eventually :-) What I called out-of-the-box is actually EPEL. I could just run "yum install python34" on my RHEL 7.2 (while the same wouldn't work for python33), so for me it was the natural version to use. Software Collections, though, required additional googling. Also, they don't work out-of-the-box afterwards either, as you have to enable the scl every time before using python33. On Mon, Oct 31, 2016 at 10:54 PM, Michael Jeanson wrote: > On 2016-10-31 16:44, Jean Spector wrote: > > It's a matter of rpm dependencies. > > Once installed, it might work fine with python 3.4 - but yum just > > refuses to install it on RHEL 7.2 > > RHEL 7 doesn't ship with python 3 out of the box, you'll need to get it > from a software collection, have a look at : > > https://www.softwarecollections.org/en/scls/rhscl/python33/ > > Cheers, > > Michael > > --001a114b4378fed29e05402fc859 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Michael,

That's where I go= t python33 from eventually :-)
What I called out-of-the-box is actually= EPEL.
I could just run "yum install python34" on my RH= EL 7.2 (while the same wouldn't work for python33), so for me it was th= e natural version to use.
Software Collections, though, required = additional googling. Also, they don't work out-of-the-box afterwards ei= ther, as you have to enable the scl every time before using python33.
=




On Mon, Oct 31, 2016 at 10:54 PM, Michael= Jeanson <mjeanson@efficios.com> wrote:
On 2016-10-31 16:44, Jean Spector wrote:=
> It's a matter of rpm dependencies.
> Once installed, it might work fine with python 3.4 - but yum just
> refuses to install it on RHEL 7.2

RHEL 7 doesn't ship with python 3 out of the box, you'll nee= d to get it
from a software collection, have a look at :

=C2=A0 https://www.softwarecollectio= ns.org/en/scls/rhscl/python33/

Cheers,

Michael


--001a114b4378fed29e05402fc859-- --===============5756493199771229154== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbHR0bmctZGV2 IG1haWxpbmcgbGlzdApsdHRuZy1kZXZAbGlzdHMubHR0bmcub3JnCmh0dHBzOi8vbGlzdHMubHR0 bmcub3JnL2NnaS1iaW4vbWFpbG1hbi9saXN0aW5mby9sdHRuZy1kZXYK --===============5756493199771229154==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philippe Proulx Subject: Re: Babeltrace python bindings documentation is no up-to-date Date: Mon, 31 Oct 2016 20:51:30 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from mail-qt0-x231.google.com (mail-qt0-x231.google.com [IPv6:2607:f8b0:400d:c0d::231]) by lists.lttng.org (Postfix) with ESMTPS id 79DD415803 for ; Tue, 1 Nov 2016 00:52:34 +0000 (UTC) Received: by mail-qt0-x231.google.com with SMTP id n6so48880802qtd.1 for ; Mon, 31 Oct 2016 17:52:01 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" To: Jean Spector Cc: "lttng-dev@lists.lttng.org" List-Id: lttng-dev@lists.lttng.org T24gTW9uLCBPY3QgMzEsIDIwMTYgYXQgNDozOCBQTSwgUGhpbGlwcGUgUHJvdWx4CjxlZXBwZWxp dGVsb29wQGdtYWlsLmNvbT4gd3JvdGU6Cj4gT24gTW9uLCBPY3QgMzEsIDIwMTYgYXQgND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lbHRyYWNlLXB5dGhvbi0xLjIuNC0xLmVsNy54ODZfNjQK Pj4+ID4KPj4+ID4gQmVzdCBSZWdhcmRzLAo+Pj4gPiBKZWFuCj4+PiA+Cj4+PiA+Cj4+PiA+IF9f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCj4+PiA+IGx0dG5n LWRldiBtYWlsaW5nIGxpc3QKPj4+ID4gbHR0bmctZGV2QGxpc3RzLmx0dG5nLm9yZwo+Pj4gPiBo dHRwczovL2xpc3RzLmx0dG5nLm9yZy9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vbHR0bmctZGV2 Cj4+PiA+Cj4+Cj4+Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fCmx0dG5nLWRldiBtYWlsaW5nIGxpc3QKbHR0bmctZGV2QGxpc3RzLmx0dG5nLm9yZwpodHRw czovL2xpc3RzLmx0dG5nLm9yZy9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vbHR0bmctZGV2Cg== From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Spector Subject: Re: Babeltrace python bindings documentation is no up-to-date Date: Tue, 1 Nov 2016 07:52:07 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2354207769576224229==" Return-path: Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) by lists.lttng.org (Postfix) with ESMTPS id CF7EE158E9 for ; Tue, 1 Nov 2016 05:52:42 +0000 (UTC) Received: by mail-wm0-x231.google.com with SMTP id n67so267223935wme.1 for ; Mon, 31 Oct 2016 22:52:09 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" To: Philippe Proulx Cc: lttng-dev@lists.lttng.org List-Id: lttng-dev@lists.lttng.org --===============2354207769576224229== Content-Type: multipart/alternative; boundary=001a11468b18c97ff6054036ec2b --001a11468b18c97ff6054036ec2b Content-Type: text/plain; charset=UTF-8 I couldn't reproduce the issues I had when building from source on my VM and don't have a vanilla RHEL 7.2 now to reproduce :-( Regarding documentation, current changes look all right. Adding a note regarding software collections will certainly help. There's another minor issue I see in the docs. They mention the package name on Debian and Ubuntu, but not on RHEL and Fedora - even though there's an rpm available. In any case, thank you very much for your help. -Jean On Nov 1, 2016 02:52, "Philippe Proulx" wrote: > On Mon, Oct 31, 2016 at 4:38 PM, Philippe Proulx > wrote: > > On Mon, Oct 31, 2016 at 4:02 PM, Jean Spector > wrote: > >> Thank you Philippe. > >> > >> Adding a different documentation page for older versions (it's the > latest > >> package on RHEL 7.2 - so I'd expect more newbies to encounter this > issue) > >> could help anyone trying the Python bindings for the first time. > >> I'm sure you realize that trying the official example and failing can be > >> quite frustrating and could turn off potential users. > > > > I'll make sure to make the doc as clear as possible. The main problem > here is > > that the module is simply not Sphinx-documented in Babeltrace 1.x. I > guess > > I could search and replace the package names in the doc before > publishing it. > > I'll find a way to make it clear anyway. > > Jean, > > See again. > > I added an important admonition to each page which at least explains what > to do if you're using Babeltrace 1.x. Plus the indicated version is > now `2.0.0-pre`. > > It should not be so complicated to understand for newcomers. That's the > best > I can do for the moment; writing a different version for Babeltrace > 1.x is out of > the question. > > Phil > > > > >> This is especially > >> true if it comes after other issues(let me know if you'd prefer these > to be > >> sent in separate emails): > >> > >> RHEL 7.2 uses python 3.4, but babeltrace-python-1.2.4 requires python > 3.3, > >> which is not available anymore - at least not out of the box. > > > > What do you mean? The bindings work just fine with Python 3.4 and Python > 3.5. > > > >> Again, I've solved the issue for myself, so it's not a support call. The > >> idea is that it would be great if the initial install+run stage was made > >> less painful. > >> I believe it would increase the user base as, for instance, I was on the > >> verge of giving up after building from source has also failed for me. > >> > >> When trying to build from latest stable source (1.4.0) on RHEL 7.2, I've > >> encountered a couple of issues: > >> > >> configure would fail on popt. "ln -s /usr/lib64/libpopt.so.0 > >> /usr/lib64/libpopt.so" worked around the issue, but there must be a > better > >> way (or a line in the README). > >> "python3 -c 'import babeltrace'" would fail with "ImportError: > >> /usr/local/lib64/python3.4/site-packages/babeltrace/_nativebt.so: > undefined > >> symbol: PyInstance_Type" > >> > >> That's where I gave up trying to build from source. It could be due to > the > >> same python 3.4 - but it's just a guess. > > > > The official channel for reporting bugs is the bug tracker > > . If you create an issue > there, we > > can ask for details about the environment and context and track the bug > to > > remember it. > > > > I have no idea what's going wrong here, but if you create an issue we > > can test the > > same environment (RHEL 7.2) and see if we can reproduce the bug. > > > >> > >> ========== > >> > >> To recap, I see 3 issues here: > >> > >> Documentation - any platform > >> Install of the latest babeltrace-python (1.2.4) - RHEL 7.2 > >> Building from the latest stable source (1.4.0) - RHEL 7.2 > >> > >> > >> In any case, thanks for the great tool. I hope to put it to good use. > >> Jean > > > > Thanks for the feedback! We appreciate. > > > > Phil > > > >> > >> > >> On Mon, Oct 31, 2016 at 7:07 PM, Philippe Proulx < > eeppeliteloop@gmail.com> > >> wrote: > >>> > >>> On Sat, Oct 29, 2016 at 9:55 AM, Jean Spector > >>> wrote: > >>> > When trying to use the example from > >>> > http://diamon.org/babeltrace/docs/python/examples/ (pointed to via > >>> > http://lttng.org/viewers/), the code is not up-to-date. > >>> > > >>> > For instance, the first line in the example (import > babeltrace.reader) > >>> > fails > >>> > as there's no 'reader' to import. > >>> > > >>> > I've managed to get over it, but thought it would be better to have a > >>> > working example code. > >>> > >>> I wrote this doc and it was merged into master more than a year ago. > >>> When writing this doc, I split the `babeltrace` package into the > >>> `reader` and `writer` subpackages to make the autodocumentation with > >>> Sphinx easier. Now it looks like this split was never backported to > >>> v1.2, v1.3, v1.4, and soon v1.5. > >>> > >>> The `Babeltrace 1.2.0` version you see on the front page is just the > >>> current version found when I generated the online version. Really, the > >>> title should say `Babeltrace (master branch)`. The master branch will > >>> become Babeltrace 2.0 soon. In the meantime, simply drop the `reader` > >>> subpackage when you read the doc and try examples. So > >>> > >>> import babeltrace.reader as btreader > >>> > >>> trace_collection = btreader.TraceCollection() > >>> > >>> becomes > >>> > >>> import babeltrace as btreader > >>> > >>> trace_collection = btreader.TraceCollection() > >>> > >>> For the CTF writer part, drop the `writer` subpackage, and import the > >>> `CTFWriter` class: you'll find all the documented classes within this > >>> class (kind of weird, and one of the reasons I created a subpackage > >>> instead): > >>> > >>> import babeltrace.writer as btwriter > >>> > >>> writer = btwriter.Writer(trace_path) > >>> > >>> becomes > >>> > >>> from babeltrace import CTFWriter as btwriter > >>> > >>> writer = btwriter.Writer(trace_path) > >>> > >>> Note that the new subpackage split is backward compatible with the > >>> bindings of v1.x, so the code you write now will continue to work... > >>> forever. > >>> > >>> I might add an equivalent of this response as a note in the generated > >>> documentation. > >>> > >>> BR, > >>> Phil > >>> > >>> > > >>> > P.S. I'm running RHEL 7.2 with babeltrace-python-1.2.4-1.el7.x86_64 > >>> > > >>> > Best Regards, > >>> > Jean > >>> > > >>> > > >>> > _______________________________________________ > >>> > lttng-dev mailing list > >>> > lttng-dev@lists.lttng.org > >>> > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev > >>> > > >> > >> > --001a11468b18c97ff6054036ec2b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

I couldn't reproduce the issues I had when building from= source on my VM and don't have a vanilla RHEL 7.2 now to reproduce :-(=

Regarding documentation, current changes look all right. Add= ing a note regarding software collections will certainly help.

There's another minor issue I see in the docs. They ment= ion the package name on Debian and Ubuntu, but not on RHEL and Fedora - eve= n though there's an rpm available.

In any case, thank you very much for your help.

-Jean


On Nov 1, 2016 02= :52, "Philippe Proulx" <eeppeliteloop@gmail.com> wrote:
On Mon, Oct 31, 2016 at 4:38 PM, Philippe Proulx <eeppeliteloop@gmail.com&= gt; wrote:
> On Mon, Oct 31, 2016 at 4:02 PM, Jean Spector <jean.spector@gmail.com> wrote:
>> Thank you Philippe.
>>
>> Adding a different documentation page for older versions (it's= the latest
>> package on RHEL 7.2 - so I'd expect more newbies to encounter = this issue)
>> could help anyone trying the Python bindings for the first time. >> I'm sure you realize that trying the official example and fail= ing can be
>> quite frustrating and could turn off potential users.
>
> I'll make sure to make the doc as clear as possible. The main prob= lem here is
> that the module is simply not Sphinx-documented in Babeltrace 1.x. I g= uess
> I could search and replace the package names in the doc before publish= ing it.
> I'll find a way to make it clear anyway.

Jean,

See <http://diamon.org/babeltrace/docs/python/&= gt; again.

I added an important admonition to each page which at least explains what to do if you're using Babeltrace 1.x. Plus the indicated version is
now `2.0.0-pre`.

It should not be so complicated to understand for newcomers. That's the= best
I can do for the moment; writing a different version for Babeltrace
1.x is out of
the question.

Phil

>
>> This is especially
>> true if it comes after other issues(let me know if you'd prefe= r these to be
>> sent in separate emails):
>>
>> RHEL 7.2 uses python 3.4, but babeltrace-python-1.2.4 requires pyt= hon 3.3,
>> which is not available anymore - at least not out of the box.
>
> What do you mean? The bindings work just fine with Python 3.4 and Pyth= on 3.5.
>
>> Again, I've solved the issue for myself, so it's not a sup= port call. The
>> idea is that it would be great if the initial install+run stage wa= s made
>> less painful.
>> I believe it would increase the user base as, for instance, I was = on the
>> verge of giving up after building from source has also failed for = me.
>>
>> When trying to build from latest stable source (1.4.0) on RHEL 7.2= , I've
>> encountered a couple of issues:
>>
>> configure would fail on popt. "ln -s /usr/lib64/libpopt.so.0<= br> >> /usr/lib64/libpopt.so" worked around the issue, but there mus= t be a better
>> way (or a line in the README).
>> "python3 -c 'import babeltrace'" would fail with= "ImportError:
>> /usr/local/lib64/python3.4/site-packages/babeltrace/_nat= ivebt.so: undefined
>> symbol: PyInstance_Type"
>>
>> That's where I gave up trying to build from source. It could b= e due to the
>> same python 3.4 - but it's just a guess.
>
> The official channel for reporting bugs is the bug tracker
> <https://bugs.lttng.org/projects/babeltrace/= >. If you create an issue there, we
> can ask for details about the environment and context and track the bu= g to
> remember it.
>
> I have no idea what's going wrong here, but if you create an issue= we
> can test the
> same environment (RHEL 7.2) and see if we can reproduce the bug.
>
>>
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>
>> To recap, I see 3 issues here:
>>
>> Documentation - any platform
>> Install of the latest=C2=A0 babeltrace-python (1.2.4) - RHEL 7.2 >> Building from the latest stable source (1.4.0) - RHEL 7.2
>>
>>
>> In any case, thanks for the great tool. I hope to put it to good u= se.
>> Jean
>
> Thanks for the feedback! We appreciate.
>
> Phil
>
>>
>>
>> On Mon, Oct 31, 2016 at 7:07 PM, Philippe Proulx <eeppeliteloop@gmail.com>
>> wrote:
>>>
>>> On Sat, Oct 29, 2016 at 9:55 AM, Jean Spector <jean.spector@gmail.com>
>>> wrote:
>>> > When trying to use the example from
>>> > http://diamon.org/babeltrace/docs/python/examples/ (pointed to via
>>> > http://lttng.org/viewers/), the code is not up-to-dat= e.
>>> >
>>> > For instance, the first line in the example (import babel= trace.reader)
>>> > fails
>>> > as there's no 'reader' to import.
>>> >
>>> > I've managed to get over it, but thought it would be = better to have a
>>> > working example code.
>>>
>>> I wrote this doc and it was merged into master more than a yea= r ago.
>>> When writing this doc, I split the `babeltrace` package into t= he
>>> `reader` and `writer` subpackages to make the autodocumentatio= n with
>>> Sphinx easier. Now it looks like this split was never backport= ed to
>>> v1.2, v1.3, v1.4, and soon v1.5.
>>>
>>> The `Babeltrace 1.2.0` version you see on the front page is ju= st the
>>> current version found when I generated the online version. Rea= lly, the
>>> title should say `Babeltrace (master branch)`. The master bran= ch will
>>> become Babeltrace 2.0 soon. In the meantime, simply drop the `= reader`
>>> subpackage when you read the doc and try examples. So
>>>
>>>=C2=A0 =C2=A0 =C2=A0import babeltrace.reader as btreader
>>>
>>>=C2=A0 =C2=A0 =C2=A0trace_collection =3D btreader.TraceCollecti= on()
>>>
>>> becomes
>>>
>>>=C2=A0 =C2=A0 =C2=A0import babeltrace as btreader
>>>
>>>=C2=A0 =C2=A0 =C2=A0trace_collection =3D btreader.TraceCollecti= on()
>>>
>>> For the CTF writer part, drop the `writer` subpackage, and imp= ort the
>>> `CTFWriter` class: you'll find all the documented classes = within this
>>> class (kind of weird, and one of the reasons I created a subpa= ckage
>>> instead):
>>>
>>>=C2=A0 =C2=A0 =C2=A0import babeltrace.writer as btwriter
>>>
>>>=C2=A0 =C2=A0 =C2=A0writer =3D btwriter.Writer(trace_path)
>>>
>>> becomes
>>>
>>>=C2=A0 =C2=A0 =C2=A0from babeltrace import CTFWriter as btwrite= r
>>>
>>>=C2=A0 =C2=A0 =C2=A0writer =3D btwriter.Writer(trace_path)
>>>
>>> Note that the new subpackage split is backward compatible with= the
>>> bindings of v1.x, so the code you write now will continue to w= ork...
>>> forever.
>>>
>>> I might add an equivalent of this response as a note in the ge= nerated
>>> documentation.
>>>
>>> BR,
>>> Phil
>>>
>>> >
>>> > P.S. I'm running RHEL 7.2 with babeltrace-python-1.2.= 4-1.el7.x86_64
>>> >
>>> > Best Regards,
>>> > Jean
>>> >
>>> >
>>> > _______________________________________________
>>> > lttng-dev mailing list
>>> > lttng-dev@li= sts.lttng.org
>>> > https://lists.lttng.org/= cgi-bin/mailman/listinfo/lttng-dev
>>> >
>>
>>
--001a11468b18c97ff6054036ec2b-- --===============2354207769576224229== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbHR0bmctZGV2 IG1haWxpbmcgbGlzdApsdHRuZy1kZXZAbGlzdHMubHR0bmcub3JnCmh0dHBzOi8vbGlzdHMubHR0 bmcub3JnL2NnaS1iaW4vbWFpbG1hbi9saXN0aW5mby9sdHRuZy1kZXYK --===============2354207769576224229==--