By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,743 Members | 1,058 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,743 IT Pros & Developers. It's quick & easy.

problem installing MySQLdb on Solaris 8

P: n/a
I'm trying to install MySQLdb 0.9.2 so I can access my MySQL database from
python under Solaris 8. I found the notes on changing the include and lib
paths and it seems to find them okay, but when I run 'python setup.py
build', I get these errors:

....
building '_mysql' extension
creating build/temp.solaris-2.8-sun4u-2.3
gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/
usr/include/mysql -I/usr/local/include/mysql -I/usr/local/mysql/include/ -I/
usr/local/include/python2.3 -c _mysql.c -o
build/temp.solaris-2.8-sun4u-2.3/_mysql.o -fPIC
_mysql.c: In function `_mysql_ConnectionObject_info':
_mysql.c:1150: warning: assignment discards qualifiers from pointer target
type
_mysql.c: In function `_mysql_ConnectionObject_stat':
_mysql.c:1379: warning: assignment discards qualifiers from pointer target
type
_mysql.c: At top level:
_mysql.c:2007: warning: initialization from incompatible pointer type
_mysql.c:2096: warning: initialization from incompatible pointer type
gcc -shared
build/temp.solaris-2.8-sun4u-2.3/_mysql.o -L/usr/lib/mysql -L/usr/local/lib/
mysql -L/usr/local/mysql/lib/ -Wl,-R/usr/local/lib:/usr/openwin/lib:/usr/dt/
lib -lmysqlclient_r -lz -o build/lib.solaris-2.8-sun4u-2.3/_mysql.so
ld: warning: file /usr/local/lib/mysql/libmysqlclient_r.a(libmysql.o): wrong
ELF class: ELFCLASS64

My configuration is:
bash-2.05$ python
Python 2.3.3 (#1, Feb 11 2004, 14:47:54)
[GCC 3.3.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
import zlib
zlib.__version__ '1.0' ^D

bash-2.05$

The server is a Sun Netra T1, which has a 64-bit SPARC in it.

I tried adding '-m64' to the extra_link_args in setup.py, then I removed the
'build' directory and built again, but then I got:
....
ld: fatal: file build/temp.solaris-2.8-sun4u-2.3/_mysql.o: wrong ELF class:
ELFCLASS32
ld: fatal: File processing errors. No output written to
build/lib.solaris-2.8-sun4u-2.3/_mysql.so

What do I need to do to get MySQLdb installed on Solaris 8?
Thanks,
Bob
Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.