Fresh out of the box with python 2.3 and mysql 4.1.13 and the basic xcode package installed (gcc 4.0.1)
Downloaded: MySQL-python-1.2.1_p2.tar
Tried: python setup.py build
Output is below. Any ideas where I've gone wrong?
running build
running build_py
creating build
creating build/lib.darwin-8.8.4-i386-2.3
copying _mysql_exceptions.py -> build/lib.darwin-8.8.4-i386-2.3
creating build/lib.darwin-8.8.4-i386-2.3/MySQLdb
copying MySQLdb/init.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb
copying MySQLdb/converters.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb
copying MySQLdb/connections.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb
copying MySQLdb/cursors.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb
copying MySQLdb/release.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb
copying MySQLdb/times.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb
creating build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
copying MySQLdb/constants/init.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.darwin-8.8.4-i386-2.3
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/include/mysql -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -c _mysql.c -o build/temp.darwin-8.8.4-i386-2.3/_mysql.o -fno-omit-frame-pointer -arch ppc64 -arch x86_64 -pipe -Dversion_info="(1,2,1,'final',1)" -Dversion="1.2.1"
In file included from /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h:48,
from pymemcompat.h:10,
from _mysql.c:29:
/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/pyport.h:554:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
In file included from /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h:48,
from pymemcompat.h:10,
from _mysql.c:29:
/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/pyport.h:554:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
In file included from _mysql.c:40:
/usr/include/mysql/my_config.h:955:2: warning: #warning defining SIZEOF_CHARP = 8
/usr/include/mysql/my_config.h:969:2: warning: #warning defining SIZEOF_LONG = 8
/usr/include/mysql/my_config.h:970:1: warning: In file included from _mysql.c:40"SIZEOF_LONG" redefined:
/usr/include/mysql/my_config.h:955:2:
warning: In file included from /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h:8#warning ,
from pymemcompat.h:10de,
from _mysql.c:29f:
i/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/pyconfig.h:726:1:n inwarning: gthis is the location of the previous definition
SIZEOF_CHARP = 8
/usr/include/mysql/my_config.h:969:2: warning: #warning defining SIZEOF_LONG = 8
/usr/include/mysql/my_config.h:970:1: warning: "SIZEOF_LONG" redefined
In file included from /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h:8,
from pymemcompat.h:10,
from _mysql.c:29:
/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/pyconfig.h:726:1: warning: this is the location of the previous definition
In file included from _mysql.c:40:
/usr/include/mysql/my_config.h:1073:1: warning: "WORDS_BIGENDIAN" redefined
In file included from /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h:8,
from pymemcompat.h:10,
from _mysql.c:29:
/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/pyconfig.h:822:1: warning: this is the location of the previous definition
lipo: can't open input file: /var/tmp//ccuy0WEF.out (No such file or directory)
error: command 'gcc' failed with exit status 1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Whoops. I should have noted that I am using Python built from Subversion (effectively 2.6a0).
Looking at the pyport.h code I see this code around the error:
if LONG_BIT != 8 * SIZEOF_LONG
/ 04-Oct-2000 LONG_BIT is apparently (mis)defined as 64 on some recent
* 32-bit platforms using gcc. We try to catch that here at compile-time
* rather than waiting for integer multiplication to trigger bogus
* overflows. /
error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
endif
Apparently in your system LONG_BIT is misdefined. Try this simple C program:
No idea. I have MySQL 4.1.8, gcc 4.0.0, OSX 10.4.8. Both 1.2.1p2 and 1.2.2b2 built just fine for me.
How do I update to gcc 4.0.1? I'd be happy to update to that and try again.
Skip Montanaro
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Fresh out of the box with python 2.3 and mysql 4.1.13 and the basic xcode package installed (gcc 4.0.1)
Downloaded: MySQL-python-1.2.1_p2.tar
Tried: python setup.py build
Output is below. Any ideas where I've gone wrong?
running build
running build_py
creating build
creating build/lib.darwin-8.8.4-i386-2.3
copying _mysql_exceptions.py -> build/lib.darwin-8.8.4-i386-2.3
creating build/lib.darwin-8.8.4-i386-2.3/MySQLdb
copying MySQLdb/init.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb
copying MySQLdb/converters.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb
copying MySQLdb/connections.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb
copying MySQLdb/cursors.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb
copying MySQLdb/release.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb
copying MySQLdb/times.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb
creating build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
copying MySQLdb/constants/init.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.darwin-8.8.4-i386-2.3/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.darwin-8.8.4-i386-2.3
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/include/mysql -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -c _mysql.c -o build/temp.darwin-8.8.4-i386-2.3/_mysql.o -fno-omit-frame-pointer -arch ppc64 -arch x86_64 -pipe -Dversion_info="(1,2,1,'final',1)" -Dversion="1.2.1"
In file included from /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h:48,
from pymemcompat.h:10,
from _mysql.c:29:
/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/pyport.h:554:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
In file included from /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h:48,
from pymemcompat.h:10,
from _mysql.c:29:
/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/pyport.h:554:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
In file included from _mysql.c:40:
/usr/include/mysql/my_config.h:955:2: warning: #warning defining SIZEOF_CHARP = 8
/usr/include/mysql/my_config.h:969:2: warning: #warning defining SIZEOF_LONG = 8
/usr/include/mysql/my_config.h:970:1: warning: In file included from _mysql.c:40"SIZEOF_LONG" redefined:
/usr/include/mysql/my_config.h:955:2:
warning: In file included from /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h:8#warning ,
from pymemcompat.h:10de,
from _mysql.c:29f:
i/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/pyconfig.h:726:1:n inwarning: gthis is the location of the previous definition
SIZEOF_CHARP = 8
/usr/include/mysql/my_config.h:969:2: warning: #warning defining SIZEOF_LONG = 8
/usr/include/mysql/my_config.h:970:1: warning: "SIZEOF_LONG" redefined
In file included from /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h:8,
from pymemcompat.h:10,
from _mysql.c:29:
/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/pyconfig.h:726:1: warning: this is the location of the previous definition
In file included from _mysql.c:40:
/usr/include/mysql/my_config.h:1073:1: warning: "WORDS_BIGENDIAN" redefined
In file included from /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h:8,
from pymemcompat.h:10,
from _mysql.c:29:
/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/pyconfig.h:822:1: warning: this is the location of the previous definition
lipo: can't open input file: /var/tmp//ccuy0WEF.out (No such file or directory)
error: command 'gcc' failed with exit status 1
Whoops. I should have noted that I am using Python built from Subversion (effectively 2.6a0).
Looking at the pyport.h code I see this code around the error:
if LONG_BIT != 8 * SIZEOF_LONG
/ 04-Oct-2000 LONG_BIT is apparently (mis)defined as 64 on some recent
* 32-bit platforms using gcc. We try to catch that here at compile-time
* rather than waiting for integer multiplication to trigger bogus
* overflows.
/
error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
endif
Apparently in your system LONG_BIT is misdefined. Try this simple C program:
Compile and run it. On my system LONG_BIT is 32 and sizeof(long) is 4. Perhaps on
your system LONG_BIT is 64 but sizeof(long) is 4 instead of 8.
Skip
No idea. I have MySQL 4.1.8, gcc 4.0.0, OSX 10.4.8. Both 1.2.1p2 and 1.2.2b2 built just fine for me.
How do I update to gcc 4.0.1? I'd be happy to update to that and try again.
Skip Montanaro