pcp
[Top] [All Lists]

Re: [pcp] Broken without python3-pcp and libpcp-import1 on Xenial

To: Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: [pcp] Broken without python3-pcp and libpcp-import1 on Xenial
From: Jamie Bainbridge <jamie.bainbridge@xxxxxxxxx>
Date: Fri, 1 Jul 2016 11:30:25 +1000
Cc: pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xguJbLGnBC3JVXt1GzIJTYc7eaZuQMvHpKWclWetS3A=; b=F1VpfD5uHVZ/Yb/qoDO+3taQI7caN5je5hUfrp9gOrI0K/snCkmeWa8QmnogYxtXBc hzXPwpmGaJGrVaq8W67ACl5baLQYnn1yOYHm+gz31TTUwUAgNpy3QHAq1zEzzW2YZpRQ Qt2x7HCbDdk2VS3FOsiUfH7tuop4Gd64t4vBBZjiJ4DZTD74ByTPbTNlrGZovM/Yg2iz KFQPioqswk8SpsvXQkFOn1HLh8VUdPHinzwSufL3wH9KOrgTKfNBHI/ECzcHKCxQXZQD QcUatZYkd0wyeCn1PoZblmJX4EK/CgtMZGCNYJ0r1LpP62j8eD05w1OtkkdheEGl4Q11 bejg==
In-reply-to: <1665953851.71677.1466396014860.JavaMail.zimbra@xxxxxxxxxx>
References: <CAAvyFNh0zzMwG2QOUaOJBhXECP_T1_21-V9J14W+g18a4DVfLA@xxxxxxxxxxxxxx> <1665953851.71677.1466396014860.JavaMail.zimbra@xxxxxxxxxx>
On 20 June 2016 at 14:13, Nathan Scott <nathans@xxxxxxxxxx> wrote:
> Hi Jamie,
>
> ----- Original Message -----
>> Install PCP:
>>
>> $ echo "deb https://dl.bintray.com/pcp/xenial xenial main" | sudo tee
>> -a /etc/apt/sources.list
>> $ sudo apt-get update
>> $ sudo apt-get install pcp pcp-gui pcp-doc python-pcp
>>
>> I think Xenial defaults to Python 3, so we get:
>>
>> $ pmrep network.interface.in.bytes
>> Traceback (most recent call last):
>>   File "/usr/bin/pmrep", line 65, in <module>
>>     from pcp import pmapi, pmi
>> ImportError: No module named 'pcp'
>>
>
> (yep, a relatively new missing dependency, as you found later)
>
>> Install the Python 3 bindings and try again:
>>
>> $ sudo apt-get install python3-pcp
>>
>> $ pmrep network.interface.in.bytes
>> Traceback (most recent call last):
>>   File "/usr/bin/pmrep", line 65, in <module>
>>     from pcp import pmapi, pmi
>>   File "/usr/lib/python3/dist-packages/pcp/pmi.py", line 66, in <module>
>>     LIBPCP_IMPORT.pmiDump.restype = None
>>   File "/usr/lib/python3.5/ctypes/__init__.py", line 360, in __getattr__
>>     func = self.__getitem__(name)
>>   File "/usr/lib/python3.5/ctypes/__init__.py", line 365, in __getitem__
>>     func = self._FuncPtr((name_or_ordinal, self))
>> AttributeError: python3: undefined symbol: pmiDump
>>
>> pmiostat still works when in this state.
>
> Yeah, just pmrep needs this module.
>
>> Install some random things which sound about right :)
>
> :)
>
>> $ sudo apt-get install libpcp-import1
>>
>> Now the original command works fine:
>>
>> $ pmrep network.interface.in.bytes
>>
>> Removing python3-pcp breaks it with "ImportError: No module named 'pcp'"
>> again.
>
> Ugh, new problem there.  :(
>
>> I'm not sure how to fix this. Reading "Declaring relationships between
>> packages" [1] I see debian/control.master contains:
>>
>> Package: pcp
>> Depends: ..., python-pcp | python3-pcp, python | python3
>>
>> Is this a preferential order? Like it prefers "python,python-pcp" over
>> "python3,python3-pcp"? Would reversing this order make it so that
>> "python3" is preferred over "python" and would install "python3-pcp"
>> where "python3" is installed?
>
> +1  ... yes, that'd work, & we've used that approach before for readline.
>
>> Debian Jessie and Ubuntu Xenial are making Python 3 the default so
>> will have "python3" installed. Older releases without "python3" should
>> fall back to "python-pcp" I guess.
>
> *nod*
>
>> This Depends line seems to need "libpcp-import1" added to it as well.
>
> Yep, will do.
>
>> Any guidance appreciated?
>
> Looks like you've got it sorted out Jamie.  :)  I'll push through your
> suggested fixes shortly, let us know how they go when that arrives?

Sorry for the delay. Testing dependencies manually with "dpkg -i"
seems to work fine. Python3 packages are preferred in the desired
order, and the dependency to libpcp-import1 is there too. Thank you!

Jamie

<Prev in Thread] Current Thread [Next in Thread>