0

Good day to everyone,

I've an error trying to compile and install Pygraphviz 1.2 in OS X 10.9

I've downloaded the pygraphviz archive from https://pypi.python.org/packages/source/p/pygraphviz/pygraphviz-1.2.zip#md5=90c728a8db276eede4e3af2f990a8985

From Terminal I've typed

sudo ./setup.py install

the output was:

Trying pkg-config
library_path=/usr/local/Cellar/graphviz/2.38.0/lib
include_path=/usr/local/Cellar/graphviz/2.38.0/include/graphviz
running install
running build
running build_py
running build_ext
building 'pygraphviz._graphviz' 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/usr/local/Cellar/graphviz/2.38.0/include/graphviz -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-10.9-intel-2.7/pygraphviz/graphviz_wrap.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

As you can see I've already installed graphviz with Homebrew.

Paul Draper
  • 78,542
  • 46
  • 206
  • 285
marketto89
  • 11
  • 4

1 Answers1

0

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

Solution from clang error: unknown argument: '-mno-fused-madd' (python package installation failure) is:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
Community
  • 1
  • 1
antont
  • 2,676
  • 1
  • 19
  • 21
  • Thank for your response antont!! I've tried your solution but the problem still remains :( – marketto89 May 04 '14 at 15:28
  • Finally I've resolved this problem installing pygraphviz in this way: sudo -E pip install pygraphviz It probably worked because I've tried this solution after these commands: export CFLAGS=-Qunused-arguments export CPPFLAGS=-Qunused-arguments – marketto89 May 04 '14 at 15:40
  • Yes that is how setting environment variables works: You first set those options in your environment (that shell instance), and then after that when you compile again it does not stop when it encounters unused arguments. This way the setting is not saved so when you some day open a new shell (terminal) to compile again you need to set those variables first again. That other Q&A told that a newer version of Python is compatible with the version of clang in osx now but it's generally not a good idea to replace the Python in Mac system so this is simpler. Some day Apple's update will fix this. – antont May 05 '14 at 07:45