Hi, I'm trying to install MySQLdb on a solaris 9 machine and have the following error:
haruspex.ucsd.edu# python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.solaris-2.9-sun4u-2.3/MySQLdb
running build_ext
building 'mysql' extension
gcc -DNDEBUG -O -Dversion_info=(1,2,2,'final',0) -Dversion=1.2.2 -I/opt/csw/mysql4/include/mysql -I/opt/csw/include/python2.3 -c _mysql.c -o build/temp.solaris-2.9-sun4u-2.3/_mysql.o -mt -D_FORTEC -xarch=v8 -D_FILE_OFFSET_BITS=64 -DHAVE_CURSES_H -DHAVE_RWLOCK_T
gcc: warning: -x arch=v8' after last input file has no effect
cc1: invalid optiont'
error: command 'gcc' failed with exit status 1
I'm completely lost on how to fix this problem! I do have gcc on the machine (version 3.2.2) -- is this the problem???
Thanks for any kind of help!
- Judy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for the lapse in time - had an emergency last week.
I rebuilt the machine with Solaris 9, the blastwaved on mysql, python_tk, pymysql and do NOT
have a problem now.
So -- I am guessing that what I did before - which was blastwave python, then python_tk,
then pymysql -- something in that combination was erroneous and unnecessary.
Normally blastwave's stuff works very well, so I am relieved that it still does. I am not sure why the combination of things I did before did not work. Sorry that doesn't help much.
- Judy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had the same problem on solaris and i removed the -mt cflag option for compilation and than it worked.
The option can be removed by editing the mysql_config script or by editing the setup_posix.py(orsetup_commons.py, i don't remember exactly).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A 5-year-old gcc is going to cause you no end of problems. Upgrade. setup.py is pulling the cflags from the output of the mysql_config program, and I expect MySQL was compiled with a much newer compiler (did you install from a binary package?).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, I just updated my gcc to version 4.0.2, and still receive the same error.
MySQL was installed from blastwave (pre-compiled). Is that the problem -- do I need to wipe out MySQL and just start over (does MySQLdb need to be added when MySQL is built? Or is it an add-on?)... Sorry for the confusion, I just haven't done this very much and probably know just enough to be dangerous.... thanks for the help.
- Judy
judy@haruspex 114> python -V
Python 2.3.5
judy@haruspex 115> gcc --version
gcc (GCC) 4.0.2
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
judy@haruspex 116> python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.solaris-2.9-sun4u-2.3/MySQLdb
running build_ext
building 'mysql' extension
gcc -DNDEBUG -O -Dversion_info=(1,2,2,'final',0) -Dversion=1.2.2 -I/opt/csw/mysql4/include/mysql -I/opt/csw/include/python2.3 -c _mysql.c -o build/temp.solaris-2.9-sun4u-2.3/_mysql.o -mt -D_FORTEC -xarch=v8 -D_FILE_OFFSET_BITS=64 -DHAVE_CURSES_H -DHAVE_RWLOCK_T
gcc: warning: '-x arch=v8' after last input file has no effect
cc1: error: invalid option 't'
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:
Again, I am wondering if it is possible to get this to work -- I don't know where
the gcc call or the cc1 call are made -- I've been looking through file after file,
trying to figure out how I could just manually do the build.
Is it possible to step through each part of the build so that I could get this
to work?
Or is it better that I uninstall mysql, python, gcc, and start fresh?
Thanks,
Judy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please post the ouput of the mysql_config command. That will tell us how your mysql package was compiled, and this is how the MySQLdb package figures out which compilation options to use. Thanks.
I don't know much about blastwave, can you give me an URL so I can go see how they compile their packages? It may be as easy as setting CC=xx in your environment to use the same compiler that they used to compile MySQL.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, I tried blastwave's pymysql with same results. That's why I decided to scrap it all and just START OVER.
I'll document the steps and post here what happens.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm having almost exactly this same problem - I hate to have to bump this post for activity, but has anybody else come up with a solution for this problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've finally decided to rebuild my machine from scratch, so am loading Solaris 9 on it and will then blastwave onto it the pieces that are needed. Normally blastwave has all the pieces, compiled and ready to run and I haven't had a problem, and they respond fairly quickly when there is an issue. Hopefully this will solve the problem and I will post back here the results.
Frustrating, to put it mildly!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I'm trying to install MySQLdb on a solaris 9 machine and have the following error:
haruspex.ucsd.edu# python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.solaris-2.9-sun4u-2.3/MySQLdb
running build_ext
building 'mysql' extension
gcc -DNDEBUG -O -Dversion_info=(1,2,2,'final',0) -Dversion=1.2.2 -I/opt/csw/mysql4/include/mysql -I/opt/csw/include/python2.3 -c _mysql.c -o build/temp.solaris-2.9-sun4u-2.3/_mysql.o -mt -D_FORTEC -xarch=v8 -D_FILE_OFFSET_BITS=64 -DHAVE_CURSES_H -DHAVE_RWLOCK_T
gcc: warning:
-x arch=v8' after last input file has no effect cc1: invalid option
t'error: command 'gcc' failed with exit status 1
I'm completely lost on how to fix this problem! I do have gcc on the machine (version 3.2.2) -- is this the problem???
Thanks for any kind of help!
- Judy
Sorry for the lapse in time - had an emergency last week.
I rebuilt the machine with Solaris 9, the blastwaved on mysql, python_tk, pymysql and do NOT
have a problem now.
So -- I am guessing that what I did before - which was blastwave python, then python_tk,
then pymysql -- something in that combination was erroneous and unnecessary.
Normally blastwave's stuff works very well, so I am relieved that it still does. I am not sure why the combination of things I did before did not work. Sorry that doesn't help much.
- Judy
I had the same problem on solaris and i removed the -mt cflag option for compilation and than it worked.
The option can be removed by editing the mysql_config script or by editing the setup_posix.py(orsetup_commons.py, i don't remember exactly).
On searching for this I saw a similar post from a while back with no solution.
Is this unresolved -- does MySQLdb not work on Solaris machines?
Thanks,
Judy
A 5-year-old gcc is going to cause you no end of problems. Upgrade. setup.py is pulling the cflags from the output of the mysql_config program, and I expect MySQL was compiled with a much newer compiler (did you install from a binary package?).
Well, I just updated my gcc to version 4.0.2, and still receive the same error.
MySQL was installed from blastwave (pre-compiled). Is that the problem -- do I need to wipe out MySQL and just start over (does MySQLdb need to be added when MySQL is built? Or is it an add-on?)... Sorry for the confusion, I just haven't done this very much and probably know just enough to be dangerous.... thanks for the help.
- Judy
judy@haruspex 114> python -V
Python 2.3.5
judy@haruspex 115> gcc --version
gcc (GCC) 4.0.2
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
judy@haruspex 116> python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.solaris-2.9-sun4u-2.3/MySQLdb
running build_ext
building 'mysql' extension
gcc -DNDEBUG -O -Dversion_info=(1,2,2,'final',0) -Dversion=1.2.2 -I/opt/csw/mysql4/include/mysql -I/opt/csw/include/python2.3 -c _mysql.c -o build/temp.solaris-2.9-sun4u-2.3/_mysql.o -mt -D_FORTEC -xarch=v8 -D_FILE_OFFSET_BITS=64 -DHAVE_CURSES_H -DHAVE_RWLOCK_T
gcc: warning: '-x arch=v8' after last input file has no effect
cc1: error: invalid option 't'
error: command 'gcc' failed with exit status 1
Again, I am wondering if it is possible to get this to work -- I don't know where
the gcc call or the cc1 call are made -- I've been looking through file after file,
trying to figure out how I could just manually do the build.
Is it possible to step through each part of the build so that I could get this
to work?
Or is it better that I uninstall mysql, python, gcc, and start fresh?
Thanks,
Judy
Please post the ouput of the mysql_config command. That will tell us how your mysql package was compiled, and this is how the MySQLdb package figures out which compilation options to use. Thanks.
I don't know much about blastwave, can you give me an URL so I can go see how they compile their packages? It may be as easy as setting CC=xx in your environment to use the same compiler that they used to compile MySQL.
Hmm, I found blastwave, and they have a pymysql package. Maybe you should use that?
Yes, I tried blastwave's pymysql with same results. That's why I decided to scrap it all and just START OVER.
I'll document the steps and post here what happens.
I'm having almost exactly this same problem - I hate to have to bump this post for activity, but has anybody else come up with a solution for this problem?
I've finally decided to rebuild my machine from scratch, so am loading Solaris 9 on it and will then blastwave onto it the pieces that are needed. Normally blastwave has all the pieces, compiled and ready to run and I haven't had a problem, and they respond fairly quickly when there is an issue. Hopefully this will solve the problem and I will post back here the results.
Frustrating, to put it mildly!