I think I replied to you on another forum, but for the sake of other users, here is my solution. I wasn't able to solve to problem directly, so the only thing I found that worked was using the MySQL-python installer (http://pythonmac.org/packages/MySQL_python-1.2.0-py2.4-macosx10.3.zip) found at the site below. It says it is for 10.3 but I have had no
problems using it on 10.4. Hope that helps.
Well obvious -arch i386 is wrong (at least at the current time). Do you literally have Python-2.3, or possibly a 2.3.x version? I suspect a distutils bug that is probably fixed in a newer version. Try 2.3.5 or 2.4.2 and failing that, try MySQL-python-1.2.1c3.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have looked online a number of places and put up posts. Do you know of any one having this problem?
Do you have place that you know of where I might be able to find a solution.
Steve
Darwin steve.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3
20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh
powerpc
MacOSX 10.4.3
mysql Ver 14.7 Distrib 4.1.14, for apple-darwin8.2.0 (powerpc) using
readline 4.3
runing the software gives me
steve:~/MySQL-python-1.2.0 steve$ python setup.py build
running build
running build_py
creating build
creating build/lib.darwin- 8.3.0-Power_Macintosh-2.3
copying _mysql_exceptions.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3
creating build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/init.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/converters.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/connections.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/cursors.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/sets.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/times.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/stringtimes.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/mxdatetimes.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/pytimes.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
creating build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
copying MySQLdb/constants/init.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
copying MySQLdb/constants/CR.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
copying MySQLdb/constants/ER.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
copying MySQLdb/constants/FLAG.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.darwin-8.3.0-Power_Macintosh-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/local/mysql/include
-I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3
-c _mysql.c -o build/temp.darwin- 8.3.0-Power_Macintosh-2.3/_mysql.o
-I/usr/local/mysql/include -Os -arch ppc64 -fno-common
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:31:
/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?)."
error: command 'gcc' failed with exit status 1
Has anyone had any experience with this problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to instal MySQLdb 1.2.0 on OS X server 10.3.9, python version 2.3, MySQL version 4.0.24.
Whenever I run setup.py build, this is what is returned:
www:~/MySQL-python-1.2.0 admin$ python setup.py build
running build
running build_py
running build_ext
building '_mysql' extension
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-7.9.0-Power_Macintosh-2.3/_mysql.o -I/usr/include/mysql -fno-omit-frame-pointer -arch i386 -arch ppc -pipe
gcc: cannot read specs file for arch `i386'
error: command 'gcc' failed with exit status 1
As far as I can tell, the problem is with the extra -arch i386 before the -arch ppc. Any ideas on how to correct this problem?
Hi Steve,
I think I replied to you on another forum, but for the sake of other users, here is my solution. I wasn't able to solve to problem directly, so the only thing I found that worked was using the MySQL-python installer (http://pythonmac.org/packages/MySQL_python-1.2.0-py2.4-macosx10.3.zip) found at the site below. It says it is for 10.3 but I have had no
problems using it on 10.4. Hope that helps.
http://pythonmac.org/packages/
Adam
Well obvious -arch i386 is wrong (at least at the current time). Do you literally have Python-2.3, or possibly a 2.3.x version? I suspect a distutils bug that is probably fixed in a newer version. Try 2.3.5 or 2.4.2 and failing that, try MySQL-python-1.2.1c3.
I have looked online a number of places and put up posts. Do you know of any one having this problem?
Do you have place that you know of where I might be able to find a solution.
Steve
Darwin steve.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3
20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh
powerpc
MacOSX 10.4.3
mysql Ver 14.7 Distrib 4.1.14, for apple-darwin8.2.0 (powerpc) using
readline 4.3
runing the software gives me
steve:~/MySQL-python-1.2.0 steve$ python setup.py build
running build
running build_py
creating build
creating build/lib.darwin- 8.3.0-Power_Macintosh-2.3
copying _mysql_exceptions.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3
creating build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/init.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/converters.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/connections.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/cursors.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/sets.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/times.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/stringtimes.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/mxdatetimes.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
copying MySQLdb/pytimes.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb
creating build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
copying MySQLdb/constants/init.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
copying MySQLdb/constants/CR.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
copying MySQLdb/constants/ER.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
copying MySQLdb/constants/FLAG.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py ->
build/lib.darwin-8.3.0-Power_Macintosh-2.3/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.darwin-8.3.0-Power_Macintosh-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/local/mysql/include
-I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3
-c _mysql.c -o build/temp.darwin- 8.3.0-Power_Macintosh-2.3/_mysql.o
-I/usr/local/mysql/include -Os -arch ppc64 -fno-common
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:31:
/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?)."
error: command 'gcc' failed with exit status 1
Has anyone had any experience with this problem?