jucapj / psutil

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

Error building psutil 2.0.0 on OSX 10.9.2, python 2.7.3 #488

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  sudo pip install psutil

What is the expected output?
I expect the build to complete without errors.

What do you see instead?
machine:~ user$ sudo pip install psutil
Downloading/unpacking psutil
  Running setup.py egg_info for package psutil

    warning: no previously-included files matching '*' found under directory 'docs/_build'
Installing collected packages: psutil
  Running setup.py install for psutil
    building '_psutil_osx' extension
    cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c psutil/_psutil_osx.c -o build/temp.macosx-10.9-intel-2.7/psutil/_psutil_osx.o
    clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
    clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
    error: command 'cc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/Users/morrolan/build/psutil/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-I3srLW-record/install-record.txt:
    running install

running build

running build_py

running build_ext

building '_psutil_osx' extension

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os 
-pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE 
-DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g 
-fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 
-pipe 
-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c 
psutil/_psutil_osx.c -o build/temp.macosx-10.9-intel-2.7/psutil/_psutil_osx.o

clang: error: unknown argument: '-mno-fused-madd' 
[-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in 
the future

error: command 'cc' failed with exit status 1

----------------------------------------
Command /usr/bin/python -c "import 
setuptools;__file__='/Users/morrolan/build/psutil/setup.py';exec(compile(open(__
file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install 
--single-version-externally-managed --record 
/tmp/pip-I3srLW-record/install-record.txt failed with error code 1 in 
/Users/morrolan/build/psutil
Storing complete log in /Users/morrolan/Library/Logs/pip.log
machine:~ user$

What version of psutil are you using? What Python version?
psutil 2.0.0
python 2.7.3

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

Please provide any additional information below.

Original issue reported on code.google.com by Ian.Have...@vixtechnology.com on 25 Mar 2014 at 10:17

GoogleCodeExporter commented 8 years ago
I'm not sure how to look into this as I don't have OSX 10.9.2.
Just a couple of notes:

- do you have python header files installed?

- I see you use "cc" compiler; what happens if you try to compile psutil form 
sources (from the tarball) and specify gcc compier as in "python setup.py build 
-c gcc"? 

Original comment by g.rodola on 8 Apr 2014 at 12:12

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 8 Apr 2014 at 12:12

GoogleCodeExporter commented 8 years ago
This is what happens with -c gcc:

Gabriels-MacBook-Pro:psutil-2.1.0 gabriel$ sudo python setup.py build -c gcc
running build
running build_py
running build_ext
error: don't know how to compile C/C++ code on platform 'posix' with 'gcc' 
compiler

Original comment by gabriel...@gmail.com on 8 Apr 2014 at 9:12

GoogleCodeExporter commented 8 years ago
Same with psutil 2.1.0 and Python 2.7.5. (I'm also on 10.9.2/64bit.)

I had the source for psutil 0.3.0 around as well, and building that gives me 
the same error.

This Stackoverflow post:
http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fus
ed-madd-python-package-installation-fa
outlines how to work around it:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

Original comment by mark.fic...@gmail.com on 20 Apr 2014 at 8:52

GoogleCodeExporter commented 8 years ago
I am having the same issue as well on OS X 10.9.2 64bit. Could it be related 
to?: 
https://langui.sh/2014/03/10/wunused-command-line-argument-hard-error-in-future-
is-a-harsh-mistress/

Original comment by wjimenez...@gmail.com on 21 Apr 2014 at 9:23