2010-12-02 7 views
2

odbcのためのluasql 2.1.1をすぐにコンパイルすることができず、エラーの解釈方法がわかりません。これはUbuntu 10.04上にあり、unixodbcは正常にインストールされています。 luasql-2.xの/ configにWARN変数で提案されているよう-fPICフラグを追加することによってそれを修正odbc用のUbuntu 10.04でLuaSQL 2.1.1をコンパイルする

[email protected]:~/Downloads/luasql-2.1.1# make 
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic -I../compat/src -DUNIXODBC -I/usr/local/include -I/usr/local/include -c -o src/luasql.o src/luasql.c 
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic -I../compat/src -DUNIXODBC -I/usr/local/include -I/usr/local/include -c -o src/ls_odbc.o src/ls_odbc.c 
src/ls_odbc.c: In function ‘fail’: 
src/ls_odbc.c:134: warning: pointer targets in passing argument 6 of ‘SQLGetDiagRec’ differ in signedness 
/usr/include/sql.h:708: note: expected ‘SQLCHAR *’ but argument is of type ‘char *’ 
src/ls_odbc.c: In function ‘push_column’: 
src/ls_odbc.c:197: warning: passing argument 6 of ‘SQLGetData’ from incompatible pointer type 
/usr/include/sql.h:685: note: expected ‘SQLLEN *’ but argument is of type ‘SQLINTEGER *’ 
src/ls_odbc.c:210: warning: passing argument 6 of ‘SQLGetData’ from incompatible pointer type 
/usr/include/sql.h:685: note: expected ‘SQLLEN *’ but argument is of type ‘SQLINTEGER *’ 
src/ls_odbc.c:230: warning: passing argument 6 of ‘SQLGetData’ from incompatible pointer type 
/usr/include/sql.h:685: note: expected ‘SQLLEN *’ but argument is of type ‘SQLINTEGER *’ 
src/ls_odbc.c:245: warning: passing argument 6 of ‘SQLGetData’ from incompatible pointer type 
/usr/include/sql.h:685: note: expected ‘SQLLEN *’ but argument is of type ‘SQLINTEGER *’ 
src/ls_odbc.c: In function ‘create_colinfo’: 
src/ls_odbc.c:383: warning: pointer targets in passing argument 2 of ‘lua_pushstring’ differ in signedness 
/usr/local/include/lua.h:164: note: expected ‘const char *’ but argument is of type ‘SQLCHAR *’ 
src/ls_odbc.c: In function ‘conn_execute’: 
src/ls_odbc.c:468: warning: pointer targets in passing argument 2 of ‘SQLPrepare’ differ in signedness 
/usr/include/sql.h:743: note: expected ‘SQLCHAR *’ but argument is of type ‘char *’ 
src/ls_odbc.c:497: warning: passing argument 2 of ‘SQLRowCount’ from incompatible pointer type 
/usr/include/sql.h:749: note: expected ‘SQLLEN *’ but argument is of type ‘SQLINTEGER *’ 
src/ls_odbc.c: In function ‘env_connect’: 
src/ls_odbc.c:602: warning: pointer targets in passing argument 2 of ‘SQLConnect’ differ in signedness 
/usr/include/sql.h:614: note: expected ‘SQLCHAR *’ but argument is of type ‘char *’ 
src/ls_odbc.c:602: warning: pointer targets in passing argument 4 of ‘SQLConnect’ differ in signedness 
/usr/include/sql.h:614: note: expected ‘SQLCHAR *’ but argument is of type ‘char *’ 
src/ls_odbc.c:602: warning: pointer targets in passing argument 6 of ‘SQLConnect’ differ in signedness 
/usr/include/sql.h:614: note: expected ‘SQLCHAR *’ but argument is of type ‘char *’ 
export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc -O2 -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 `.rodata.str1.1' 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 

答えて

0

。ありがとう!

関連する問題