psutil won't build on FreeBSD 12

I'm the author of psutil Python module. It seems new FreeBSD 12 broke backward compatibilty pretty badly (output in attachment). I notice there are things which are completely missing as I can't find them under /usr/include such as:

error: no member named 'xt_socket' in 'struct xtcpcb'
error: no member named 'xt_tp' in 'struct xtcpcb'
error: no member named 'xi_inp' in 'struct xinpcb'

I'm not sure how to proceed. FYI all errors originates from a C files which retrieves system-wide and per-process connections similarly to netstat command:

Any advice?


  • xxx.txt
    10.5 KB · Views: 272
Well, FreeBSD 12 is still in development stages so there's no guarantee at all that things actually work. My advice would be to stick to the latest officially supported release (FreeBSD 11) and start worrying about this when there's something to worry about. In my opinion the upcoming FreeBSD 11.1 is a much more important target for now.

This could become a concern once FreeBSD 12 hits the release candidate stages or something. But always remember that there's no guarantee at all that something will actually work on a developers snapshot, especially not in the middle of development and experimentations.


Instead of CURRENT why not track STABLE instead?
> The good news is that someone patched the sysutils/py-psutil port already for this. See :)

Thanks for finding this out. It makes me a bit sad though, as it'd be way better to integrate these kind of changes in psutil code.

Well hopefully, once FreeBSD 12 is more stable, whoever made the changes will make an effort to try and get their changes merged upstream. It's almost always better to get support merged upstream than maintaining a fork.