Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
arossert opened this issue Dec 22, 2023 · 3 comments
Closed

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

arossert opened this issue Dec 22, 2023 · 3 comments

Comments

@arossert
Copy link
Contributor

arossert commented Dec 22, 2023

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

@arossert
Copy link
Contributor Author

Created a PR for this issue #2346

@giampaolo
Copy link
Owner

Thank you. Merged.

@arossert
Copy link
Contributor Author

Thanks, any estimation on new release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants