I have a problem building the MySQL-python 1.1.7. I get an error from ld about skipping incompatible libmysqlclient.a.
how can solve this problem?
I have installed MySQL for s390 standard v 4.1.7
Server version 4.1.7-standard
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 17 min 43 sec
I have installed Python 2.3.4.
LXMAST64:/tmp/MySQL-python-1.1.7 # python setup.py build
running build
running build_py
running build_ext
building '_mysql' extension
creating build/temp.linux-s390x-2.3
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/mysql/include -I/usr/local/include/python2.3 -c _mysql.c -o build/temp.linux-s390x-2.3/_mysql.o
_mysql.c: In function _mysql_ConnectionObject_Initialize':
_mysql.c:429: warning: unused variablevalue'
_mysql.c:521: warning: label `error' defined but not used
gcc -pthread -shared build/temp.linux-s390x-2.3/_mysql.o -L/usr/local/mysql/lib -lmysqlclient -lz -lcrypt -o build/lib.linux-s390x-2.3/_mysql.so
/usr/lib64/gcc-lib/s390x-suse-linux/3.2.2/../../../../s390x-suse-linux/bin/ld: skipping incompatible /usr/local/mysql/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/lib64/gcc-lib/s390x-suse-linux/3.2.2/../../../../s390x-suse-linux/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
/usr/lib64/gcc-lib/s390x-suse-linux/3.2.2/../../../../s390x-suse-linux/bin/ld: skipping incompatible /usr/local/mysql/lib/libmysqlclient.a when searching for -lmysqlclient
This seems to be the root of the problem. You can try doing this before building:
export mysqlclient=mysqlclient_r
but I suspect there is some build mismatch between Python and MySQL that makes it impossible to link Python modules against MySQL libraries.
It also looks like there aren't any shared libraries for MySQL installed. This isn't usually a problem, but it might be worth looking into.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a problem building the MySQL-python 1.1.7. I get an error from ld about skipping incompatible libmysqlclient.a.
how can solve this problem?
I have installed MySQL for s390 standard v 4.1.7
Server version 4.1.7-standard
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 17 min 43 sec
I have installed Python 2.3.4.
LXMAST64:/tmp/MySQL-python-1.1.7 # python setup.py build
running build
running build_py
running build_ext
building '_mysql' extension
creating build/temp.linux-s390x-2.3
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/mysql/include -I/usr/local/include/python2.3 -c _mysql.c -o build/temp.linux-s390x-2.3/_mysql.o
_mysql.c: In function
_mysql_ConnectionObject_Initialize': _mysql.c:429: warning: unused variable
value'_mysql.c:521: warning: label `error' defined but not used
gcc -pthread -shared build/temp.linux-s390x-2.3/_mysql.o -L/usr/local/mysql/lib -lmysqlclient -lz -lcrypt -o build/lib.linux-s390x-2.3/_mysql.so
/usr/lib64/gcc-lib/s390x-suse-linux/3.2.2/../../../../s390x-suse-linux/bin/ld: skipping incompatible /usr/local/mysql/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/lib64/gcc-lib/s390x-suse-linux/3.2.2/../../../../s390x-suse-linux/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Thanks in advance.
/usr/lib64/gcc-lib/s390x-suse-linux/3.2.2/../../../../s390x-suse-linux/bin/ld: skipping incompatible /usr/local/mysql/lib/libmysqlclient.a when searching for -lmysqlclient
This seems to be the root of the problem. You can try doing this before building:
export mysqlclient=mysqlclient_r
but I suspect there is some build mismatch between Python and MySQL that makes it impossible to link Python modules against MySQL libraries.
It also looks like there aren't any shared libraries for MySQL installed. This isn't usually a problem, but it might be worth looking into.