On Mon, Mar 29, 2010 at 1:44 PM, Neil Patel <neilp@cs.stanford.edu> wrote:
Hi Lloyd,

Even after the change to the config file below, I can't get the package to compile:

[root@topaz luasql-2.1.1]# make
export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc -O2 -fPIC -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic -I../compat/src -DUNIXODBC -I/usr/local/include -I/usr/local/include  -o src/odbc.so -shared  src/luasql.o src/ls_odbc.o  -L/usr/local/lib -lodbc
/usr/bin/ld: src/luasql.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
src/luasql.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [src/odbc.so] Error 1

Anything I need to change or do other than add -fPIC to CFLAGS?

Here's
the script I use.