Menu

#191 Can't Compile G5 ppc Mac OS X 10.4.7

MySQLdb-1.2
closed
MySQLdb (285)
5
2012-09-19
2006-06-30
steve morin
No

steve:~/Desktop/MySQL-python-1.2.1_p2 steve$ python
setup.py build
running build
running build_py
creating build
creating build/lib.darwin-8.7.0-Power_Macintosh-2.4
copying _mysql_exceptions.py ->
build/lib.darwin-8.7.0-Power_Macintosh-2.4
creating build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb
copying MySQLdb/init.py ->
build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb
copying MySQLdb/converters.py ->
build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb
copying MySQLdb/connections.py ->
build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb
copying MySQLdb/cursors.py ->
build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb
copying MySQLdb/release.py ->
build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb
copying MySQLdb/times.py ->
build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb
creating
build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb/constants
copying MySQLdb/constants/init.py ->
build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb/constants
copying MySQLdb/constants/CR.py ->
build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py ->
build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb/constants
copying MySQLdb/constants/ER.py ->
build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb/constants
copying MySQLdb/constants/FLAG.py ->
build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py ->
build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py ->
build/lib.darwin-8.7.0-Power_Macintosh-2.4/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.darwin-8.7.0-Power_Macintosh-2.4
gcc -fno-strict-aliasing -Wno-long-double
-no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -I/usr/local/mysql/include
-I/sw/include/python2.4 -c _mysql.c -o
build/temp.darwin-8.7.0-Power_Macintosh-2.4/_mysql.o
-Os -arch ppc64 -fno-common
-Dversion_info="(1,2,1,'final',2)" -Dversion="1.2.1_p2"
In file included from /sw/include/python2.4/Python.h:55,
from pymemcompat.h:10,
from _mysql.c:29:
/sw/include/python2.4/pyport.h:612:2: error: #error
"LONG_BIT definition appears wrong for platform (bad
gcc/glibc config?)."
In file included from _mysql.c:40:
/usr/local/mysql/include/my_config.h:1021:1: warning:
"SIZEOF_LONG" redefined
In file included from /sw/include/python2.4/Python.h:8,
from pymemcompat.h:10,
from _mysql.c:29:
/sw/include/python2.4/pyconfig.h:726:1: warning: this
is the location of the previous definition
error: command 'gcc' failed with exit status 1

Discussion

  • steve morin

    steve morin - 2006-06-30

    Logged In: YES
    user_id=89631

    For got to mention that
    Tried to install with version 0.9.* as well
    Using both the buildin python that comes with OSX
    and python that is installed with fink.

    Tried using mysql 4.1. and 5.0.

     
  • whoadave

    whoadave - 2006-09-06

    Logged In: YES
    user_id=1591564

    I'm using an Intel Mac and I've been having similar
    problems. I've done a number of things to further my
    progress, but running "python setup.py install" always end
    with "error: command 'gcc' failed with exit status 1".

    Here's what an attempt at running that command looks like
    for me right now:
    David-Zuchs-iMac:~/Documents/Personal
    Projects/mysql-python/trunk/MySQLdb dzuch$ python setup.py
    installrunning install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.4-fat-2.4
    copying _mysql_exceptions.py -> build/lib.macosx-10.4-fat-2.4
    creating build/lib.macosx-10.4-fat-2.4/MySQLdb
    copying MySQLdb/init.py ->
    build/lib.macosx-10.4-fat-2.4/MySQLdb
    copying MySQLdb/converters.py ->
    build/lib.macosx-10.4-fat-2.4/MySQLdb
    copying MySQLdb/connections.py ->
    build/lib.macosx-10.4-fat-2.4/MySQLdb
    copying MySQLdb/cursors.py ->
    build/lib.macosx-10.4-fat-2.4/MySQLdb
    copying MySQLdb/release.py ->
    build/lib.macosx-10.4-fat-2.4/MySQLdb
    copying MySQLdb/times.py ->
    build/lib.macosx-10.4-fat-2.4/MySQLdb
    creating build/lib.macosx-10.4-fat-2.4/MySQLdb/constants
    copying MySQLdb/constants/init.py ->
    build/lib.macosx-10.4-fat-2.4/MySQLdb/constants
    copying MySQLdb/constants/CR.py ->
    build/lib.macosx-10.4-fat-2.4/MySQLdb/constants
    copying MySQLdb/constants/FIELD_TYPE.py ->
    build/lib.macosx-10.4-fat-2.4/MySQLdb/constants
    copying MySQLdb/constants/ER.py ->
    build/lib.macosx-10.4-fat-2.4/MySQLdb/constants
    copying MySQLdb/constants/FLAG.py ->
    build/lib.macosx-10.4-fat-2.4/MySQLdb/constants
    copying MySQLdb/constants/REFRESH.py ->
    build/lib.macosx-10.4-fat-2.4/MySQLdb/constants
    copying MySQLdb/constants/CLIENT.py ->
    build/lib.macosx-10.4-fat-2.4/MySQLdb/constants
    running build_ext
    building '_mysql' extension
    creating build/temp.macosx-10.4-fat-2.4
    gcc -arch ppc -arch i386 -isysroot
    /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing
    -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common
    -dynamic -DNDEBUG -g
    -I/Applications/MAMP/Library/include/mysql
    -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
    -c _mysql.c -o build/temp.macosx-10.4-fat-2.4/_mysql.o
    -fno-omit-frame-pointer -Dversion_info="(1,3,0,'final',0)"
    -Dversion="1.3.0"
    In file included from _mysql.c:1:
    _mysql.h:11:19: error: mysql.h: No such file or directory
    _mysql.h:12:23: error: my_config.h: No such file or directory
    _mysql.h:13:26: error: mysqld_error.h: No such file or directory
    _mysql.h:14:20: error: errmsg.h: No such file or directory
    In file included from _mysql.c:1:
    _mysql.h:32: error: parse error before ‘MYSQL’
    _mysql.h:32: warning: no semicolon at end of struct or union
    _mysql.h:35: error: parse error before ‘}’ token
    _mysql.h:35: warning: data definition has no type or storage
    class
    _mysql.h:46: error: parse error before ‘MYSQL_RES’
    _mysql.h:46: warning: no semicolon at end of struct or union
    _mysql.h:50: error: parse error before ‘}’ token
    _mysql.h:50: warning: data definition has no type or storage
    class
    _mysql.h:74: error: parse error before ‘’ token
    _mysql.c:9: error: parse error before ‘
    ’ token
    _mysql.c: In function ‘_mysql_Exception’:
    _mysql.c:23: error: ‘c’ undeclared (first use in this function)
    _mysql.c:23: error: (Each undeclared identifier is reported
    only once
    _mysql.c:23: error: for each function it appears in.)
    _mysql.c:26: error: ‘CR_MAX_ERROR’ undeclared (first use in
    this function)
    _mysql.c:34: error: ‘CR_COMMANDS_OUT_OF_SYNC’ undeclared
    (first use in this function)
    _mysql.c:35: error: ‘ER_DB_CREATE_EXISTS’ undeclared (first
    use in this function)
    _mysql.c:36: error: ‘ER_SYNTAX_ERROR’ undeclared (first use
    in this function)
    _mysql.c:37: error: ‘ER_PARSE_ERROR’ undeclared (first use
    in this function)
    _mysql.c:38: error: ‘ER_NO_SUCH_TABLE’ undeclared (first use
    in this function)
    _mysql.c:39: error: ‘ER_WRONG_DB_NAME’ undeclared (first use
    in this function)
    _mysql.c:40: error: ‘ER_WRONG_TABLE_NAME’ undeclared (first
    use in this function)
    _mysql.c:41: error: ‘ER_FIELD_SPECIFIED_TWICE’ undeclared
    (first use in this function)
    _mysql.c:42: error: ‘ER_INVALID_GROUP_FUNC_USE’ undeclared
    (first use in this function)
    _mysql.c:43: error: ‘ER_UNSUPPORTED_EXTENSION’ undeclared
    (first use in this function)
    _mysql.c:44: error: ‘ER_TABLE_MUST_HAVE_COLUMNS’ undeclared
    (first use in this function)
    _mysql.c:73: error: ‘ER_DUP_ENTRY’ undeclared (first use in
    this function)
    _mysql.c:110: warning: passing argument 1 of
    ‘PyString_FromString’ makes pointer from integer without a cast
    In file included from _mysql.c:1:
    _mysql.h:11:19: error: mysql.h: No such file or directory
    _mysql.h:12:23: error: my_config.h: No such file or directory
    _mysql.h:13:26: error: mysqld_error.h: No such file or directory
    _mysql.h:14:20: error: errmsg.h: No such file or directory
    In file included from _mysql.c:1:
    _mysql.h:32: error: parse error before ‘MYSQL’
    _mysql.h:32: warning: no semicolon at end of struct or union
    _mysql.h:35: error: parse error before ‘}’ token
    _mysql.h:35: warning: data definition has no type or storage
    class
    _mysql.h:46: error: parse error before ‘MYSQL_RES’
    _mysql.h:46: warning: no semicolon at end of struct or union
    _mysql.h:50: error: parse error before ‘}’ token
    _mysql.h:50: warning: data definition has no type or storage
    class
    _mysql.h:74: error: parse error before ‘’ token
    _mysql.c:9: error: parse error before ‘
    ’ token
    _mysql.c: In function ‘_mysql_Exception’:
    _mysql.c:23: error: ‘c’ undeclared (first use in this function)
    _mysql.c:23: error: (Each undeclared identifier is reported
    only once
    _mysql.c:23: error: for each function it appears in.)
    _mysql.c:26: error: ‘CR_MAX_ERROR’ undeclared (first use in
    this function)
    _mysql.c:34: error: ‘CR_COMMANDS_OUT_OF_SYNC’ undeclared
    (first use in this function)
    _mysql.c:35: error: ‘ER_DB_CREATE_EXISTS’ undeclared (first
    use in this function)
    _mysql.c:36: error: ‘ER_SYNTAX_ERROR’ undeclared (first use
    in this function)
    _mysql.c:37: error: ‘ER_PARSE_ERROR’ undeclared (first use
    in this function)
    _mysql.c:38: error: ‘ER_NO_SUCH_TABLE’ undeclared (first use
    in this function)
    _mysql.c:39: error: ‘ER_WRONG_DB_NAME’ undeclared (first use
    in this function)
    _mysql.c:40: error: ‘ER_WRONG_TABLE_NAME’ undeclared (first
    use in this function)
    _mysql.c:41: error: ‘ER_FIELD_SPECIFIED_TWICE’ undeclared
    (first use in this function)
    _mysql.c:42: error: ‘ER_INVALID_GROUP_FUNC_USE’ undeclared
    (first use in this function)
    _mysql.c:43: error: ‘ER_UNSUPPORTED_EXTENSION’ undeclared
    (first use in this function)
    _mysql.c:44: error: ‘ER_TABLE_MUST_HAVE_COLUMNS’ undeclared
    (first use in this function)
    _mysql.c:73: error: ‘ER_DUP_ENTRY’ undeclared (first use in
    this function)
    _mysql.c:110: warning: passing argument 1 of
    ‘PyString_FromString’ makes pointer from integer without a cast
    _mysql.c: At top level:
    _mysql.c:272: error: parse error before ‘’ token
    _mysql.c:278: error: parse error before ‘
    ’ token
    _mysql.c: In function ‘_mysql_get_client_info’:
    _mysql.c:390: warning: passing argument 1 of
    ‘PyString_FromString’ makes pointer from integer without a cast
    _mysql.c: At top level:
    _mysql.c:272: error: parse error before ‘’ token
    _mysql.c:278: error: parse error before ‘
    ’ token
    _mysql.c: In function ‘_mysql_get_client_info’:
    _mysql.c:390: warning: passing argument 1 of
    ‘PyString_FromString’ makes pointer from integer without a cast
    lipo: can't figure out the architecture type of:
    /var/tmp//ccq5t814.out
    error: command 'gcc' failed with exit status 1

     
  • Andy Dustman

    Andy Dustman - 2006-09-06

    Logged In: YES
    user_id=71372

    whoadave, your problem is not similar. You don't have the
    required MySQL development packages, or mysql_config is not
    on your path. This is obvious from:

    _mysql.h:11:19: error: mysql.h: No such file or directory

     
  • Andy Dustman

    Andy Dustman - 2007-02-10

    Logged In: YES
    user_id=71372
    Originator: NO

    Try current SVN trunk or 1.2.2b3 when it is available and reopen if it is still a problem.

     

Log in to post a comment.