Menu

Installation problems on FreeBSD...

2001-03-28
2012-09-19
  • tracy s. ruggles

    Hi, I tried this a couple of months ago, but I still haven't been able to figure out how to get this installed on a FreeBSD system.

    Here's the series of events I get when I tried "python setup.py build":

    (It looks like I'm just doing something very fundamentally wrong since every line looks like it's encountering an error...  I'm fairly green when it comes to Unix, but have been working with Python for almost 6 years now, and I'm just plain stumped...)  Any help would be greatly appreciated!

    Thanks...

    running build
    running build_py
    not copying MySQLdb.py (output up-to-date)
    not copying CompatMysqldb.py (output up-to-date)
    not copying _mysql_const/__init__.py (output up-to-date)
    not copying _mysql_const/CR.py (output up-to-date)
    not copying _mysql_const/FIELD_TYPE.py (output up-to-date)
    not copying _mysql_const/ER.py (output up-to-date)
    not copying _mysql_const/FLAG.py (output up-to-date)
    not copying _mysql_const/REFRESH.py (output up-to-date)
    not copying _mysql_const/CLIENT.py (output up-to-date)
    running build_ext
    building '_mysql' extension
    gcc -O -pipe -D_THREAD_SAFE -fPIC -I/usr/local/include/mysql -I/usr/local/include/python2.0 -c _mysqlmodule.c -o build/temp.freebsd-4.2-RELEASE-i386-2.0/_mysqlmodule.o
    _mysqlmodule.c:39: mysql.h: No such file or directory
    _mysqlmodule.c:40: mysqld_error.h: No such file or directory
    _mysqlmodule.c:41: errmsg.h: No such file or directory
    _mysqlmodule.c:56: syntax error before `MYSQL'
    _mysqlmodule.c:66: syntax error before `MYSQL'
    _mysqlmodule.c: In function `_mysql_Exception':
    _mysqlmodule.c:82: structure has no member named `connection'
    _mysqlmodule.c:85: `CR_MAX_ERROR' undeclared (first use in this function)
    _mysqlmodule.c:85: (Each undeclared identifier is reported only once
    _mysqlmodule.c:85: for each function it appears in.)
    _mysqlmodule.c:93: `CR_COMMANDS_OUT_OF_SYNC' undeclared (first use in this function)
    _mysqlmodule.c:96: `ER_DUP_ENTRY' undeclared (first use in this function)
    _mysqlmodule.c:94: warning: unreachable code at beginning of switch statement
    _mysqlmodule.c:107: structure has no member named `connection'
    _mysqlmodule.c:107: warning: passing arg 1 of `PyString_FromString' makes pointer from integer without a cast
    _mysqlmodule.c: At top level:
    _mysqlmodule.c:117: syntax error before `MYSQL_RES'
    _mysqlmodule.c: In function `_mysql_ResultObject_New':
    _mysqlmodule.c:122: `MYSQL_FIELD' undeclared (first use in this function)
    _mysqlmodule.c:122: `fields' undeclared (first use in this function)
    _mysqlmodule.c:123: syntax error before `*'
    _mysqlmodule.c:124: `r' undeclared (first use in this function)
    _mysqlmodule.c:126: `conn' undeclared (first use in this function)
    _mysqlmodule.c:129: `use' undeclared (first use in this function)
    _mysqlmodule.c:131: `conv' undeclared (first use in this function)
    _mysqlmodule.c:132: `result' undeclared (first use in this function)
    _mysqlmodule.c: In function `_mysql_connect':
    _mysqlmodule.c:165: `MYSQL' undeclared (first use in this function)
    _mysqlmodule.c:165: `conn' undeclared (first use in this function)
    _mysqlmodule.c:166: syntax error before `*'
    _mysqlmodule.c:184: `c' undeclared (first use in this function)
    _mysqlmodule.c:187: `kwlist' undeclared (first use in this function)
    _mysqlmodule.c:188: `host' undeclared (first use in this function)
    _mysqlmodule.c:188: `user' undeclared (first use in this function)
    _mysqlmodule.c:188: `passwd' undeclared (first use in this function)
    _mysqlmodule.c:188: `db' undeclared (first use in this function)
    _mysqlmodule.c:189: `port' undeclared (first use in this function)
    _mysqlmodule.c:189: `unix_socket' undeclared (first use in this function)
    _mysqlmodule.c:189: `conv' undeclared (first use in this function)
    _mysqlmodule.c:190: `connect_timeout' undeclared (first use in this function)
    _mysqlmodule.c:191: `compress' undeclared (first use in this function)
    _mysqlmodule.c:191: `named_pipe' undeclared (first use in this function)
    _mysqlmodule.c:192: `init_command' undeclared (first use in this function)
    _mysqlmodule.c:192: `read_default_file' undeclared (first use in this function)
    _mysqlmodule.c:193: `read_default_group' undeclared (first use in this function)
    _mysqlmodule.c:208: `MYSQL_OPT_CONNECT_TIMEOUT' undeclared (first use in this function)
    _mysqlmodule.c:212: `MYSQL_OPT_COMPRESS' undeclared (first use in this function)
    _mysqlmodule.c:213: `client_flag' undeclared (first use in this function)
    _mysqlmodule.c:213: `CLIENT_COMPRESS' undeclared (first use in this function)
    _mysqlmodule.c:216: `MYSQL_OPT_NAMED_PIPE' undeclared (first use in this function)
    _mysqlmodule.c:218: `MYSQL_INIT_COMMAND' undeclared (first use in this function)
    _mysqlmodule.c:220: `MYSQL_READ_DEFAULT_FILE' undeclared (first use in this function)
    _mysqlmodule.c:222: `MYSQL_READ_DEFAULT_GROUP' undeclared (first use in this function)
    _mysqlmodule.c: In function `_mysql_ConnectionObject_close':
    _mysqlmodule.c:242: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_affected_rows':
    _mysqlmodule.c:255: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_dump_debug_info':
    _mysqlmodule.c:278: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_errno':
    _mysqlmodule.c:291: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_error':
    _mysqlmodule.c:300: structure has no member named `connection'
    _mysqlmodule.c:300: warning: passing arg 1 of `PyString_FromString' makes pointer from integer without a cast
    _mysqlmodule.c: In function `_mysql_ResultObject_describe':
    _mysqlmodule.c:470: `MYSQL_FIELD' undeclared (first use in this function)
    _mysqlmodule.c:470: `fields' undeclared (first use in this function)
    _mysqlmodule.c:471: syntax error before `unsigned'
    _mysqlmodule.c:473: `n' undeclared (first use in this function)
    _mysqlmodule.c:473: structure has no member named `result'
    _mysqlmodule.c:474: structure has no member named `result'
    _mysqlmodule.c:476: `i' undeclared (first use in this function)
    _mysqlmodule.c: In function `_mysql_ResultObject_field_flags':
    _mysqlmodule.c:501: `MYSQL_FIELD' undeclared (first use in this function)
    _mysqlmodule.c:501: `fields' undeclared (first use in this function)
    _mysqlmodule.c:502: syntax error before `unsigned'
    _mysqlmodule.c:504: `n' undeclared (first use in this function)
    _mysqlmodule.c:504: structure has no member named `result'
    _mysqlmodule.c:505: structure has no member named `result'
    _mysqlmodule.c:507: `i' undeclared (first use in this function)
    _mysqlmodule.c: At top level:
    _mysqlmodule.c:546: syntax error before `MYSQL_ROW'
    _mysqlmodule.c: In function `_mysql_row_to_tuple':
    _mysqlmodule.c:552: `self' undeclared (first use in this function)
    _mysqlmodule.c:554: warning: assignment makes pointer from integer without a cast
    _mysqlmodule.c:558: `row' undeclared (first use in this function)
    _mysqlmodule.c: At top level:
    _mysqlmodule.c:571: syntax error before `MYSQL_ROW'
    _mysqlmodule.c: In function `_mysql_row_to_dict':
    _mysqlmodule.c:576: `MYSQL_FIELD' undeclared (first use in this function)
    _mysqlmodule.c:576: `fields' undeclared (first use in this function)
    _mysqlmodule.c:578: `self' undeclared (first use in this function)
    _mysqlmodule.c:580: warning: assignment makes pointer from integer without a cast
    _mysqlmodule.c:585: `row' undeclared (first use in this function)
    _mysqlmodule.c: At top level:
    _mysqlmodule.c:610: syntax error before `MYSQL_ROW'
    _mysqlmodule.c: In function `_mysql_row_to_dict_old':
    _mysqlmodule.c:615: `MYSQL_FIELD' undeclared (first use in this function)
    _mysqlmodule.c:615: `fields' undeclared (first use in this function)
    _mysqlmodule.c:617: `self' undeclared (first use in this function)
    _mysqlmodule.c:619: warning: assignment makes pointer from integer without a cast
    _mysqlmodule.c:624: `row' undeclared (first use in this function)
    _mysqlmodule.c: At top level:
    _mysqlmodule.c:646: syntax error before `MYSQL_ROW'
    _mysqlmodule.c: In function `_mysql__fetch_row':
    _mysqlmodule.c:657: syntax error before `row'
    _mysqlmodule.c:662: `row' undeclared (first use in this function)
    _mysqlmodule.c:662: structure has no member named `result'
    _mysqlmodule.c:665: structure has no member named `result'
    _mysqlmodule.c:668: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ResultObject_fetch_row':
    _mysqlmodule.c:691: syntax error before `MYSQL_ROW'
    _mysqlmodule.c:729: structure has no member named `result'
    _mysqlmodule.c: In function `_mysql_get_client_info':
    _mysqlmodule.c:784: warning: passing arg 1 of `PyString_FromString' makes pointer from integer without a cast
    _mysqlmodule.c: In function `_mysql_ConnectionObject_get_host_info':
    _mysqlmodule.c:803: structure has no member named `connection'
    _mysqlmodule.c:803: warning: passing arg 1 of `PyString_FromString' makes pointer from integer without a cast
    _mysqlmodule.c: In function `_mysql_ConnectionObject_get_proto_info':
    _mysqlmodule.c:812: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_get_server_info':
    _mysqlmodule.c:821: structure has no member named `connection'
    _mysqlmodule.c:821: warning: passing arg 1 of `PyString_FromString' makes pointer from integer without a cast
    _mysqlmodule.c: In function `_mysql_ConnectionObject_info':
    _mysqlmodule.c:831: structure has no member named `connection'
    _mysqlmodule.c:831: warning: assignment makes pointer from integer without a cast
    _mysqlmodule.c: In function `_mysql_ConnectionObject_insert_id':
    _mysqlmodule.c:842: syntax error before `r'
    _mysqlmodule.c:845: `r' undeclared (first use in this function)
    _mysqlmodule.c:845: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_kill':
    _mysqlmodule.c:859: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_list_dbs':
    _mysqlmodule.c:871: `MYSQL_RES' undeclared (first use in this function)
    _mysqlmodule.c:871: `result' undeclared (first use in this function)
    _mysqlmodule.c:872: syntax error before `char'
    _mysqlmodule.c:874: `wild' undeclared (first use in this function)
    _mysqlmodule.c:876: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_list_fields':
    _mysqlmodule.c:888: `MYSQL_RES' undeclared (first use in this function)
    _mysqlmodule.c:888: `result' undeclared (first use in this function)
    _mysqlmodule.c:889: syntax error before `char'
    _mysqlmodule.c:891: `table' undeclared (first use in this function)
    _mysqlmodule.c:891: `wild' undeclared (first use in this function)
    _mysqlmodule.c:893: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_list_processes':
    _mysqlmodule.c:905: `MYSQL_RES' undeclared (first use in this function)
    _mysqlmodule.c:905: `result' undeclared (first use in this function)
    _mysqlmodule.c:909: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_list_tables':
    _mysqlmodule.c:921: `MYSQL_RES' undeclared (first use in this function)
    _mysqlmodule.c:921: `result' undeclared (first use in this function)
    _mysqlmodule.c:922: syntax error before `char'
    _mysqlmodule.c:924: `wild' undeclared (first use in this function)
    _mysqlmodule.c:926: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_field_count':
    _mysqlmodule.c:940: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ResultObject_num_fields':
    _mysqlmodule.c:952: structure has no member named `result'
    _mysqlmodule.c: In function `_mysql_ResultObject_num_rows':
    _mysqlmodule.c:961: structure has no member named `result'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_ping':
    _mysqlmodule.c:972: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_query':
    _mysqlmodule.c:988: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_select_db':
    _mysqlmodule.c:1004: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_shutdown':
    _mysqlmodule.c:1019: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_stat':
    _mysqlmodule.c:1034: structure has no member named `connection'
    _mysqlmodule.c:1034: warning: assignment makes pointer from integer without a cast
    _mysqlmodule.c: In function `_mysql_ConnectionObject_store_result':
    _mysqlmodule.c:1045: `MYSQL_RES' undeclared (first use in this function)
    _mysqlmodule.c:1045: `result' undeclared (first use in this function)
    _mysqlmodule.c:1049: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_thread_id':
    _mysqlmodule.c:1067: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_use_result':
    _mysqlmodule.c:1077: `MYSQL_RES' undeclared (first use in this function)
    _mysqlmodule.c:1077: `result' undeclared (first use in this function)
    _mysqlmodule.c:1081: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_dealloc':
    _mysqlmodule.c:1097: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_repr':
    _mysqlmodule.c:1111: structure has no member named `connection'
    _mysqlmodule.c: In function `_mysql_ResultObject_data_seek':
    _mysqlmodule.c:1123: structure has no member named `result'
    _mysqlmodule.c: In function `_mysql_ResultObject_row_seek':
    _mysqlmodule.c:1134: syntax error before `r'
    _mysqlmodule.c:1136: `r' undeclared (first use in this function)
    _mysqlmodule.c:1136: structure has no member named `result'
    _mysqlmodule.c:1137: structure has no member named `result'
    _mysqlmodule.c: In function `_mysql_ResultObject_row_tell':
    _mysqlmodule.c:1147: syntax error before `r'
    _mysqlmodule.c:1149: `r' undeclared (first use in this function)
    _mysqlmodule.c:1149: structure has no member named `result'
    _mysqlmodule.c:1150: structure has no member named `result'
    _mysqlmodule.c: In function `_mysql_ResultObject_dealloc':
    _mysqlmodule.c:1157: structure has no member named `result'
    _mysqlmodule.c: In function `_mysql_ConnectionObject_getattr':
    _mysqlmodule.c:1250: structure has no member named `connection'
    error: command 'gcc' failed with exit status 1
    axiomfire%

     
    • tracy s. ruggles

      Okay, so I figured out that setup.py had to point to the right place, but now I get this error on "python setup.py install":

      --

      axiomfire% ../../python setup.py install
      running install
      running build
      running build_py
      not copying MySQLdb.py (output up-to-date)
      not copying CompatMysqldb.py (output up-to-date)
      not copying _mysql_const/__init__.py (output up-to-date)
      not copying _mysql_const/CR.py (output up-to-date)
      not copying _mysql_const/FIELD_TYPE.py (output up-to-date)
      not copying _mysql_const/ER.py (output up-to-date)
      not copying _mysql_const/FLAG.py (output up-to-date)
      not copying _mysql_const/REFRESH.py (output up-to-date)
      not copying _mysql_const/CLIENT.py (output up-to-date)
      running build_ext
      skipping '_mysql' extension (up-to-date)
      running install_lib
      copying build/lib.freebsd-4.2-RELEASE-i386-2.0/MySQLdb.py -> /usr/local/lib/python2.0/site-packages
      error: /usr/local/lib/python2.0/site-packages/MySQLdb.py: Permission denied
      axiomfire%

      --

      It looks like its trying to copy over the compiled MySQLdb.py onto the global shared version of Python running for everyone but I want it installed into my local copy of Python (hence the "../../python" command to invoke setup.py).  By the way, I get the same error trying to run setup.py with the global version, too.

      Any suggestions?  I've combed through core.py in distutils to see why it wants to copy to the global version instead of my local version but I can seem to find why...

      Thanks!
      Trace

       
    • tracy s. ruggles

      Me again...

      Okay, so I got far enough to know where things are being set as far as directories for the particular verion of Python that I want to install MySQLdb, but ther is a file "sysconfig.py" within the "distutils" directory that is telling any new package to look for "Makefile" within the "config" directory at the top level of the Python directory.

      There is no "config" directory within my Python directory.  I've tried reinstalling a few times and I *never* get a config directory at all.

      Is this normal?  What's going on?

      Thanks,
      Trace (beleaguered)

       
    • Andy Dustman

      Andy Dustman - 2001-03-31

      Suggestion 1: Why not use the Help group for help?

      Suggestion 2: You are trying to use Distutils in a way it wasn't designed to work.

      Suggestion 3: Try ../../python setup.py bdist, and unpack the resulting tarball where you want it.

       

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.