Menu

Long list of errors OS X install

Help
DScher
2009-01-24
2012-09-19
  • DScher

    DScher - 2009-01-24

    Hi, hopefully someone can help me. I installed MySQL unified installer and have the ActiveState Python 2.6 install on my system. No problems with other systems but am hitting a wall here maybe. Getting a huge list of errors when I try and run:

    python setup.py build on the MySQL-Python package. Am pasting a mere sampling below as it's too long and repetitive of errors. Hopefully someone can help. Running OS X 10.5 and as stated above Python 2.6.


    running build
    running build_py
    copying MySQLdb/release.py -> build/lib.macosx-10.3-i386-2.6/MySQLdb
    running build_ext
    building '_mysql' extension
    gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -fPIC -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Dversion_info=(1,2,2,'final',0) -D__version__=1.2.2 -I/usr/local/include -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _mysql.c -o build/temp.macosx-10.3-i386-2.6/_mysql.o -g -Os -arch i386 -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
    _mysql.c:35:23: error: my_config.h: No such file or directory
    _mysql.c:40:19: error: mysql.h: No such file or directory
    _mysql.c:41:26: error: mysqld_error.h: No such file or directory
    _mysql.c:42:20: error: errmsg.h: No such file or directory
    _mysql.c:78: error: syntax error before ‘MYSQL’
    _mysql.c:78: warning: no semicolon at end of struct or union
    _mysql.c:81: error: syntax error before ‘}’ token
    _mysql.c:81: warning: type defaults to ‘int’ in declaration of ‘_mysql_ConnectionObject’
    _mysql.c:81: warning: data definition has no type or storage class
    _mysql.c:92: error: syntax error before ‘MYSQL_RES’
    _mysql.c:92: warning: no semicolon at end of struct or union
    _mysql.c:96: error: syntax error before ‘}’ token
    _mysql.c:96: warning: type defaults to ‘int’ in declaration of ‘_mysql_ResultObject’
    _mysql.c:96: warning: data definition has no type or storage class
    _mysql.c:108: error: syntax error before ‘’ token
    _mysql.c:109: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_Exception’:
    _mysql.c:122: warning: implicit declaration of function ‘mysql_errno’
    _mysql.c:122: error: ‘c’ undeclared (first use in this function)
    _mysql.c:122: error: (Each undeclared identifier is reported only once
    _mysql.c:122: error: for each function it appears in.)
    _mysql.c:125: error: ‘CR_MAX_ERROR’ undeclared (first use in this function)
    _mysql.c:133: error: ‘CR_COMMANDS_OUT_OF_SYNC’ undeclared (first use in this function)
    _mysql.c:134: error: ‘ER_DB_CREATE_EXISTS’ undeclared (first use in this function)
    _mysql.c:135: error: ‘ER_SYNTAX_ERROR’ undeclared (first use in this function)
    _mysql.c:136: error: ‘ER_PARSE_ERROR’ undeclared (first use in this function)
    _mysql.c:137: error: ‘ER_NO_SUCH_TABLE’ undeclared (first use in this function)
    _mysql.c:138: error: ‘ER_WRONG_DB_NAME’ undeclared (first use in this function)
    _mysql.c:139: error: ‘ER_WRONG_TABLE_NAME’ undeclared (first use in this function)
    _mysql.c:140: error: ‘ER_FIELD_SPECIFIED_TWICE’ undeclared (first use in this function)
    _mysql.c:141: error: ‘ER_INVALID_GROUP_FUNC_USE’ undeclared (first use in this function)
    _mysql.c:142: error: ‘ER_UNSUPPORTED_EXTENSION’ undeclared (first use in this function)
    _mysql.c:143: error: ‘ER_TABLE_MUST_HAVE_COLUMNS’ undeclared (first use in this function)
    _mysql.c:172: error: ‘ER_DUP_ENTRY’ undeclared (first use in this function)
    _mysql.c:215: warning: implicit declaration of function ‘mysql_error’
    _mysql.c:215: warning: passing argument 1 of ‘PyString_FromString’ makes pointer from integer without a cast
    _mysql.c: In function ‘_mysql_server_init’:
    _mysql.c:310: warning: label ‘finish’ defined but not used
    _mysql.c:236: warning: unused variable ‘item’
    _mysql.c:235: warning: unused variable ‘groupc’
    _mysql.c:235: warning: unused variable ‘i’
    _mysql.c:235: warning: unused variable ‘cmd_argc’
    _mysql.c:234: warning: unused variable ‘s’
    _mysql.c: At top level:
    _mysql.c:360: error: syntax error before ‘
    ’ token
    _mysql.c:363: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ResultObject_Initialize’:
    _mysql.c:365: error: ‘MYSQL_RES’ undeclared (first use in this function)
    _mysql.c:365: error: ‘result’ undeclared (first use in this function)
    _mysql.c:366: error: ‘conn’ undeclared (first use in this function)
    _mysql.c:370: error: ‘MYSQL_FIELD’ undeclared (first use in this function)
    _mysql.c:370: error: ‘fields’ undeclared (first use in this function)
    _mysql.c:372: error: ‘args’ undeclared (first use in this function)
    _mysql.c:372: error: ‘kwargs’ undeclared (first use in this function)
    _mysql.c:377: error: ‘self’ undeclared (first use in this function)
    _mysql.c:382: warning: implicit declaration of function ‘mysql_use_result’
    _mysql.c:384: warning: implicit declaration of function ‘mysql_store_result’
    _mysql.c:391: warning: implicit declaration of function ‘mysql_num_fields’
    _mysql.c:394: warning: implicit declaration of function ‘mysql_fetch_fields’
    _mysql.c: At top level:
    _mysql.c:445: error: syntax error before ‘’ token
    _mysql.c:448: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ResultObject_traverse’:
    _mysql.c:450: error: ‘self’ undeclared (first use in this function)
    _mysql.c:451: warning: implicit declaration of function ‘visit’
    _mysql.c:451: error: ‘arg’ undeclared (first use in this function)
    _mysql.c: At top level:
    _mysql.c:460: error: syntax error before ‘
    ’ token
    _mysql.c:461: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ResultObject_clear’:
    _mysql.c:462: error: ‘self’ undeclared (first use in this function)
    _mysql.c: At top level:
    _mysql.c:471: error: syntax error before ‘’ token
    _mysql.c:474: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ConnectionObject_Initialize’:
    _mysql.c:475: error: ‘MYSQL’ undeclared (first use in this function)
    _mysql.c:475: error: ‘conn’ undeclared (first use in this function)
    _mysql.c:484: error: ‘MYSQL_PORT’ undeclared (first use in this function)
    _mysql.c:500: error: ‘self’ undeclared (first use in this function)
    _mysql.c:503: error: ‘args’ undeclared (first use in this function)
    _mysql.c:503: error: ‘kwargs’ undeclared (first use in this function)
    _mysql.c:546: warning: implicit declaration of function ‘mysql_init’
    _mysql.c:549: warning: implicit declaration of function ‘mysql_options’
    _mysql.c:549: error: ‘MYSQL_OPT_CONNECT_TIMEOUT’ undeclared (first use in this function)
    _mysql.c:553: error: ‘MYSQL_OPT_COMPRESS’ undeclared (first use in this function)
    _mysql.c:554: error: ‘CLIENT_COMPRESS’ undeclared (first use in this function)
    _mysql.c:557: error: ‘MYSQL_OPT_NAMED_PIPE’ undeclared (first use in this function)
    _mysql.c:559: error: ‘MYSQL_INIT_COMMAND’ undeclared (first use in this function)
    _mysql.c:561: error: ‘MYSQL_READ_DEFAULT_FILE’ undeclared (first use in this function)
    _mysql.c:563: error: ‘MYSQL_READ_DEFAULT_GROUP’ undeclared (first use in this function)
    _mysql.c:566: error: ‘MYSQL_OPT_LOCAL_INFILE’ undeclared (first use in this function)
    _mysql.c:574: warning: implicit declaration of function ‘mysql_real_connect’
    _mysql.c: In function ‘_mysql_connect’:
    _mysql.c:653: error: ‘c’ undeclared (first use in this function)
    _mysql.c:655: error: syntax error before ‘)’ token
    _mysql.c: At top level:
    _mysql.c:666: error: syntax error before ‘
    ’ token
    _mysql.c:669: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ConnectionObject_traverse’:
    _mysql.c:670: error: ‘self’ undeclared (first use in this function)
    _mysql.c:671: error: ‘arg’ undeclared (first use in this function)
    _mysql.c: At top level:
    _mysql.c:677: error: syntax error before ‘’ token
    _mysql.c:678: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ConnectionObject_clear’:
    _mysql.c:679: error: ‘self’ undeclared (first use in this function)
    _mysql.c: At top level:
    _mysql.c:689: error: syntax error before ‘
    ’ token
    _mysql.c:691: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ConnectionObject_close’:
    _mysql.c:692: error: ‘args’ undeclared (first use in this function)
    _mysql.c:695: error: ‘self’ undeclared (first use in this function)
    _mysql.c:697: warning: implicit declaration of function ‘mysql_close’
    _mysql.c: At top level:
    _mysql.c:717: error: syntax error before ‘’ token
    _mysql.c:719: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ConnectionObject_affected_rows’:
    _mysql.c:720: error: ‘args’ undeclared (first use in this function)
    _mysql.c:721: error: ‘self’ undeclared (first use in this function)
    _mysql.c:722: warning: implicit declaration of function ‘mysql_affected_rows’
    _mysql.c: In function ‘_mysql_debug’:
    _mysql.c:738: warning: implicit declaration of function ‘mysql_debug’
    _mysql.c: At top level:
    _mysql.c:751: error: syntax error before ‘
    ’ token
    _mysql.c:753: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ConnectionObject_dump_debug_info’:
    _mysql.c:755: error: ‘args’ undeclared (first use in this function)
    _mysql.c:756: error: ‘self’ undeclared (first use in this function)
    _mysql.c:758: warning: implicit declaration of function ‘mysql_dump_debug_info’
    _mysql.c: At top level:
    _mysql.c:770: error: syntax error before ‘’ token
    _mysql.c:772: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ConnectionObject_autocommit’:
    _mysql.c:774: error: ‘args’ undeclared (first use in this function)
    _mysql.c:782: warning: implicit declaration of function ‘mysql_query’
    _mysql.c:782: error: ‘self’ undeclared (first use in this function)
    _mysql.c: At top level:
    _mysql.c:796: error: syntax error before ‘
    ’ token
    _mysql.c:798: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ConnectionObject_commit’:
    _mysql.c:800: error: ‘args’ undeclared (first use in this function)
    _mysql.c:805: error: ‘self’ undeclared (first use in this function)
    _mysql.c: At top level:
    _mysql.c:818: error: syntax error before ‘’ token
    _mysql.c:820: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ConnectionObject_rollback’:
    _mysql.c:822: error: ‘args’ undeclared (first use in this function)
    _mysql.c:827: error: ‘self’ undeclared (first use in this function)
    _mysql.c: At top level:
    _mysql.c:850: error: syntax error before ‘
    ’ token
    _mysql.c:852: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ConnectionObject_next_result’:
    _mysql.c:854: error: ‘args’ undeclared (first use in this function)
    _mysql.c:862: error: ‘self’ undeclared (first use in this function)
    _mysql.c: At top level:
    _mysql.c:935: error: syntax error before ‘’ token
    _mysql.c:937: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ConnectionObject_errno’:
    _mysql.c:938: error: ‘args’ undeclared (first use in this function)
    _mysql.c:939: error: ‘self’ undeclared (first use in this function)
    _mysql.c: At top level:
    _mysql.c:951: error: syntax error before ‘
    ’ token
    _mysql.c:953: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ConnectionObject_error’:
    _mysql.c:954: error: ‘args’ undeclared (first use in this function)
    _mysql.c:955: error: ‘self’ undeclared (first use in this function)
    _mysql.c:956: warning: passing argument 1 of ‘PyString_FromString’ makes pointer from integer without a cast
    _mysql.c: At top level:
    _mysql.c:969: error: syntax error before ‘’ token
    _mysql.c:971: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_escape_string’:
    _mysql.c:975: error: ‘args’ undeclared (first use in this function)
    _mysql.c:980: warning: implicit declaration of function ‘mysql_escape_string’
    _mysql.c: At top level:
    _mysql.c:1004: error: syntax error before ‘
    ’ token
    _mysql.c:1006: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_string_literal’:
    _mysql.c:1010: error: ‘args’ undeclared (first use in this function)
    _mysql.c: In function ‘_mysql_escape’:
    _mysql.c:1087: error: syntax error before ‘)’ token
    _mysql.c: At top level:
    _mysql.c:1163: error: syntax error before ‘’ token
    _mysql.c:1165: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ResultObject_describe’:
    _mysql.c:1167: error: ‘MYSQL_FIELD’ undeclared (first use in this function)
    _mysql.c:1167: error: ‘fields’ undeclared (first use in this function)
    _mysql.c:1169: error: ‘args’ undeclared (first use in this function)
    _mysql.c:1170: error: syntax error before ‘)’ token
    _mysql.c:1170: error: syntax error before ‘)’ token
    _mysql.c:1171: error: ‘self’ undeclared (first use in this function)
    _mysql.c:1183: warning: implicit declaration of function ‘IS_NOT_NULL’
    _mysql.c: At top level:
    _mysql.c:1199: error: syntax error before ‘
    ’ token
    _mysql.c:1201: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_ResultObject_field_flags’:
    _mysql.c:1203: error: ‘MYSQL_FIELD’ undeclared (first use in this function)
    _mysql.c:1203: error: ‘fields’ undeclared (first use in this function)
    _mysql.c:1205: error: ‘args’ undeclared (first use in this function)
    _mysql.c:1206: error: syntax error before ‘)’ token
    _mysql.c:1206: error: syntax error before ‘)’ token
    _mysql.c:1207: error: ‘self’ undeclared (first use in this function)
    _mysql.c: At top level:
    _mysql.c:1248: error: syntax error before ‘’ token
    _mysql.c:1250: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_row_to_tuple’:
    _mysql.c:1255: error: ‘self’ undeclared (first use in this function)
    _mysql.c:1257: warning: implicit declaration of function ‘mysql_fetch_lengths’
    _mysql.c:1257: warning: assignment makes pointer from integer without a cast
    _mysql.c:1261: error: ‘row’ undeclared (first use in this function)
    _mysql.c: At top level:
    _mysql.c:1273: error: syntax error before ‘
    ’ token
    _mysql.c:1275: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_row_to_dict’:
    _mysql.c:1279: error: ‘MYSQL_FIELD’ undeclared (first use in this function)
    _mysql.c:1279: error: ‘fields’ undeclared (first use in this function)
    _mysql.c:1281: error: ‘self’ undeclared (first use in this function)
    _mysql.c:1283: warning: assignment makes pointer from integer without a cast
    _mysql.c:1288: error: ‘row’ undeclared (first use in this function)
    _mysql.c: At top level:
    _mysql.c:1312: error: syntax error before ‘’ token
    _mysql.c:1314: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql_row_to_dict_old’:
    _mysql.c:1318: error: ‘MYSQL_FIELD’ undeclared (first use in this function)
    _mysql.c:1318: error: ‘fields’ undeclared (first use in this function)
    _mysql.c:1320: error: ‘self’ undeclared (first use in this function)
    _mysql.c:1322: warning: assignment makes pointer from integer without a cast
    _mysql.c:1327: error: ‘row’ undeclared (first use in this function)
    _mysql.c: At top level:
    _mysql.c:1349: error: syntax error before ‘
    ’ token
    _mysql.c:1349: warning: function declaration isn’t a prototype
    _mysql.c:1353: error: syntax error before ‘*’ token
    _mysql.c:1358: warning: function declaration isn’t a prototype
    _mysql.c: In function ‘_mysql__fetch_row’:
    _mysql.c:1360: error: ‘MYSQL_ROW’ undeclared (first use in this fun
    _mysql.c:2527: warning: passing argument 3 of ‘PyMember_SetOne’ from incompatible pointer type
    _mysql.c:2529: warning: passing argument 2 of ‘PyErr_SetString’ from incompatible pointer type
    error: command 'gcc' failed with exit status 1

    .....................

    Help please. Thanks.

     
    • DScher

      DScher - 2009-01-24

      Following the link:

      http://www.mangoorange.com/2008/08/01/installing-python-mysqldb-122-on-mac-os-x/?cp=1#comments

      fixed my problem more or less. Still getting a deprecation error but that's another problem I believe based on my version of Python(2.6).

      Thanks a million times over to mickeyckm for writing the article.

       

Log in to post a comment.