Sorry if I seem a little dense... but I am really confused. OK, so Python is trying to use the same compiler version that it was compiled with itself. First question: How do I know which version that is? Is that the gcc-4.0 version that it is trying to run?
Secondly, you said I should be running the XCode gcc. How do I know which version that is?
So I did
ingrid$ which gcc
/usr/bin/gcc
and looked into /usr/bin. It turned out that /usr/bin/gcc was a link to /usr/bin/gcc-4.0. The other version I saw installed there was gcc-4.2. So I changed the gcc link to point at gcc-4.2
ingrid$ ls -l /usr/bin/gcc*
lrwxr-xr-x 1 root wheel 7 Nov 22 16:38 /usr/bin/gcc -> gcc-4.2
-rwxr-xr-x 1 root wheel 93088 Sep 26 2008 /usr/bin/gcc-4.0
-rwxr-xr-x 1 root wheel 105680 Oct 1 2008 /usr/bin/gcc-4.2
, set the environment variables CC and ARCHFLAGS as suggested in the linked article, and ran setup.py again. Unfortunately, I now get a new list of error messages:
ingridpc:psutil-1.1.3 ingrid$ export CC=gcc-4.2
ingridpc:psutil-1.1.3 ingrid$ export ARCHFLAGS='-arch i386 -arch x86_64'
ingridpc:psutil-1.1.3 ingrid$ python setup.py install
running install
running bdist_egg
running egg_info
writing psutil.egg-info/PKG-INFO
writing top-level names to psutil.egg-info/top_level.txt
writing dependency_links to psutil.egg-info/dependency_links.txt
reading manifest file 'psutil.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'psutil.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.3-fat/egg
running install_lib
running build_py
running build_ext
building '_psutil_osx' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c psutil/_psutil_osx.c -o build/temp.macosx-10.3-fat-2.7/psutil/_psutil_osx.o
In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4,
from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85,
from psutil/_psutil_osx.c:9:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
psutil/_psutil_osx.c:18:21: error: libproc.h: No such file or directory
psutil/_psutil_osx.c:19:27: error: sys/proc_info.h: No such file or directory
psutil/_psutil_osx.c:32:32: error: mach/shared_region.h: No such file or directory
In file included from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16,
from psutil/_psutil_osx.c:36:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/float.h:8:24: error: float.h: No such file or directory
psutil/_psutil_osx.c: In function ‘get_process_cwd’:
psutil/_psutil_osx.c:139: error: storage size of ‘pathinfo’ isn’t known
psutil/_psutil_osx.c:145: error: ‘PROC_PIDVNODEPATHINFO’ undeclared (first use in this function)
psutil/_psutil_osx.c:145: error: (Each undeclared identifier is reported only once
psutil/_psutil_osx.c:145: error: for each function it appears in.)
psutil/_psutil_osx.c:139: warning: unused variable ‘pathinfo’
psutil/_psutil_osx.c: In function ‘get_process_exe’:
psutil/_psutil_osx.c:167: warning: implicit declaration of function ‘proc_pidpath’
psutil/_psutil_osx.c: In function ‘get_process_memory_maps’:
psutil/_psutil_osx.c:337: warning: format ‘%016lx’ expects type ‘long unsigned int’, but argument 3 has type ‘vm_address_t’
psutil/_psutil_osx.c:337: warning: format ‘%016lx’ expects type ‘long unsigned int’, but argument 4 has type ‘vm_address_t’
psutil/_psutil_osx.c:346: warning: implicit declaration of function ‘proc_regionfilename’
psutil/_psutil_osx.c: In function ‘get_process_cpu_times’:
psutil/_psutil_osx.c:452: error: storage size of ‘pti’ isn’t known
psutil/_psutil_osx.c:456: error: ‘PROC_PIDTASKINFO’ undeclared (first use in this function)
psutil/_psutil_osx.c:452: warning: unused variable ‘pti’
psutil/_psutil_osx.c: In function ‘get_process_memory_info’:
psutil/_psutil_osx.c:491: error: storage size of ‘pti’ isn’t known
psutil/_psutil_osx.c:495: error: ‘PROC_PIDTASKINFO’ undeclared (first use in this function)
psutil/_psutil_osx.c:491: warning: unused variable ‘pti’
psutil/_psutil_osx.c: In function ‘get_process_num_threads’:
psutil/_psutil_osx.c:521: error: storage size of ‘pti’ isn’t known
psutil/_psutil_osx.c:525: error: ‘PROC_PIDTASKINFO’ undeclared (first use in this function)
psutil/_psutil_osx.c:521: warning: unused variable ‘pti’
psutil/_psutil_osx.c: In function ‘get_process_num_ctx_switches’:
psutil/_psutil_osx.c:539: error: storage size of ‘pti’ isn’t known
psutil/_psutil_osx.c:543: error: ‘PROC_PIDTASKINFO’ undeclared (first use in this function)
psutil/_psutil_osx.c:539: warning: unused variable ‘pti’
psutil/_psutil_osx.c: In function ‘get_disk_partitions’:
psutil/_psutil_osx.c:762: warning: implicit declaration of function ‘getfsstat’
psutil/_psutil_osx.c:762: error: ‘MNT_NOWAIT’ undeclared (first use in this function)
psutil/_psutil_osx.c:769: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:786: error: invalid use of undefined type ‘struct statfs’
psutil/_psutil_osx.c:786: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:789: error: ‘MNT_RDONLY’ undeclared (first use in this function)
psutil/_psutil_osx.c:793: error: ‘MNT_SYNCHRONOUS’ undeclared (first use in this function)
psutil/_psutil_osx.c:795: error: ‘MNT_NOEXEC’ undeclared (first use in this function)
psutil/_psutil_osx.c:797: error: ‘MNT_NOSUID’ undeclared (first use in this function)
psutil/_psutil_osx.c:799: error: ‘MNT_UNION’ undeclared (first use in this function)
psutil/_psutil_osx.c:801: error: ‘MNT_ASYNC’ undeclared (first use in this function)
psutil/_psutil_osx.c:803: error: ‘MNT_EXPORTED’ undeclared (first use in this function)
psutil/_psutil_osx.c:805: error: ‘MNT_QUARANTINE’ undeclared (first use in this function)
psutil/_psutil_osx.c:807: error: ‘MNT_LOCAL’ undeclared (first use in this function)
psutil/_psutil_osx.c:809: error: ‘MNT_QUOTA’ undeclared (first use in this function)
psutil/_psutil_osx.c:811: error: ‘MNT_ROOTFS’ undeclared (first use in this function)
psutil/_psutil_osx.c:813: error: ‘MNT_DOVOLFS’ undeclared (first use in this function)
psutil/_psutil_osx.c:815: error: ‘MNT_DONTBROWSE’ undeclared (first use in this function)
psutil/_psutil_osx.c:817: error: ‘MNT_IGNORE_OWNERSHIP’ undeclared (first use in this function)
psutil/_psutil_osx.c:819: error: ‘MNT_AUTOMOUNTED’ undeclared (first use in this function)
psutil/_psutil_osx.c:821: error: ‘MNT_JOURNALED’ undeclared (first use in this function)
psutil/_psutil_osx.c:823: error: ‘MNT_NOUSERXATTR’ undeclared (first use in this function)
psutil/_psutil_osx.c:825: error: ‘MNT_DEFWRITE’ undeclared (first use in this function)
psutil/_psutil_osx.c:827: error: ‘MNT_MULTILABEL’ undeclared (first use in this function)
psutil/_psutil_osx.c:829: error: ‘MNT_NOATIME’ undeclared (first use in this function)
psutil/_psutil_osx.c:831: error: ‘MNT_UPDATE’ undeclared (first use in this function)
psutil/_psutil_osx.c:833: error: ‘MNT_RELOAD’ undeclared (first use in this function)
psutil/_psutil_osx.c:835: error: ‘MNT_FORCE’ undeclared (first use in this function)
psutil/_psutil_osx.c:837: error: ‘MNT_CMDFLAGS’ undeclared (first use in this function)
psutil/_psutil_osx.c:840: error: invalid use of undefined type ‘struct statfs’
psutil/_psutil_osx.c:840: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:841: error: invalid use of undefined type ‘struct statfs’
psutil/_psutil_osx.c:841: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:842: error: invalid use of undefined type ‘struct statfs’
psutil/_psutil_osx.c:842: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c: In function ‘get_process_open_files’:
psutil/_psutil_osx.c:1007: error: storage size of ‘vi’ isn’t known
psutil/_psutil_osx.c:1019: warning: implicit declaration of function ‘proc_pidinfo’
psutil/_psutil_osx.c:1019: error: ‘PROC_PIDLISTFDS’ undeclared (first use in this function)
psutil/_psutil_osx.c:1039: error: ‘PROC_PIDLISTFD_SIZE’ undeclared (first use in this function)
psutil/_psutil_osx.c:1043: error: invalid use of undefined type ‘struct proc_fdinfo’
psutil/_psutil_osx.c:1043: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1045: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1045: error: ‘PROX_FDTYPE_VNODE’ undeclared (first use in this function)
psutil/_psutil_osx.c:1047: warning: implicit declaration of function ‘proc_pidfdinfo’
psutil/_psutil_osx.c:1048: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1049: error: ‘PROC_PIDFDVNODEPATHINFO’ undeclared (first use in this function)
psutil/_psutil_osx.c:1074: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1007: warning: unused variable ‘vi’
psutil/_psutil_osx.c: In function ‘get_process_connections’:
psutil/_psutil_osx.c:1126: error: storage size of ‘si’ isn’t known
psutil/_psutil_osx.c:1151: error: ‘PROC_PIDLISTFDS’ undeclared (first use in this function)
psutil/_psutil_osx.c:1168: error: ‘PROC_PIDLISTFD_SIZE’ undeclared (first use in this function)
psutil/_psutil_osx.c:1175: error: invalid use of undefined type ‘struct proc_fdinfo’
psutil/_psutil_osx.c:1175: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1177: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1177: error: ‘PROX_FDTYPE_SOCKET’ undeclared (first use in this function)
psutil/_psutil_osx.c:1179: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1179: error: ‘PROC_PIDFDSOCKETINFO’ undeclared (first use in this function)
psutil/_psutil_osx.c:1211: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1126: warning: unused variable ‘si’
psutil/_psutil_osx.c: In function ‘get_process_num_fds’:
psutil/_psutil_osx.c:1346: error: ‘PROC_PIDLISTFDS’ undeclared (first use in this function)
psutil/_psutil_osx.c:1362: error: ‘PROC_PIDLISTFD_SIZE’ undeclared (first use in this function)
psutil/_psutil_osx.c: In function ‘get_net_io_counters’:
psutil/_psutil_osx.c:1411: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1413: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1413: error: ‘RTM_IFINFO2’ undeclared (first use in this function)
psutil/_psutil_osx.c:1416: error: invalid use of undefined type ‘struct if_msghdr2’
psutil/_psutil_osx.c:1423: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1424: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1425: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1426: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1427: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1428: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1429: error: dereferencing pointer to incomplete type
In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4,
from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85,
from psutil/_psutil_osx.c:9:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
psutil/_psutil_osx.c:18:21: error: libproc.h: No such file or directory
psutil/_psutil_osx.c:19:27: error: sys/proc_info.h: No such file or directory
psutil/_psutil_osx.c:32:32: error: mach/shared_region.h: No such file or directory
In file included from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16,
from psutil/_psutil_osx.c:36:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/float.h:8:24: error: float.h: No such file or directory
psutil/_psutil_osx.c: In function ‘get_process_cwd’:
psutil/_psutil_osx.c:139: error: storage size of ‘pathinfo’ isn’t known
psutil/_psutil_osx.c:145: error: ‘PROC_PIDVNODEPATHINFO’ undeclared (first use in this function)
psutil/_psutil_osx.c:145: error: (Each undeclared identifier is reported only once
psutil/_psutil_osx.c:145: error: for each function it appears in.)
psutil/_psutil_osx.c:139: warning: unused variable ‘pathinfo’
psutil/_psutil_osx.c: In function ‘get_process_exe’:
psutil/_psutil_osx.c:167: warning: implicit declaration of function ‘proc_pidpath’
psutil/_psutil_osx.c: In function ‘get_process_memory_maps’:
psutil/_psutil_osx.c:346: warning: implicit declaration of function ‘proc_regionfilename’
psutil/_psutil_osx.c: In function ‘get_process_cpu_times’:
psutil/_psutil_osx.c:452: error: storage size of ‘pti’ isn’t known
psutil/_psutil_osx.c:456: error: ‘PROC_PIDTASKINFO’ undeclared (first use in this function)
psutil/_psutil_osx.c:452: warning: unused variable ‘pti’
psutil/_psutil_osx.c: In function ‘get_process_memory_info’:
psutil/_psutil_osx.c:491: error: storage size of ‘pti’ isn’t known
psutil/_psutil_osx.c:495: error: ‘PROC_PIDTASKINFO’ undeclared (first use in this function)
psutil/_psutil_osx.c:491: warning: unused variable ‘pti’
psutil/_psutil_osx.c: In function ‘get_process_num_threads’:
psutil/_psutil_osx.c:521: error: storage size of ‘pti’ isn’t known
psutil/_psutil_osx.c:525: error: ‘PROC_PIDTASKINFO’ undeclared (first use in this function)
psutil/_psutil_osx.c:521: warning: unused variable ‘pti’
psutil/_psutil_osx.c: In function ‘get_process_num_ctx_switches’:
psutil/_psutil_osx.c:539: error: storage size of ‘pti’ isn’t known
psutil/_psutil_osx.c:543: error: ‘PROC_PIDTASKINFO’ undeclared (first use in this function)
psutil/_psutil_osx.c:539: warning: unused variable ‘pti’
psutil/_psutil_osx.c: In function ‘get_disk_partitions’:
psutil/_psutil_osx.c:762: warning: implicit declaration of function ‘getfsstat’
psutil/_psutil_osx.c:762: error: ‘MNT_NOWAIT’ undeclared (first use in this function)
psutil/_psutil_osx.c:769: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:786: error: invalid use of undefined type ‘struct statfs’
psutil/_psutil_osx.c:786: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:789: error: ‘MNT_RDONLY’ undeclared (first use in this function)
psutil/_psutil_osx.c:793: error: ‘MNT_SYNCHRONOUS’ undeclared (first use in this function)
psutil/_psutil_osx.c:795: error: ‘MNT_NOEXEC’ undeclared (first use in this function)
psutil/_psutil_osx.c:797: error: ‘MNT_NOSUID’ undeclared (first use in this function)
psutil/_psutil_osx.c:799: error: ‘MNT_UNION’ undeclared (first use in this function)
psutil/_psutil_osx.c:801: error: ‘MNT_ASYNC’ undeclared (first use in this function)
psutil/_psutil_osx.c:803: error: ‘MNT_EXPORTED’ undeclared (first use in this function)
psutil/_psutil_osx.c:805: error: ‘MNT_QUARANTINE’ undeclared (first use in this function)
psutil/_psutil_osx.c:807: error: ‘MNT_LOCAL’ undeclared (first use in this function)
psutil/_psutil_osx.c:809: error: ‘MNT_QUOTA’ undeclared (first use in this function)
psutil/_psutil_osx.c:811: error: ‘MNT_ROOTFS’ undeclared (first use in this function)
psutil/_psutil_osx.c:813: error: ‘MNT_DOVOLFS’ undeclared (first use in this function)
psutil/_psutil_osx.c:815: error: ‘MNT_DONTBROWSE’ undeclared (first use in this function)
psutil/_psutil_osx.c:817: error: ‘MNT_IGNORE_OWNERSHIP’ undeclared (first use in this function)
psutil/_psutil_osx.c:819: error: ‘MNT_AUTOMOUNTED’ undeclared (first use in this function)
psutil/_psutil_osx.c:821: error: ‘MNT_JOURNALED’ undeclared (first use in this function)
psutil/_psutil_osx.c:823: error: ‘MNT_NOUSERXATTR’ undeclared (first use in this function)
psutil/_psutil_osx.c:825: error: ‘MNT_DEFWRITE’ undeclared (first use in this function)
psutil/_psutil_osx.c:827: error: ‘MNT_MULTILABEL’ undeclared (first use in this function)
psutil/_psutil_osx.c:829: error: ‘MNT_NOATIME’ undeclared (first use in this function)
psutil/_psutil_osx.c:831: error: ‘MNT_UPDATE’ undeclared (first use in this function)
psutil/_psutil_osx.c:833: error: ‘MNT_RELOAD’ undeclared (first use in this function)
psutil/_psutil_osx.c:835: error: ‘MNT_FORCE’ undeclared (first use in this function)
psutil/_psutil_osx.c:837: error: ‘MNT_CMDFLAGS’ undeclared (first use in this function)
psutil/_psutil_osx.c:840: error: invalid use of undefined type ‘struct statfs’
psutil/_psutil_osx.c:840: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:841: error: invalid use of undefined type ‘struct statfs’
psutil/_psutil_osx.c:841: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:842: error: invalid use of undefined type ‘struct statfs’
psutil/_psutil_osx.c:842: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c: In function ‘get_process_open_files’:
psutil/_psutil_osx.c:1007: error: storage size of ‘vi’ isn’t known
psutil/_psutil_osx.c:1019: warning: implicit declaration of function ‘proc_pidinfo’
psutil/_psutil_osx.c:1019: error: ‘PROC_PIDLISTFDS’ undeclared (first use in this function)
psutil/_psutil_osx.c:1039: error: ‘PROC_PIDLISTFD_SIZE’ undeclared (first use in this function)
psutil/_psutil_osx.c:1043: error: invalid use of undefined type ‘struct proc_fdinfo’
psutil/_psutil_osx.c:1043: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1045: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1045: error: ‘PROX_FDTYPE_VNODE’ undeclared (first use in this function)
psutil/_psutil_osx.c:1047: warning: implicit declaration of function ‘proc_pidfdinfo’
psutil/_psutil_osx.c:1048: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1049: error: ‘PROC_PIDFDVNODEPATHINFO’ undeclared (first use in this function)
psutil/_psutil_osx.c:1074: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1007: warning: unused variable ‘vi’
psutil/_psutil_osx.c: In function ‘get_process_connections’:
psutil/_psutil_osx.c:1126: error: storage size of ‘si’ isn’t known
psutil/_psutil_osx.c:1151: error: ‘PROC_PIDLISTFDS’ undeclared (first use in this function)
psutil/_psutil_osx.c:1168: error: ‘PROC_PIDLISTFD_SIZE’ undeclared (first use in this function)
psutil/_psutil_osx.c:1175: error: invalid use of undefined type ‘struct proc_fdinfo’
psutil/_psutil_osx.c:1175: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1177: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1177: error: ‘PROX_FDTYPE_SOCKET’ undeclared (first use in this function)
psutil/_psutil_osx.c:1179: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1179: error: ‘PROC_PIDFDSOCKETINFO’ undeclared (first use in this function)
psutil/_psutil_osx.c:1211: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1126: warning: unused variable ‘si’
psutil/_psutil_osx.c: In function ‘get_process_num_fds’:
psutil/_psutil_osx.c:1346: error: ‘PROC_PIDLISTFDS’ undeclared (first use in this function)
psutil/_psutil_osx.c:1362: error: ‘PROC_PIDLISTFD_SIZE’ undeclared (first use in this function)
psutil/_psutil_osx.c: In function ‘get_net_io_counters’:
psutil/_psutil_osx.c:1411: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1413: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1413: error: ‘RTM_IFINFO2’ undeclared (first use in this function)
psutil/_psutil_osx.c:1416: error: invalid use of undefined type ‘struct if_msghdr2’
psutil/_psutil_osx.c:1423: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1424: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1425: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1426: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1427: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1428: error: dereferencing pointer to incomplete type
psutil/_psutil_osx.c:1429: error: dereferencing pointer to incomplete type
lipo: can't figure out the architecture type of: /var/folders/NR/NRerLp3lH00IqJcwaTwU1U+++TM/-Tmp-//ccxJnDsi.out
error: command 'gcc-4.2' failed with exit status 1