0

As the title says, I have followed multiple instruction but can't get in installed due to an error at the end of processes. The following is the terminal output after: sudo python setup.py install after CD-ing into the un-tar-ed file.

EDIT: After some feedback/testing, I am 99% sure it has something to do with cc -fno-strict-aliasing... and error: command 'cc' failed with exit status 1 at the end of the log. Maybe a problem with my C?

running install
running bdist_egg
running egg_info
writing MySQL_python.egg-info/PKG-INFO
writing top-level names to MySQL_python.egg-info/top_level.txt
writing dependency_links to MySQL_python.egg-info/dependency_links.txt
writing MySQL_python.egg-info/PKG-INFO
writing top-level names to MySQL_python.egg-info/top_level.txt
writing dependency_links to MySQL_python.egg-info/dependency_links.txt
reading manifest file 'MySQL_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MySQL_python.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.9-intel/egg
running install_lib
running build_py
creating build
creating build/lib.macosx-10.9-intel-2.7
copying _mysql_exceptions.py -> build/lib.macosx-10.9-intel-2.7
creating build/lib.macosx-10.9-intel-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb
creating build/lib.macosx-10.9-intel-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.macosx-10.9-intel-2.7
cc -fno-strict-aliasing -fno-common -dynamic -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 -pipe -Dversion_info=(1,2,4,'beta',4) -D__version__=1.2.4b4 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.9-intel-2.7/_mysql.o -Os -g -fno-strict-aliasing -arch x86_64
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
Keely
  • 366
  • 1
  • 4
  • 19

1 Answers1

0

This looks like a problem with your C compiler. I'm not sure exactly how to fix it.

From the gcc documentation:

-mno-fused-madd

Generate code that uses (does not use) the floating-point multiply and accumulate instructions. These instructions are generated by default if hardware floating point is used. The machine-dependent -mfused-madd option is now mapped to the machine-independent -ffp-contract=fast option, and -mno-fused-madd is mapped to -ffp-contract=off.

It looks like the -mno-fused-madd option is not available on your architecture. I would guess the setup file is not configured properly for your machine. Is there a configure script you forgot to run?

Paul T.
  • 326
  • 1
  • 2
  • 11
  • No, the gcc was already installed with Xcode, and there are no other addition files I know of. – Keely Mar 15 '14 at 19:14
  • The `-m` options are machine specific. So the question is: why is CC trying to run an option not available on your machine? Do you have the right version of the `setup` script for your OS version number? – Paul T. Mar 15 '14 at 19:21
  • How can I tell? I downloaded the latest from here: [link](http://sourceforge.net/projects/mysql-python/files/). And the setup.py was included there. – Keely Mar 15 '14 at 19:30
  • Have you tried using a package manager like MacPorts? They tend to handle all of the dependencies and linking for you, so these issues don't crop up. It looks like there are long-standing issues getting mysql-python running on MacOS. See [this](http://stackoverflow.com/questions/1448429/how-to-install-mysqldb-python-data-access-library-to-mysql-on-mac-os-x) and [this](http://stackoverflow.com/questions/8675885/easier-setup-for-writing-to-mysql-on-osx-with-python) – Paul T. Mar 15 '14 at 19:31
  • No luck there either as I need specially MySQLdb for Python and I couldn't get MacPorts to get it. – Keely Mar 15 '14 at 20:19