B
Bob Swerdlow
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.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
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.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