lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I tried recompiling with -fPIC option, but I am still getting error:

[root@localhost luasql-2.0.1]# make
gcc -fPIC  -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -I/usr/src/compat-5.1r5 -I/usr/include/mysql -I/usr/local/include  -fPIC -o src/libmysql.2.0.1.so -shared  /usr/src/compat-5.1r5/compat-5.1.o src/luasql.o src/ls_mysql.o -L/usr/lib64/mysql -lmysqlclient -lz -lm -ldl
/usr/bin/ld: /usr/src/compat-5.1r5/compat-5.1.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/src/compat-5.1r5/compat-5.1.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [src/libmysql.2.0.1.so] Error 1

Thank you in advance for your help in fixing this problem.

Pete


On Wed, Sep 17, 2008 at 5:22 PM, Enrico Tassi <gareuselesinge@libero.it> wrote:
On Wed, Sep 17, 2008 at 04:56:31PM +0800, Pete Kay wrote:
> /usr/bin/ld: /usr/src/compat-5.1r5/compat-5.1.o: relocation R_X86_64_32
> against `a local symbol' can not be used when making a shared object;
> recompile with -fPIC

                ^^^^^

You are building a shared object on amd64, you need to compile every file
with -fPIC.

Cheers
--
Enrico Tassi