Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had many python modules installed before I upgraded Mavericks and were very disappointed when I noticed that they had been removed. I installed Mavericks, and I installed the command line tools.

Then I went on trying to download and compile MySQL-python since I need it for my development. It raises compiler warnings during install and then just freezes.

Here are the compiler warnings:

Downloading/unpacking MySQL-python
  Downloading MySQL-python-1.2.4.zip (113kB): 113kB downloaded
  Running setup.py egg_info for package MySQL-python
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
    Extracting in /tmp/tmpYaLRd4
    Now working in /tmp/tmpYaLRd4/distribute-0.6.28
    Building a Distribute egg in /private/tmp/pip_build_root/MySQL-python
    /private/tmp/pip_build_root/MySQL-python/distribute-0.6.28-py2.7.egg

Installing collected packages: MySQL-python
  Running setup.py install for MySQL-python
    building '_mysql' 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 -Dversion_info=(1,2,4,'final',1) -D__version__=1.2.4 -I/usr/local/Cellar/mysql/5.6.10/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
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    In file included from _mysql.c:44:
    /usr/local/Cellar/mysql/5.6.10/include/my_config.h:348:11: warning: 'SIZEOF_SIZE_T' macro redefined
      #define SIZEOF_SIZE_T  SIZEOF_LONG
              ^
    /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pymacconfig.h:43:17: note: previous definition is here
    #        define SIZEOF_SIZE_T           8
                    ^
    In file included from _mysql.c:44:
    /usr/local/Cellar/mysql/5.6.10/include/my_config.h:442:9: warning: 'HAVE_WCSCOLL' macro redefined
    #define HAVE_WCSCOLL
            ^
    /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyconfig.h:906:9: note: previous definition is here
    #define HAVE_WCSCOLL 1
            ^
    _mysql.c:287:14: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
                    cmd_argc = PySequence_Size(cmd_args);
                             ~ ^~~~~~~~~~~~~~~~~~~~~~~~~
    _mysql.c:317:12: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
                    groupc = PySequence_Size(groups);
                           ~ ^~~~~~~~~~~~~~~~~~~~~~~
    _mysql.c:470:14: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
                            int j, n2=PySequence_Size(fun);
                                   ~~ ^~~~~~~~~~~~~~~~~~~~
    _mysql.c:1105:9: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
                    len = mysql_real_escape_string(&(self->connection), out, in, size);
                        ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    _mysql.c:1107:9: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
                    len = mysql_escape_string(out, in, size);
                        ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    _mysql.c:1146:9: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
            size = PyString_GET_SIZE(s);
                 ~ ^~~~~~~~~~~~~~~~~~~~
    /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/stringobject.h:92:32: note: expanded from macro 'PyString_GET_SIZE'
    #define PyString_GET_SIZE(op)  Py_SIZE(op)
                                   ^~~~~~~~~~~
    /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/object.h:116:56: note: expanded from macro 'Py_SIZE'
    #define Py_SIZE(ob)             (((PyVarObject*)(ob))->ob_size)
                                     ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    _mysql.c:1156:9: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
                    len = mysql_real_escape_string(&(self->connection), out+1, in, size);
                        ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    _mysql.c:1158:9: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
                    len = mysql_escape_string(out+1, in, size);
                        ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    _mysql.c:1252:11: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
            if ((n = PyObject_Length(o)) == -1) goto error;
                   ~ ^~~~~~~~~~~~~~~~~~
    /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/abstract.h:434:25: note: expanded from macro 'PyObject_Length'
    #define PyObject_Length PyObject_Size
                            ^
    _mysql.c:1444:10: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
                            len = strlen(buf);
                                ~ ^~~~~~~~~~~
    _mysql.c:1446:10: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
                            len = strlen(buf);
                                ~ ^~~~~~~~~~~
    _mysql.c:1482:11: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
                                    len = strlen(buf);
                                        ~ ^~~~~~~~~~~
    _mysql.c:1484:11: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
                                    len = strlen(buf);
                                        ~ ^~~~~~~~~~~
    _mysql.c:1567:10: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
            if (how < 0 || how >= sizeof(row_converters)) {
                ~~~ ^ ~
    16 warnings generated.
    In file included from _mysql.c:44:
    /usr/local/Cellar/mysql/5.6.10/include/my_config.h:348:11: warning: 'SIZEOF_SIZE_T' macro redefined
      #define SIZEOF_SIZE_T  SIZEOF_LONG
              ^
    /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pymacconfig.h:56:17: note: previous definition is here
    #        define SIZEOF_SIZE_T           4
                    ^
    In file included from _mysql.c:44:
    /usr/local/Cellar/mysql/5.6.10/include/my_config.h:442:9: warning: 'HAVE_WCSCOLL' macro redefined
    #define HAVE_WCSCOLL
            ^
    /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyconfig.h:906:9: note: previous definition is here
    #define HAVE_WCSCOLL 1
            ^
    In file included from _mysql.c:44:
    /usr/local/Cellar/mysql/5.6.10/include/my_config.h:659:9: warning: 'SIZEOF_TIME_T' macro redefined
    #define SIZEOF_TIME_T 8
            ^
    /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pymacconfig.h:57:17: note: previous definition is here
    #        define SIZEOF_TIME_T           4
                    ^
    _mysql.c:1567:10: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
            if (how < 0 || how >= sizeof(row_converters)) {
                ~~~ ^ ~
    4 warnings generated.

Seems like it complains on a lot of variables already defined. But I don't know how to solve these problems since I don't really know what's going on. And I don't think trying to edit the source will give me any good answers.

I have tried to use both pip and easy_install to install the extension. Both generate warnings and freezes. Please help me :)

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.