cw-oldrepos / psutil

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

(OSX) fails to build on Lion #237

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. easy_install -U psutil

What is the expected output?

Successful build.

What do you see instead?

za-dc-dev/bin/easy_install -U psutil
install_dir 
/Users/rich/projects/za-packages/za-dependency-checker/za-dc-dev/lib/python2.7/s
ite-packages/
Searching for psutil
Reading http://pypi.python.org/simple/psutil/
Reading http://code.google.com/p/psutil/
Best match: psutil 0.4.0
Downloading http://psutil.googlecode.com/files/psutil-0.4.0.tar.gz
Processing psutil-0.4.0.tar.gz
Running psutil-0.4.0/setup.py -q bdist_egg --dist-dir 
/tmp/easy_install-7euim1/psutil-0.4.0/egg-dist-tmp-QRoCe6
unable to execute gcc-4.2: No such file or directory
error: Setup script exited with error: command 'gcc-4.2' failed with exit 
status 1
make: *** [za-dc-dev/lib/python2.7/site-packages/psutil-1.1.2-py2.7.egg] Error 1

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

psutil-0.4.0
python-2.7

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

osx Lion

Please provide any additional information below.

There is no gcc-* in my PATH.  But gcc in my PATH is 4.2.

rich@fuji-land.noir.com> type gcc
gcc is hashed (/usr/bin/gcc)
rich@fuji-land.noir.com> gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) 
(LLVM build 2336.1.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rich@fuji-land.noir.com> gcc 
gcc         gccmakedep  

Running latest Xcode from app store, (4.2.1).

Note: it is possible that this machine has never had any previous version of 
Xcode installed.  So if "gcc-4.2" was a leftover from a previous version of 
Xcode, then I would lack it.

Original issue reported on code.google.com by r...@noir.com on 12 Dec 2011 at 8:24

GoogleCodeExporter commented 9 years ago
I've searched through psutil, distutils, and my environment, and I don't see 
where "gcc-4.2" is being set.

Original comment by r...@noir.com on 12 Dec 2011 at 8:26

GoogleCodeExporter commented 9 years ago
I build psutil on Lion all the time and it's working fine.  gcc-4.2 is decided 
upon based on OS X's gcc.  (The development toolchain on OS X is a little 
different.)  I just tried to install psutil again using both pip and 
easy_install and both succeeded without issue.  Is this some custom build of 
Python?  Is there anything extra you can provide?

Original comment by jcscoob...@gmail.com on 12 Dec 2011 at 8:33

GoogleCodeExporter commented 9 years ago
This was under python-2.7.1.  I see the same problem under python-2.7.2, though.

Original comment by r...@noir.com on 12 Dec 2011 at 8:35

GoogleCodeExporter commented 9 years ago
Stock build, installed from python.org.

I've just confirmed that I can build hello world, so I believe that my gcc is 
working sanely.

Original comment by r...@noir.com on 12 Dec 2011 at 8:39

GoogleCodeExporter commented 9 years ago
I don't have an executable in any easy-to-find location called "gcc-4.2".  
Where is yours?  And where did it come from?

Original comment by r...@noir.com on 12 Dec 2011 at 8:41

GoogleCodeExporter commented 9 years ago
It might have to do with the python build environment for the python.org 
downloads you're using. In other words the Python OS X builds are built with 
gcc-4.2 binary and it's expecting to use the same to build the libs. What 
happens if you use easy_install with the default OS X python? 

Original comment by jlo...@gmail.com on 12 Dec 2011 at 8:49

GoogleCodeExporter commented 9 years ago
For what it's worth, on OS X 10.6 I *do* have a gcc-4.2 binary: 

[user@host ]$ which gcc-4.2
/usr/bin/gcc-4.2

[user@host ]$ gcc-4.2 --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)
Copyright (C) 2007 Free Software Foundation, Inc.

Original comment by jlo...@gmail.com on 12 Dec 2011 at 8:50

GoogleCodeExporter commented 9 years ago
(jwhitlock@honey-badger)-(jobs:0)-(~)
(! 506)-> which gcc
/usr/bin/gcc

(jwhitlock@honey-badger)-(jobs:0)-(~)
(! 507)-> gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) 
(LLVM build 2336.1.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(jwhitlock@honey-badger)-(jobs:0)-(~)
(! 508)-> find /Developer -name "gcc*"
/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Versions/A/Resources
/gcc-message-patterns.txt
/Developer/Library/Xcode/PrivatePlugIns/Xcode3Core.ideplugin/Contents/Frameworks
/DevToolsCore.framework/Versions/A/Resources/gcc-message-patterns.txt
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
/Developer/Platforms/iPhoneOS.platform/Developer/usr/include/gcc
/Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gcc
/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/lib/gcc
/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/lib/gcc/arm-ap
ple-darwin10/4.2.1/include/gcc
/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-a
pple-darwin10/4.2.1/include/gcc
/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/libexec/gcc
/Developer/Platforms/iPhoneOS.platform/usr/include/gcc
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.
sdk/usr/lib/gcc
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.
sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/gcc
/Developer/SDKs/MacOSX10.6.sdk/Developer/usr/llvm-gcc-4.2/include/gcc
/Developer/SDKs/MacOSX10.6.sdk/Developer/usr/llvm-gcc-4.2/lib/gcc
/Developer/SDKs/MacOSX10.6.sdk/usr/include/gcc
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc
/Developer/SDKs/MacOSX10.7.sdk/Developer/usr/llvm-gcc-4.2/include/gcc
/Developer/SDKs/MacOSX10.7.sdk/Developer/usr/llvm-gcc-4.2/lib/gcc
/Developer/SDKs/MacOSX10.7.sdk/usr/include/gcc
/Developer/SDKs/MacOSX10.7.sdk/usr/lib/gcc
/Developer/usr/bin/gcc
/Developer/usr/llvm-gcc-4.2/include/gcc
/Developer/usr/llvm-gcc-4.2/lib/gcc
/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/include/gcc
/Developer/usr/llvm-gcc-4.2/libexec/gcc
/Developer/usr/share/man/man1/gcc.1.gz

Original comment by jcscoob...@gmail.com on 12 Dec 2011 at 8:53

GoogleCodeExporter commented 9 years ago
Hm.

rich@fuji-land.noir.com> gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) 
(LLVM build 2336.1.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Original comment by r...@noir.com on 12 Dec 2011 at 8:58

GoogleCodeExporter commented 9 years ago
Lol.  I'm sorry, but I've forgotten.  Which python binary came with the system?

Original comment by r...@noir.com on 12 Dec 2011 at 9:05

GoogleCodeExporter commented 9 years ago
Building python from source results in a python that can build psutil.

I now subscribe to the theory that the python.org installers are broken.  I'll 
take this up with them.

Thanks for the help.

Original comment by r...@noir.com on 12 Dec 2011 at 9:09

GoogleCodeExporter commented 9 years ago
You might be able to work around this by setting some flags before building. 
See 
http://stackoverflow.com/questions/5944228/python-build-using-wrong-version-of-g
cc-on-os-x for an example. 

Original comment by jlo...@gmail.com on 12 Dec 2011 at 9:19

GoogleCodeExporter commented 9 years ago
Reinstall XCode to fix this issue.

Original comment by jamilan@gmail.com on 13 Jan 2012 at 12:40

GoogleCodeExporter commented 9 years ago
Is this actually a Lion issue, or can this be closed out?  I should have a Lion 
machine soon.

Original comment by david.da...@gmail.com on 25 Apr 2012 at 4:40

GoogleCodeExporter commented 9 years ago
I am able to build on Lion just fine.  (Sorry, should had responded sooner.)  
I've been building/installing on OS X Lion since last summer and I don't recall 
any issues.  I do remember having to set ARCHFLAGS when building some Python 
modules to not build multiple architectures at once but I just tested again and 
was able to build without any special flags set.  Keep me in the loop on this.

Original comment by jcscoob...@gmail.com on 25 Apr 2012 at 4:45

GoogleCodeExporter commented 9 years ago
I suppose this can be closed, right?
Please reopen otherwise.

Original comment by g.rodola on 26 Feb 2013 at 11:26