I am trying to get MySQL-Python going on Linux/ppc64.
I have read through the readmes and browsed the forums but cant seem to understand the issue I am having.
I have python 2.4
and MySQL - 4.1.13
when I try to build MySQL-python as
/usr/local/bin/python2.4 setup.py build
I get an error which says mysql was not built wth PIC enabled. Am I missing something ?
running install
running build
running build_py
running build_ext
building '_mysql' extension
gcc -pthread -shared build/temp.linux-ppc64-2.4/_mysql.o -L/usr/local/mysql/lib -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -lmysqlclient_r -o build/lib.linux-ppc64-2.4/_mysql.so
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld: Error: The symbol my_init' has a R_PPC_REL24 relocation, that means '/usr/local/mysql/lib/libmysqlclient_r.a(libmysql.o)' was compiled without -fPIC.
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld: Error: The symbolinit_client_errs' has a R_PPC_REL24 relocation, that means '/usr/local/mysql/lib/libmysqlclient_r.a(libmysql.o)' was compiled without -fPIC.
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld: Error: The symbol mysql_debug' has a R_PPC_REL24 relocation, that means '/usr/local/mysql/lib/libmysqlclient_r.a(libmysql.o)' was compiled without -fPIC.
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld: Error: The symbolsignal@@GLIBC_2.0' has a R_PPC_REL24 relocation, that means '/usr/local/mysql/lib/libmysqlclient_r.a(libmysql.o)' was compiled without -fPIC.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Did you build your own MySQL or get a binary package? I'm guessing you built your own based on the paths. You may have to rebuild, and pass -fPIC in CFLAGS and CXXFLAGS; see this page for more details:
Hello,
I am trying to get MySQL-Python going on Linux/ppc64.
I have read through the readmes and browsed the forums but cant seem to understand the issue I am having.
I have python 2.4
and MySQL - 4.1.13
when I try to build MySQL-python as
/usr/local/bin/python2.4 setup.py build
I get an error which says mysql was not built wth PIC enabled. Am I missing something ?
running install
running build
running build_py
running build_ext
building '_mysql' extension
gcc -pthread -shared build/temp.linux-ppc64-2.4/_mysql.o -L/usr/local/mysql/lib -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -lmysqlclient_r -o build/lib.linux-ppc64-2.4/_mysql.so
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld: Error: The symbol
my_init' has a R_PPC_REL24 relocation, that means '/usr/local/mysql/lib/libmysqlclient_r.a(libmysql.o)' was compiled without -fPIC. /usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld: Error: The symbol
init_client_errs' has a R_PPC_REL24 relocation, that means '/usr/local/mysql/lib/libmysqlclient_r.a(libmysql.o)' was compiled without -fPIC./usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld: Error: The symbol
mysql_debug' has a R_PPC_REL24 relocation, that means '/usr/local/mysql/lib/libmysqlclient_r.a(libmysql.o)' was compiled without -fPIC. /usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld: Error: The symbol
signal@@GLIBC_2.0' has a R_PPC_REL24 relocation, that means '/usr/local/mysql/lib/libmysqlclient_r.a(libmysql.o)' was compiled without -fPIC.FYI
I was able to install python-mysql after re building mysql with fPIC.
Thanks for your help
Did you build your own MySQL or get a binary package? I'm guessing you built your own based on the paths. You may have to rebuild, and pass -fPIC in CFLAGS and CXXFLAGS; see this page for more details:
http://dev.mysql.com/doc/mysql/en/configure-options.html
The mysql package is actually a binary package. All I did was untar and set the right permissions to use.
But looks like I will have to rebuild with the fpic flag