giampaolo / psutil

Cross-platform lib for process and system monitoring in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Linux] Failing to compile latest version on on lder compiler

arossert opened this issue · comments

Summary

  • OS: Ubuntu
  • Architecture: 64bit
  • Psutil version: 5.9.7
  • Python version: 3.8.10
  • Type: Installation

Description

Trying to build the latest version on an older compiler fails on this error

      psutil/_psutil_linux.c: In function 'PyInit__psutil_linux':
      psutil/_psutil_linux.c:79:56: error: 'DUPLEX_UNKNOWN' undeclared (first use in this function)
           if (PyModule_AddIntConstant(mod, "DUPLEX_UNKNOWN", DUPLEX_UNKNOWN)) INITERR;
                                                              ^
      psutil/_psutil_linux.c:79:56: note: each undeclared identifier is reported only once for each function it appears in
      psutil could not be installed from sources. Perhaps Python header files are not installed. Try running:
        sudo apt-get install gcc python3-dev
      error: command '/usr/bin/gcc' failed with exit code 1

Looking at the diff it seems that this commit removed the needed DUPLEX_UNKNOWN in psutil/_psutil_linux.c

#ifndef DUPLEX_UNKNOWN
    #define DUPLEX_UNKNOWN 0xff
#endif

Found an older ticket on the same issue #2156

Created a PR for this issue #2346

Thank you. Merged.

Thanks, any estimation on new release?