Menu

compiling MySQL-python 1.2.0

Help
NIL
2005-04-06
2012-09-19
  • NIL

    NIL - 2005-04-06

    Hello,

    I'm not a gcc pro, I could use some help
    I've some trouble compiling MySQL-python 1.2.0
    Python 2.4 (#3, Jan 8 2005, 17:13:28)
    [GCC 3.3.5 (Debian 1:3.3.5-5)] on linux2

    I'll be gratefull for any suggestion

    >py setup.py build
    running build
    running build_py
    creating build
    creating build/lib.linux-i686-2.4
    copying _mysql_exceptions.py -> build/lib.linux-i686-2.4
    creating build/lib.linux-i686-2.4/MySQLdb
    copying MySQLdb/init.py -> build/lib.linux-i686-2.4/MySQLdb
    copying MySQLdb/converters.py -> build/lib.linux-i686-2.4/MySQLdb
    copying MySQLdb/connections.py -> build/lib.linux-i686-2.4/MySQLdb
    copying MySQLdb/cursors.py -> build/lib.linux-i686-2.4/MySQLdb
    copying MySQLdb/sets.py -> build/lib.linux-i686-2.4/MySQLdb
    copying MySQLdb/times.py -> build/lib.linux-i686-2.4/MySQLdb
    copying MySQLdb/stringtimes.py -> build/lib.linux-i686-2.4/MySQLdb
    copying MySQLdb/mxdatetimes.py -> build/lib.linux-i686-2.4/MySQLdb
    copying MySQLdb/pytimes.py -> build/lib.linux-i686-2.4/MySQLdb
    creating build/lib.linux-i686-2.4/MySQLdb/constants
    copying MySQLdb/constants/init.py -> build/lib.linux-i686-2.4/MySQLdb/constants
    copying MySQLdb/constants/CR.py -> build/lib.linux-i686-2.4/MySQLdb/constants
    copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-i686-2.4/MySQLdb/constants
    copying MySQLdb/constants/ER.py -> build/lib.linux-i686-2.4/MySQLdb/constants
    copying MySQLdb/constants/FLAG.py -> build/lib.linux-i686-2.4/MySQLdb/constants
    copying MySQLdb/constants/REFRESH.py -> build/lib.linux-i686-2.4/MySQLdb/constants
    copying MySQLdb/constants/CLIENT.py -> build/lib.linux-i686-2.4/MySQLdb/constants
    running build_ext
    building '_mysql' extension
    creating build/temp.linux-i686-2.4
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/home/zope/zope/py24/include/python2.4 -c _mysql.c -o build/temp.linux-i686-2.4/_mysql.o -I@pkgincludedir@ @CFLAGS@
    gcc: cannot specify -o with -c or -S and multiple compilations
    error: command 'gcc' failed with exit status 1
    Exit 1

     
    • Andy Dustman

      Andy Dustman - 2005-04-06

      -I@pkgincludedir@ @CFLAGS@

      This looks like something bogus is going on with your Python installation.

       
      • NIL

        NIL - 2005-04-06

        yes, this looked wrong. whoever what libdir is it looking for ?
        what are typical C flags I might have a chance with ?

         
        • Andy Dustman

          Andy Dustman - 2005-04-07

          I suspect if you poke around in /home/zope/zope/py24/config, you'll find the answer,

           
    • NIL

      NIL - 2005-04-07

      ok, I progressed, it was a poor mysql installation
      I recompiled everything and managed to get a _mysql.so

      but now :
      at zope startup

      File "/home/zope/zope/instance1/Products/ZMySQLDA/init.py", line 91, in ?
      import DA
      File "/home/zope/zope/instance1/Products/ZMySQLDA/DA.py", line 92, in ?
      from db import DB
      File "/home/zope/zope/instance1/Products/ZMySQLDA/db.py", line 89, in ?
      import _mysql
      ImportError: /home/zope/zope/py24/lib/python2.4/site-packages/_mysql.so: undefined symbol: mysql_rollback

      I read somewhere it might be related to a thread safe lib or something.
      A swedish mentionned the very same error but I can't read swedish

      many thanks

       
      • Andy Dustman

        Andy Dustman - 2005-04-07

        The _mysql.so you got is linked against the MySQL-4.1 client libraries, and you only have 4.0 or earlier. mysql_rollback is new in 4.1.

         

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.