Open GoogleCodeExporter opened 8 years ago
After that, when executing:
import psutil
import os
for un in psutil.process_iter():
try:
print un
except:
pass
you get a lot of errors like this:
python(2089) malloc: *** mmap(size=140733193650176) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Original comment by fdv...@gmail.com
on 8 Jul 2011 at 3:41
I think this is similar to issue 135.
Assigning this to Jay and bumping up priority.
Original comment by g.rodola
on 8 Jul 2011 at 3:48
It looks like a compatibility issue with 10.7 - unfortunately I do not have
10.7 and have no plans to upgrade in the near future so I am not sure how much
I can do about debugging this given I don't get the warnings or run into any
memory errors on 10.6 64bit
Original comment by jlo...@gmail.com
on 8 Jul 2011 at 3:50
I'm getting a different error trying to install psutil on OSX Lion...
~/projects $ sudo easy_install -U psutil
Searching for psutil
Reading http://pypi.python.org/simple/psutil/
Reading http://code.google.com/p/psutil/
Best match: psutil 0.5.1
Downloading http://psutil.googlecode.com/files/psutil-0.5.1.tar.gz
Processing psutil-0.5.1.tar.gz
Writing /tmp/easy_install-bh6Y6f/psutil-0.5.1/setup.cfg
Running psutil-0.5.1/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-bh6Y6f/psutil-0.5.1/egg-dist-tmp-mXgR4S
warning: no files found matching '*.html' under directory 'docs'
warning: no files found matching '*.dia' under directory 'docs'
warning: no files found matching '*.png' under directory 'docs'
In file included from psutil/_psutil_osx.c:34:
/usr/include/mach/shared_memory_server.h:48:2: warning: #warning
"<mach/shared_memory_server.h> is deprecated. Please use
<mach/shared_region.h> instead."
psutil/_psutil_osx.c:38:43: error: CoreFoundation/CoreFoundation.h: No such
file or directory
In file included from psutil/_psutil_osx.c:39:
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:45:35: error:
CoreFoundation/CFBase.h: No such file or directory
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:46:41: error:
CoreFoundation/CFDictionary.h: No such file or directory
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:47:38: error:
CoreFoundation/CFRunLoop.h: No such file or directory
In file included from psutil/_psutil_osx.c:39:
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:150: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘IONotificationPortGetRunLoopSource’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:254: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘IOObjectCopyClass’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:264: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘IOObjectCopySuperclassForClass’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:274: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘IOObjectCopyBundleIdentifierForClass’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:387: error:
expected declaration specifiers or ‘...’ before ‘CFDictionaryRef’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:400: error:
expected declaration specifiers or ‘...’ before ‘CFDictionaryRef’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:408: error:
expected declaration specifiers or ‘...’ before ‘CFDictionaryRef’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:433: error:
expected declaration specifiers or ‘...’ before ‘CFDictionaryRef’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:470: error:
expected declaration specifiers or ‘...’ before ‘CFDictionaryRef’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:722: error:
expected declaration specifiers or ‘...’ before ‘CFTypeRef’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:735: error:
expected declaration specifiers or ‘...’ before ‘CFStringRef’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:736: error:
expected declaration specifiers or ‘...’ before ‘CFTypeRef’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:1058: error:
expected declaration specifiers or ‘...’ before ‘CFMutableDictionaryRef’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:1059: error:
expected declaration specifiers or ‘...’ before ‘CFAllocatorRef’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:1072: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘IORegistryEntryCreateCFProperty’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:1090: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘IORegistryEntrySearchCFProperty’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:1117: error:
expected declaration specifiers or ‘...’ before ‘CFTypeRef’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:1130: error:
expected declaration specifiers or ‘...’ before ‘CFStringRef’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:1131: error:
expected declaration specifiers or ‘...’ before ‘CFTypeRef’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:1214: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘IOServiceMatching’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:1224: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘IOServiceNameMatching’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:1236: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘IOBSDNameMatching’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:1250: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘IOOpenFirmwarePathMatching’
/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:1262: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘IORegistryEntryIDMatching’
psutil/_psutil_osx.c: In function ‘get_process_memory_maps’:
psutil/_psutil_osx.c:251: warning: format ‘%016x’ expects type ‘unsigned
int’, but argument 5 has type ‘vm_address_t’
psutil/_psutil_osx.c:251: warning: format ‘%016x’ expects type ‘unsigned
int’, but argument 6 has type ‘long unsigned int’
psutil/_psutil_osx.c: In function ‘get_disk_io_counters’:
psutil/_psutil_osx.c:1416: error: ‘CFDictionaryRef’ undeclared (first use
in this function)
psutil/_psutil_osx.c:1416: error: (Each undeclared identifier is reported only
once
psutil/_psutil_osx.c:1416: error: for each function it appears in.)
psutil/_psutil_osx.c:1416: error: expected ‘;’ before ‘parent_dict’
psutil/_psutil_osx.c:1417: error: expected ‘;’ before ‘props_dict’
psutil/_psutil_osx.c:1418: error: expected ‘;’ before ‘stats_dict’
psutil/_psutil_osx.c:1426: warning: passing argument 2 of
‘IOServiceGetMatchingServices’ makes pointer from integer without a cast
psutil/_psutil_osx.c:1426: error: too many arguments to function
‘IOServiceGetMatchingServices’
psutil/_psutil_osx.c:1434: error: ‘parent_dict’ undeclared (first use in
this function)
psutil/_psutil_osx.c:1435: error: ‘props_dict’ undeclared (first use in
this function)
psutil/_psutil_osx.c:1436: error: ‘stats_dict’ undeclared (first use in
this function)
psutil/_psutil_osx.c:1448: error: ‘CFMutableDictionaryRef’ undeclared
(first use in this function)
psutil/_psutil_osx.c:1448: error: expected expression before ‘)’ token
psutil/_psutil_osx.c:1461: error: expected expression before ‘)’ token
psutil/_psutil_osx.c:1473: error: ‘CFStringRef’ undeclared (first use in
this function)
psutil/_psutil_osx.c:1473: error: expected ‘;’ before ‘disk_name_ref’
psutil/_psutil_osx.c:1478: error: ‘disk_name_ref’ undeclared (first use in
this function)
psutil/_psutil_osx.c:1483: error: expected ‘;’ before
‘CFDictionaryGetValue’
psutil/_psutil_osx.c:1496: error: ‘CFNumberRef’ undeclared (first use in
this function)
psutil/_psutil_osx.c:1496: error: expected ‘;’ before ‘number’
psutil/_psutil_osx.c:1500: error: ‘number’ undeclared (first use in this
function)
psutil/_psutil_osx.c:1500: error: expected ‘)’ before
‘CFDictionaryGetValue’
psutil/_psutil_osx.c:1504: error: ‘kCFNumberSInt64Type’ undeclared (first
use in this function)
psutil/_psutil_osx.c:1506: error: expected ‘)’ before
‘CFDictionaryGetValue’
psutil/_psutil_osx.c:1514: error: expected ‘)’ before
‘CFDictionaryGetValue’
psutil/_psutil_osx.c:1520: error: expected ‘)’ before
‘CFDictionaryGetValue’
psutil/_psutil_osx.c:1528: error: expected ‘)’ before
‘CFDictionaryGetValue’
psutil/_psutil_osx.c:1534: error: expected ‘)’ before
‘CFDictionaryGetValue’
error: Setup script exited with error: command 'gcc' failed with exit status 1
Original comment by jni.s...@gmail.com
on 12 Jul 2012 at 10:15
jni.soma, that's a completely unrelated different error. It looks like your gcc
is unable to find the CoreFoundation/CoreFoundation.h header file which is
causing a number of other nested errors. Are you using the latest version of
XCode to install? Note that If you're using other OS X gcc tools instead of
XCode it may not be able to locate the header files correctly.
I've also uploaded a binary distribution for OS X 10.6.8 which may work on Lion
as well (unfortunately I don't have Lion so I can't test there). You can try
that and see if it works for you without needing to compile from source.
Original comment by jlo...@gmail.com
on 12 Jul 2012 at 11:08
Can we close this one?
Original comment by g.rodola
on 30 Apr 2014 at 12:49
Original issue reported on code.google.com by
fdv...@gmail.com
on 8 Jul 2011 at 3:38