2010-01-12 2 views
1

64 비트 Linux에서 mysql-python과 mysql 클라이언트 라이브러리를 정적으로 연결하려고 시도한 사람이 있습니까?Linux 64 비트에서 mysql-python 정적 연결

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 

은 참조 : CFLAGS="-fPIC" 환경 변수를 mysql-python: building a completely standalone _mysql.so on Mac OS X?

답변

1
  1. 을 설정합니다. (reason)

  2. mysql을 빌드 할 때 --disable-shared에서 ./configure (즉, --enable-static 외)을 전달하십시오.

+0

"이유"URL이 다운 됨 – doniyor

관련 문제