-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Build issue in 5.9.2/5.9.3. No speed_hi in struct ethtool_cmd #2164
Comments
I guess get_ethtool_macro function needs to be extended in setup.py to check for speed_hi member? |
This was likely introduced in d4eea1f. Adjusting this to work on CentOS 5 and keeping the bugfix added by d4eea1f is difficult. That would require a pre-processor check as in (pseudo code): #ifdef CENTOS_5
... // ignore speed_hi
#else
...
#endif ...which would theoretically fix this problem if psutil is compiled from sources, but since we distribute binaries pip would probably still download binaries rather than the sources (although I'm not 100% sure) and fail. I took a look at https://en.wikipedia.org/wiki/CentOS. CentOS 5 was released in 2007 and support ended in 2017. Considering it's that ancient I'm keen on dropping support and closing this the ticket as "won't fix". As a middle ground we may document this in the doc (https://psutil.readthedocs.io/en/latest/#platforms-support-history) so that people on CentOS 5 know that they can still use version 5.9.1. But just out of curiosity, can you paste the full output of |
Thanks for looking into this and I agree that it is probably not worth the effort. Maybe I should finally kill CentOS 5 from my pool of test servers :-) I did some digging and speed_hi was introduced with Linux kernel 2.6.27 : https://elixir.bootlin.com/linux/v2.6.27/source/include/linux/ethtool.h The output from psutil install:
|
Mmm ok. |
Works like a charm. Thanks a lot. |
You're welcome. Out of curiosity, can you run |
Not quite sure what is going on here:
|
|
Ok, here we go. This is running in a CentOS 5 container:
|
Not bad. Most (all) of these are test adjustments which would need fixing on centos 5, but they don't mean the underlying functionality is broken. CentOS 5 appears fully supported. |
* 'master' of https://github.com/giampaolo/psutil: fix: long-description on Windows (giampaolo#2168) GH actions: update actions' deps to latest version use argparse module in 3 scripts/internal scripts setup.py: provide better err msg if can't compile giampaolo#2164: fix compilation failures on linux < 2.6.27 / CentOS 5 (giampaolo#2171)
Summary
Description
On CentOS 5 (yes, I know it's old) ethtool.h does not have speed_hi in struct ethtool_cmd and it also does not have the inline function ethtool_cmd_speed.
On 5.9.2 I get:
On 5.9.3 I get:
Version 5.9.1 is fine.
Thanks
The text was updated successfully, but these errors were encountered: