MySQL and Python in Solaris 8

Martin v. Loewis martin at v.loewis.de
Mon Sep 2 02:04:48 EDT 2002


ganapathy murali krishnan <gmurali at cs.uchicago.edu> writes:

> cc -Xc -mt -O -I/opt/mysql/mysql-3.23/include/mysql
> -I/opt/python/default/include/python2.1 -c _mysql.c -o
> build/temp.solaris-2.8-sun4u-2.1/_mysql.o -fPIC
> cc: Warning: illegal option -fPIC
> "/opt/mysql/mysql-3.23/include/mysql/mysql.h", line 111: long long not
> allowed in Xc mode

Something is quite broken here. Can you tell where the Xc/mt options
come from? To my knowledge, Python/distutils never uses those on its
own - could it be that you set environment variables to that effect?
(perhaps mysqldb introduces them, but that would be surprising)

-fPIC usage indicates that you have been using gcc to build Python. Is
this the case? Do you have gcc on your system? GNU binutils?

> ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error: file
> /opt/python/default/lib/python2.1/site-packages/_mysql.so: symbol
> PyLong_FromUnsignedLongLong: referenced symbol not found
> -------
> 
> which suggests that the original build was not complete.

More precisely, it indicates that you have been linking with GNU
binutils, but Python failed to detect that it had to use
-Wl,-export-dynamic when linking python. What is your binutils
version?

Regards,
Martin




More information about the Python-list mailing list