Closed barracuda156 closed 8 months ago
Sergey also filed this with MacPorts where he noted that it builds fine on macOS 10.13 and later, but not on 10.12 and earlier. This suggested to me that maybe some system header that is automatically included on 10.13 and later that provides the definition of u_char
needed to be included manually.
I found that old macOS system headers have a bug that net/if_df.h does not include sys/types.h, but net/if.h does, so including that headers before, rather than after, net/if_dl.h works around the problem; I submitted a PR for that.
More generally, following the convention of including system headers in alphabetical order should minimize these kinds of problems.
There are further build failures on old macOS systems after fixing this. I'll investigate and report that separately.
@ryandesign @giampaolo I see in notes elsewhere https://github.com/sahlberg/libnfs/commit/381883da909ffb68b599bf83bc47d90e6b40f6cd that sys/socket.h
must be included before net/if.h
, so the fix above might not have been correct: https://github.com/giampaolo/psutil/pull/2361/files
Though py-psutil
5.9.8 builds fine for me on 10.6, I just checked.
5.9.7 fails to build now on multiple systems.
On buildbots with clang,
x86_64
:Locally with gcc, on
ppc
:It does something strange. First of all, Xcode is installed. Then, why it needs Xcode at all? Finally, something got badly broken with headers, apparently. 5.9.5 built fine.