#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    167
    Rep Power
    11

    installing mysqldb trouble.


    hi all,

    trying to install mysqldb 1.0 and receiving a LOT of errors during the process.

    following the directions of by
    export mysqlversion="3.23.58"
    export mysqlclient="mysqlclient"
    export mysqloptlibs=""
    python setup.py build

    after the 'python setup.py build' line, i get errors such as

    _mysql.c:1375: warning: implicit declaration of function `mysql_insert_id'
    _mysql.c: At top level:
    _mysql.c:1386: error: syntax error before '*' token
    _mysql.c:1388: warning: function declaration isn't a prototype
    _mysql.c: In function `_mysql_ConnectionObject_kill':
    _mysql.c:1391: error: `args' undeclared (first use in this function)
    _mysql.c:1392: error: `self' undeclared (first use in this function)
    _mysql.c:1394: warning: implicit declaration of function `mysql_kill'


    that's just the beginning of the errors. it goes on like that for several bash pages and ends with:


    _mysql.c:180: warning: `_mysql_server_init__doc__' defined but not used
    _mysql.c:191: warning: `_mysql_server_init' defined but not used
    _mysql.c:275: warning: `_mysql_server_end__doc__' defined but not used
    _mysql.c:281: warning: `_mysql_server_end' defined but not used
    error: command 'gcc' failed with exit status 1


    so, any suggestions of where i can start looking to fix these errors?

    thanks
  2. #2
  3. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    I haven't used mysqldb but have a few questions:

    Which version of Python and Linux are you using?

    And are these the first errors/warnings you receive:
    _mysql.c:1375: warning: implicit declaration of function `mysql_insert_id'
    _mysql.c: At top level:
    _mysql.c:1386: error: syntax error before '*' token

    grim
  4. #3
  5. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    I've installed mysqldb before from source without a hitch. My best sugestion would be to read the mysqldb readme though again and give it another go.
    programming language development: www.netytan.com Hula

  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    167
    Rep Power
    11
    python version 2.3.4
    linux fedora core 1

    and yes, these are the first errors

    _mysql.c:1375: warning: implicit declaration of function `mysql_insert_id'
    _mysql.c: At top level:
    _mysql.c:1386: error: syntax error before '*' token
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    167
    Rep Power
    11
    fixed. had to install mysql-devel
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    167
    Rep Power
    11
    okay, i THOUGHT i had this fixed.

    MySQLdb seems to be installed. i do a command line :

    python
    import MySQLdb

    --- no errors ---

    i try that in a script; though, and i get "No module named MySQLdb"

    suggestions?

    thanks again.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    167
    Rep Power
    11
    um.

    okay, it works now?

    it's like when my car stops making that clangy noise .... "It fixed itself!"
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2005
    Posts
    1
    Rep Power
    0

    Mysqlpython


    Hi,

    Has anyone installed MysqlPython1.2.0 on XP, I am having a lot of link problems when I try to build _mysql.c

    Regards
  16. #9
  17. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    This thread is from October of last year...

IMN logo majestic logo threadwatch logo seochat tools logo