pcp
[Top] [All Lists]

Broken without python3-pcp and libpcp-import1 on Xenial

To: pcp@xxxxxxxxxxx
Subject: Broken without python3-pcp and libpcp-import1 on Xenial
From: Jamie Bainbridge <jamie.bainbridge@xxxxxxxxx>
Date: Sat, 18 Jun 2016 09:52:15 +1000
Delivered-to: pcp@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=DxRRoBCbzlCnmDYJrVOnosDOvPNhrsex5niV6Ixd5I4=; b=GBcVSOAA9oZZfL8/oTIURnS/8uVzQqHGMX0ixepNpwjLvqAWsxWld7zkfP/Oyhgvb9 VR687hz6XkZM5RhrpKda4p+EOFgFLDNIkhTcCZ3EQD0g8ye+3PvC8oR0UwtVamKP8/MD rKO6QBKCYlP5ZAmyOZiuCv+I21zCVbzklg4WG0o+ts5T5kT3sCOEVeVlLa2o2+FSYrx0 WAGbqiCk9UmKgst0rR/CtwxRJ243FcF+tSZu+zN1dsKGhvY2mtIJNjZVeNaNZMtAkM/b Fnhb+JW7iszOTy8T0mOxtS18oJqwdgP+XwbBl6ARiMYZCDxIJ2ByQBh+h6lcqvbahgqA 0xoQ==
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'

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.

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.

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?

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.

This Depends line seems to need "libpcp-import1" added to it as well.

Any guidance appreciated?

Jamie

[1] https://www.debian.org/doc/debian-policy/ch-relationships.html

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