<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 31, 2016 at 10:38 PM, Philippe Proulx <span dir="ltr"><<a href="mailto:eeppeliteloop@gmail.com" target="_blank">eeppeliteloop@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Oct 31, 2016 at 4:02 PM, Jean Spector <<a href="mailto:jean.spector@gmail.com">jean.spector@gmail.com</a>> wrote:<br>
> Thank you Philippe.<br>
><br>
> Adding a different documentation page for older versions (it's the latest<br>
> package on RHEL 7.2 - so I'd expect more newbies to encounter this issue)<br>
> could help anyone trying the Python bindings for the first time.<br>
> I'm sure you realize that trying the official example and failing can be<br>
> quite frustrating and could turn off potential users.<br>
<br>
</span>I'll make sure to make the doc as clear as possible. The main problem here is<br>
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 it.<br>
I'll find a way to make it clear anyway.<br></blockquote><div>Thank you </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> This is especially<br>
> true if it comes after other issues(let me know if you'd prefer these to be<br>
> sent in separate emails):<br>
><br>
> RHEL 7.2 uses python 3.4, but babeltrace-python-1.2.4 requires python 3.3,<br>
> which is not available anymore - at least not out of the box.<br>
<br>
</span>What do you mean? The bindings work just fine with Python 3.4 and Python 3.5.<br></blockquote><div>It's a matter of rpm dependencies.</div><div>Once installed, it might work fine with python 3.4 - but yum just refuses to install it on RHEL 7.2</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> Again, I've solved the issue for myself, so it's not a support call. The<br>
> idea is that it would be great if the initial install+run stage was made<br>
> less painful.<br>
> I believe it would increase the user base as, for instance, I was on the<br>
> verge of giving up after building from source has also failed for me.<br>
><br>
> When trying to build from latest stable source (1.4.0) on RHEL 7.2, I've<br>
> encountered a couple of issues:<br>
><br>
> configure would fail on popt. "ln -s /usr/lib64/libpopt.so.0<br>
> /usr/lib64/libpopt.so" worked around the issue, but there must be a better<br>
> way (or a line in the README).<br>
> "python3 -c 'import babeltrace'" would fail with "ImportError:<br>
> /usr/local/lib64/python3.4/<wbr>site-packages/babeltrace/_<wbr>nativebt.so: undefined<br>
> symbol: PyInstance_Type"<br>
><br>
> That's where I gave up trying to build from source. It could be due to the<br>
> same python 3.4 - but it's just a guess.<br>
<br>
</span>The official channel for reporting bugs is the bug tracker<br>
<<a href="https://bugs.lttng.org/projects/babeltrace/" rel="noreferrer" target="_blank">https://bugs.lttng.org/<wbr>projects/babeltrace/</a>>. If you create an issue there, we<br>
can ask for details about the environment and context and track the bug to<br>
remember it.<br>
<br>
I have no idea what's going wrong here, but if you create an issue we<br>
can test the<br>
same environment (RHEL 7.2) and see if we can reproduce the bug.<br>
<span class=""><br></span></blockquote><div>Will do</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
><br>
> ==========<br>
><br>
> To recap, I see 3 issues here:<br>
><br>
> Documentation - any platform<br>
> Install of the latest babeltrace-python (1.2.4) - RHEL 7.2<br>
> Building from the latest stable source (1.4.0) - RHEL 7.2<br>
><br>
><br>
> In any case, thanks for the great tool. I hope to put it to good use.<br>
> Jean<br>
<br>
</span>Thanks for the feedback! We appreciate.<br>
<br>
Phil<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
><br>
> On Mon, Oct 31, 2016 at 7:07 PM, Philippe Proulx <<a href="mailto:eeppeliteloop@gmail.com">eeppeliteloop@gmail.com</a>><br>
> wrote:<br>
>><br>
>> On Sat, Oct 29, 2016 at 9:55 AM, Jean Spector <<a href="mailto:jean.spector@gmail.com">jean.spector@gmail.com</a>><br>
>> wrote:<br>
>> > When trying to use the example from<br>
>> > <a href="http://diamon.org/babeltrace/docs/python/examples/" rel="noreferrer" target="_blank">http://diamon.org/babeltrace/<wbr>docs/python/examples/</a> (pointed to via<br>
>> > <a href="http://lttng.org/viewers/" rel="noreferrer" target="_blank">http://lttng.org/viewers/</a>), the code is not up-to-date.<br>
>> ><br>
>> > For instance, the first line in the example (import babeltrace.reader)<br>
>> > fails<br>
>> > as there's no 'reader' to import.<br>
>> ><br>
>> > I've managed to get over it, but thought it would be better to have a<br>
>> > working example code.<br>
>><br>
>> I wrote this doc and it was merged into master more than a year ago.<br>
>> When writing this doc, I split the `babeltrace` package into the<br>
>> `reader` and `writer` subpackages to make the autodocumentation with<br>
>> Sphinx easier. Now it looks like this split was never backported to<br>
>> v1.2, v1.3, v1.4, and soon v1.5.<br>
>><br>
>> The `Babeltrace 1.2.0` version you see on the front page is just the<br>
>> current version found when I generated the online version. Really, the<br>
>> title should say `Babeltrace (master branch)`. The master branch will<br>
>> become Babeltrace 2.0 soon. In the meantime, simply drop the `reader`<br>
>> subpackage when you read the doc and try examples. So<br>
>><br>
>> import babeltrace.reader as btreader<br>
>><br>
>> trace_collection = btreader.TraceCollection()<br>
>><br>
>> becomes<br>
>><br>
>> import babeltrace as btreader<br>
>><br>
>> trace_collection = btreader.TraceCollection()<br>
>><br>
>> For the CTF writer part, drop the `writer` subpackage, and import the<br>
>> `CTFWriter` class: you'll find all the documented classes within this<br>
>> class (kind of weird, and one of the reasons I created a subpackage<br>
>> instead):<br>
>><br>
>> import babeltrace.writer as btwriter<br>
>><br>
>> writer = btwriter.Writer(trace_path)<br>
>><br>
>> becomes<br>
>><br>
>> from babeltrace import CTFWriter as btwriter<br>
>><br>
>> writer = btwriter.Writer(trace_path)<br>
>><br>
>> Note that the new subpackage split is backward compatible with the<br>
>> bindings of v1.x, so the code you write now will continue to work...<br>
>> forever.<br>
>><br>
>> I might add an equivalent of this response as a note in the generated<br>
>> documentation.<br>
>><br>
>> BR,<br>
>> Phil<br>
>><br>
>> ><br>
>> > P.S. I'm running RHEL 7.2 with babeltrace-python-1.2.4-1.el7.<wbr>x86_64<br>
>> ><br>
>> > Best Regards,<br>
>> > Jean<br>
>> ><br>
>> ><br>
>> > ______________________________<wbr>_________________<br>
>> > lttng-dev mailing list<br>
>> > <a href="mailto:lttng-dev@lists.lttng.org">lttng-dev@lists.lttng.org</a><br>
>> > <a href="https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" rel="noreferrer" target="_blank">https://lists.lttng.org/cgi-<wbr>bin/mailman/listinfo/lttng-dev</a><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div></div>