giampaolo / psutil

Cross-platform lib for process and system monitoring in Python
BSD 3-Clause "New" or "Revised" License
10.3k stars 1.39k forks source link

[macOS] build failure on OS X 10.4 #2424

Closed sevan closed 5 months ago

sevan commented 5 months ago

Summary

OS: OS X 10.4 Architecture: PowerPC Psutil version: latest git clone Python version: 3.10.14 Type: core

Description

psutil/arch/osx/mem.c: In function ‘psutil_virtual_mem’:
psutil/arch/osx/mem.c:76: error: ‘vm_statistics_data_t’ has no member named ‘speculative_count’

Removing line 76 from mem.c just to move forward with the build then fails compiling proc.c

psutil/arch/osx/proc.c:20:21: error: libproc.h: No such file or directory
psutil/arch/osx/proc.c:21:27: error: sys/proc_info.h: No such file or directory
psutil/arch/osx/proc.c:29:32: error: mach/shared_region.h: No such file or directory
psutil/arch/osx/proc.c: In function ‘psutil_proc_list_fds’:
psutil/arch/osx/proc.c:279: error: ‘PROC_PIDLISTFDS’ undeclared (first use in this function)
psutil/arch/osx/proc.c:279: error: (Each undeclared identifier is reported only once
psutil/arch/osx/proc.c:279: error: for each function it appears in.)
psutil/arch/osx/proc.c:288: error: ‘PROC_PIDLISTFD_SIZE’ undeclared (first use in this function)
psutil/arch/osx/proc.c: In function ‘psutil_proc_pidtaskinfo_oneshot’:
psutil/arch/osx/proc.c:442: error: storage size of ‘pti’ isn’t known
psutil/arch/osx/proc.c:448: error: ‘PROC_PIDTASKINFO’ undeclared (first use in this function)
psutil/arch/osx/proc.c: In function ‘psutil_proc_cwd’:
psutil/arch/osx/proc.c:501: error: storage size of ‘pathinfo’ isn’t known
psutil/arch/osx/proc.c:507: error: ‘PROC_PIDVNODEPATHINFO’ undeclared (first use in this function)
psutil/arch/osx/proc.c: In function ‘psutil_in_shared_region’:
psutil/arch/osx/proc.c:560: error: ‘CPU_TYPE_ARM’ undeclared (first use in this function)
psutil/arch/osx/proc.c:561: error: ‘SHARED_REGION_BASE_ARM’ undeclared (first use in this function)
psutil/arch/osx/proc.c:562: error: ‘SHARED_REGION_SIZE_ARM’ undeclared (first use in this function)
psutil/arch/osx/proc.c:565: error: ‘SHARED_REGION_BASE_I386’ undeclared (first use in this function)
psutil/arch/osx/proc.c:566: error: ‘SHARED_REGION_SIZE_I386’ undeclared (first use in this function)
psutil/arch/osx/proc.c:569: error: ‘SHARED_REGION_BASE_X86_64’ undeclared (first use in this function)
psutil/arch/osx/proc.c:570: error: ‘SHARED_REGION_SIZE_X86_64’ undeclared (first use in this function)
psutil/arch/osx/proc.c: In function ‘psutil_proc_open_files’:
psutil/arch/osx/proc.c:776: error: storage size of ‘vi’ isn’t known
psutil/arch/osx/proc.c:796: error: invalid use of undefined type ‘struct proc_fdinfo’
psutil/arch/osx/proc.c:796: error: dereferencing pointer to incomplete type
psutil/arch/osx/proc.c:798: error: dereferencing pointer to incomplete type
psutil/arch/osx/proc.c:798: error: ‘PROX_FDTYPE_VNODE’ undeclared (first use in this function)
psutil/arch/osx/proc.c:801: error: dereferencing pointer to incomplete type
psutil/arch/osx/proc.c:802: error: ‘PROC_PIDFDVNODEPATHINFO’ undeclared (first use in this function)
psutil/arch/osx/proc.c:828: error: dereferencing pointer to incomplete type
psutil/arch/osx/proc.c: In function ‘psutil_proc_net_connections’:
psutil/arch/osx/proc.c:867: error: storage size of ‘si’ isn’t known
psutil/arch/osx/proc.c:900: error: invalid use of undefined type ‘struct proc_fdinfo’
psutil/arch/osx/proc.c:900: error: dereferencing pointer to incomplete type
psutil/arch/osx/proc.c:902: error: dereferencing pointer to incomplete type
psutil/arch/osx/proc.c:902: error: ‘PROX_FDTYPE_SOCKET’ undeclared (first use in this function)
psutil/arch/osx/proc.c:904: error: dereferencing pointer to incomplete type
psutil/arch/osx/proc.c:905: error: ‘PROC_PIDFDSOCKETINFO’ undeclared (first use in this function)
psutil/arch/osx/proc.c:938: error: dereferencing pointer to incomplete type
giampaolo commented 5 months ago

Mmmm too many symbols are missing. I'm afraid we cannot support this macOS version. According to wikipedia it was released on 2005 (19 years ago). That's way to old (older than psutil itself, which is 15 yo =)).