Menu

Problems compiling for Python 2.2

Help
2003-06-09
2012-09-19
  • Richard Thompson

    I am trying to get MySQLdb to work on my RedHat 9.0/ Python 2.2.2 machine. 
    I downloaded the MySQL-python-0.9.2 source and I have been trying to get it compile.

    First of all it wouldn't compile because I didn't have the MySQL source code, so I downloaded that as well and I now get a lot further - but it still doesn't compile. The errors I am getting are

    In file included from _mysql.c:41:
    /tmp/mysql-3.23.56/include/mysql.h:80:27: mysql_version.h: No such file or directory
    _mysql.c: In function `_mysql_ConnectionObject_Initialize':
    _mysql.c:277: `MYSQL_PORT' undeclared (first use in this function)
    _mysql.c:277: (Each undeclared identifier is reported only once
    _mysql.c:277: for each function it appears in.)
    _mysql.c:334: warning: passing arg 5 of `mysql_real_connect' makes integer from pointer without a cast
    _mysql.c:334: warning: passing arg 6 of `mysql_real_connect' makes pointer from integer without a cast
    _mysql.c:334: warning: passing arg 7 of `mysql_real_connect' makes integer from pointer without a cast
    _mysql.c:334: too many arguments to function `mysql_real_connect'
    _mysql.c: In function `_mysql_ConnectionObject_field_count':
    _mysql.c:1226: warning: passing arg 1 of `mysql_num_fields' from incompatible pointer type
    error: command 'gcc' failed with exit status 1

    mysql_version.h doesnt exist, I checked and the nearest I have is mysql_version.h.in.

    I have tried to read the documentation to see where I am going wrong  - but I am at a loss - any ideas anyone??

    R.

     
    • Greg Fortune

      Greg Fortune - 2003-06-10

      Instead of downloading source and trying to work with it manually, install the mysql-devel package from your CD's.  Then, try to compile again...

      Working with source is fine if you are used to it.  Otherwise, it's probably simpler to just work with *-devel rpm files when you need the source code installed.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.