nikademus79 / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

Compilation problem on Mac OS 10.6.8 with python version from fink #184

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download and unpack  psutil-0.3.0.tar.gz
2. Execute: python setup.py install

What is the expected output? What do you see instead?
One expects that psutil compiles without errors. Instead I get:
running install
running build
running build_py
running build_ext
building '_psutil_osx' extension
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I/sw/include/python2.7 -c psutil/_psutil_osx.c -o 
build/temp.macosx-10.6-i386-2.7/psutil/_psutil_osx.o
In file included from psutil/_psutil_osx.c:26:
/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."
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I/sw/include/python2.7 -c psutil/_psutil_common.c -o 
build/temp.macosx-10.6-i386-2.7/psutil/_psutil_common.o
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I/sw/include/python2.7 -c psutil/arch/osx/process_info.c 
-o build/temp.macosx-10.6-i386-2.7/psutil/arch/osx/process_info.o
gcc -L/sw/lib -bundle -L/sw/lib/python2.7/config -lpython2.7 
build/temp.macosx-10.6-i386-2.7/psutil/_psutil_osx.o 
build/temp.macosx-10.6-i386-2.7/psutil/_psutil_common.o 
build/temp.macosx-10.6-i386-2.7/psutil/arch/osx/process_info.o -o 
build/lib.macosx-10.6-i386-2.7/_psutil_osx.so
ld: warning: in /sw/lib/python2.7/config/libpython2.7.dylib, file was built for 
i386 which is not the architecture being linked (x86_64)
Undefined symbols:
[...]

What version of psutil are you using? What Python version?
0.3.0

On what operating system? Is it 32bit or 64bit version?
Mac OS 10.6.8

Please provide any additional information below.
I have two installations of gcc
- the one from Apple: (i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. 
build 5659)
- the one from fink: gcc-4 (GCC) 4.5.0

By default /usr/bin/gcc (the Apple one) is invoked. But my python install is 
from fink. So I guess this causes the problem. Can someone propose a solution?

Original issue reported on code.google.com by ske...@googlemail.com on 11 Jul 2011 at 9:06

GoogleCodeExporter commented 8 years ago
Jay? Jeremy? Any comment on this?

Original comment by g.rodola on 22 Oct 2011 at 11:44

GoogleCodeExporter commented 8 years ago
I don't have any input on this as I don't have fink installed. Possibly you 
could use environment variables or distutils mods to get it to use the right 
gcc, but I can't confirm/test here to tell you for sure. 

http://stackoverflow.com/questions/5967065/python-distutils-not-using-correct-ve
rsion-of-gcc

I'd try some of the suggestions there, particularly setting the CC env variable 
and see if that helps. I'm not sure what's up with the libs being i386 though, 
that may or not still be an issue if you switch gcc versions. 

Original comment by jlo...@gmail.com on 27 Oct 2011 at 12:27

GoogleCodeExporter commented 8 years ago
Closing this out as it doesn't look like a psutil bug.

Original comment by g.rodola on 3 Jun 2012 at 10:47