0

I tried to install mysql-python from source and the compile seemed to go sell till this error:

>running build_ext
>
>building '_mysql' extension
>
>ccreating build/temp.macosx-10.7-intel-2.7
>llvm-gcc-4.2 -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.7-intel-2.7/_mysql.o -Wno-null-conversion -Os -g -fno-strict-aliasing ->arch i386
>
>cc1: error: unrecognized command line option "-Wno-null-conversion"
>
>error: command 'llvm-gcc-4.2' failed with exit status 1
sucasa
  • 373
  • 1
  • 8
  • 19

1 Answers1

1

First looks like you are trying to install a beta, unless that is what you are looking for, I would highly suggest you install using pip

The error you seem to be having has to deal with gcc not understanding one of the command line options.

Here is a link to the latest version of the lib you are trying to install

https://pypi.python.org/pypi/MySQL-python/1.2.4

I would try that.

or remove the invalid option from the installer.

Mahdi Yusuf
  • 19,931
  • 26
  • 72
  • 101
  • sudo pip install MySQL_python seems to give the exact same error. so I tried installing version 1.2.1 and got the same error. I just tried 1.2.4 and same thing. Thanks anyway. – sucasa Sep 15 '13 at 18:19
  • ANS: delete -Wno-null-conversion -Wno-unused-private-field from lines 120/121 in /usr/local/mysql/bin/mysql_config [http://stackoverflow.com/questions/17299158/cant-install-mysql-gem-on-mac-os-x] – sucasa Sep 15 '13 at 18:28