Pregunta

¿Alguien ha tratado de vincular estáticamente mysql-pitón con la biblioteca de cliente MySQL en Linux de 64 bits?

gcc -pthread -shared build/temp.linux-x86_64-2.6/_mysql.o /home/apy/MySQL-
python-1.2.3c1/mysql-5.1.42/i/lib/mysql/libmysqlclient_r.a -L/home/apy/MyS
QL-python-1.2.3c1/mysql-5.1.42/i/lib/mysql -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -
lm -lpthread -o build/lib.linux-x86_64-2.6/_mysql.so
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../x86_64-suse-linux/bin/ld: /home/a
py/MySQL-python-1.2.3c1/mysql-5.1.42/i/lib/mysql/libmysqlclient_r.a(libmys
ql.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a sha
red object; recompile with -fPIC
/home/apy/MySQL-python-1.2.3c1/mysql-5.1.42/i/lib/mysql/libmysqlclient_r.a: could not read symbols: Bad value

Vea también: mysql-Python: la construcción de un _mysql.so completamente independiente en Mac OS X

¿Fue útil?

Solución

  1. Establecer variable de entorno CFLAGS="-fPIC". ( razón )

  2. Pass --disable-shared a ./configure (además --enable-static, que es) en la construcción de MySQL.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top