[Freeswitch-users] LUASQL Installation Problem!
Shahzad Bhatti
shahzad.bhatti at g-r-v.com
Sun Apr 15 10:02:55 MSD 2012
AOA,
i tried a lot to install LUASQL but have errors in it .
i follow wiki for it http://wiki.freeswitch.org/wiki/Installing_LuaSQL
here is my *config* file data
[root at localhost luasql-2.1.1]# vim config
# Driver (leave uncommented ONLY the line with the name of the driver)
T= mysql
#T= oci8
#T= odbc
#T= postgres
#T= sqlite
#T=sqlite3
# Installation directories
# Default prefix
PREFIX = /usr/local
# System's libraries directory (where binary libraries are installed)
LUA_LIBDIR= $(PREFIX)/lib/lua/5.1
# System's lua directory (where Lua libraries are installed)
LUA_DIR= $(PREFIX)/share/lua/5.1
# Lua includes directory
#LUA_INC= $(PREFIX)/include
LUA_INC= /usr/src/freeswitch/src/mod/languages/mod_lua/lua
# Lua version number (first and second digits of target version)
LUA_VERSION_NUM= 501
# OS dependent
LIB_OPTION= -shared #for Linux
#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
LIBNAME= $T.so
COMPAT_DIR= ../compat/src
# Compilation parameters
# Driver specific
####### MySQL
DRIVER_LIBS= -L/usr/local/mysql/lib -lmysqlclient -lz
DRIVER_INCS= -I/usr/local/mysql/include
######## Oracle OCI8
#DRIVER_LIBS= -L/home/oracle/OraHome1/lib -lz -lclntsh
#DRIVER_INCS= -I/home/oracle/OraHome1/rdbms/demo
-I/home/oracle/OraHome1/rdbms/public
######## PostgreSQL
#DRIVER_LIBS= -L/usr/local/pgsql/lib -lpq
#DRIVER_INCS= -I/usr/local/pgsql/include
######## SQLite
#DRIVER_LIBS= -lsqlite
#DRIVER_INCS=
######## SQLite3
#DRIVER_LIBS= -L/opt/local/lib -lsqlite3
#DRIVER_INCS= -I/opt/local/include
######## ODBC
#DRIVER_LIBS= -L/usr/local/lib -lodbc
#DRIVER_INCS= -DUNIXODBC -I/usr/local/include
WARN= -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic
INCS= -I$(LUA_INC)
CFLAGS= -O2 $(WARN) -I$(COMPAT_DIR) $(DRIVER_INCS) $(INCS) $(DEFS)
CC= gcc
# $Id: config,v 1.8 2007/10/27 22:55:27 carregal Exp $
but get the error :
my output is as followos:
[root at localhost luasql-2.1.1]# make
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic
-I../compat/src -I/usr/src/freeswitch/src/mod/languages/mod_lua/lua -c
-o src/ls_mysql.o src/ls_mysql.c
src/ls_mysql.c:19:19: error: mysql.h: No such file or directory
src/ls_mysql.c:73: error: expected specifier-qualifier-list before âMYSQLâ
src/ls_mysql.c:81: error: expected specifier-qualifier-list before
âMYSQL_RESâ
src/ls_mysql.c:148: warning: ISO C forbids forward references to âenumâ
types
src/ls_mysql.c:148: warning: âenum enum_field_typesâ declared inside
parameter list
src/ls_mysql.c:148: warning: its scope is only this definition or
declaration, which is probably not what you want
src/ls_mysql.c:148: error: parameter 1 (âtypeâ) has incomplete type
src/ls_mysql.c: In function âgetcolumntypeâ:
src/ls_mysql.c:151: error: âFIELD_TYPE_VAR_STRINGâ undeclared (first use in
this function)
src/ls_mysql.c:151: error: (Each undeclared identifier is reported only once
src/ls_mysql.c:151: error: for each function it appears in.)
src/ls_mysql.c:151: error: âFIELD_TYPE_STRINGâ undeclared (first use in
this function)
src/ls_mysql.c:153: error: âFIELD_TYPE_DECIMALâ undeclared (first use in
this function)
src/ls_mysql.c:153: error: âFIELD_TYPE_SHORTâ undeclared (first use in this
function)
src/ls_mysql.c:153: error: âFIELD_TYPE_LONGâ undeclared (first use in this
function)
src/ls_mysql.c:154: error: âFIELD_TYPE_FLOATâ undeclared (first use in this
function)
src/ls_mysql.c:154: error: âFIELD_TYPE_DOUBLEâ undeclared (first use in
this function)
src/ls_mysql.c:154: error: âFIELD_TYPE_LONGLONGâ undeclared (first use in
this function)
src/ls_mysql.c:155: error: âFIELD_TYPE_INT24â undeclared (first use in this
function)
src/ls_mysql.c:155: error: âFIELD_TYPE_YEARâ undeclared (first use in this
function)
src/ls_mysql.c:155: error: âFIELD_TYPE_TINYâ undeclared (first use in this
function)
src/ls_mysql.c:157: error: âFIELD_TYPE_TINY_BLOBâ undeclared (first use in
this function)
src/ls_mysql.c:157: error: âFIELD_TYPE_MEDIUM_BLOBâ undeclared (first use
in this function)
src/ls_mysql.c:158: error: âFIELD_TYPE_LONG_BLOBâ undeclared (first use in
this function)
src/ls_mysql.c:158: error: âFIELD_TYPE_BLOBâ undeclared (first use in this
function)
src/ls_mysql.c:160: error: âFIELD_TYPE_DATEâ undeclared (first use in this
function)
src/ls_mysql.c:160: error: âFIELD_TYPE_NEWDATEâ undeclared (first use in
this function)
src/ls_mysql.c:162: error: âFIELD_TYPE_DATETIMEâ undeclared (first use in
this function)
src/ls_mysql.c:164: error: âFIELD_TYPE_TIMEâ undeclared (first use in this
function)
src/ls_mysql.c:166: error: âFIELD_TYPE_TIMESTAMPâ undeclared (first use in
this function)
src/ls_mysql.c:168: error: âFIELD_TYPE_ENUMâ undeclared (first use in this
function)
src/ls_mysql.c:168: error: âFIELD_TYPE_SETâ undeclared (first use in this
function)
src/ls_mysql.c:170: error: âFIELD_TYPE_NULLâ undeclared (first use in this
function)
src/ls_mysql.c: In function âcreate_colinfoâ:
src/ls_mysql.c:182: error: âMYSQL_FIELDâ undeclared (first use in this
function)
src/ls_mysql.c:182: error: âfieldsâ undeclared (first use in this function)
src/ls_mysql.c:183: warning: ISO C90 forbids mixed declarations and code
src/ls_mysql.c:185: warning: implicit declaration of function
âmysql_fetch_fieldsâ
src/ls_mysql.c:185: error: âcur_dataâ has no member named âmy_resâ
src/ls_mysql.c:191: error: type of formal parameter 1 is incomplete
src/ls_mysql.c: In function âcur_fetchâ:
src/ls_mysql.c:206: error: âMYSQL_RESâ undeclared (first use in this
function)
src/ls_mysql.c:206: error: âresâ undeclared (first use in this function)
src/ls_mysql.c:206: error: âcur_dataâ has no member named âmy_resâ
src/ls_mysql.c:207: warning: ISO C90 forbids mixed declarations and code
src/ls_mysql.c:208: error: âMYSQL_ROWâ undeclared (first use in this
function)
src/ls_mysql.c:208: error: expected â;â before ârowâ
src/ls_mysql.c:209: error: ârowâ undeclared (first use in this function)
src/ls_mysql.c:213: warning: implicit declaration of function
âmysql_fetch_lengthsâ
src/ls_mysql.c: In function âcur_closeâ:
src/ls_mysql.c:269: warning: implicit declaration of function
âmysql_free_resultâ
src/ls_mysql.c:269: error: âcur_dataâ has no member named âmy_resâ
src/ls_mysql.c: In function âcur_numrowsâ:
src/ls_mysql.c:319: warning: implicit declaration of function
âmysql_num_rowsâ
src/ls_mysql.c:319: error: âcur_dataâ has no member named âmy_resâ
src/ls_mysql.c: At top level:
src/ls_mysql.c:327: error: expected declaration specifiers or â...â before
âMYSQL_RESâ
src/ls_mysql.c: In function âcreate_cursorâ:
src/ls_mysql.c:337: error: âcur_dataâ has no member named âmy_resâ
src/ls_mysql.c:337: error: âresultâ undeclared (first use in this function)
src/ls_mysql.c: In function âconn_closeâ:
src/ls_mysql.c:359: warning: implicit declaration of function âmysql_closeâ
src/ls_mysql.c:359: error: âconn_dataâ has no member named âmy_connâ
src/ls_mysql.c: In function âconn_executeâ:
src/ls_mysql.c:374: warning: implicit declaration of function
âmysql_real_queryâ
src/ls_mysql.c:374: error: âconn_dataâ has no member named âmy_connâ
src/ls_mysql.c:376: warning: implicit declaration of function âmysql_errorâ
src/ls_mysql.c:376: error: âconn_dataâ has no member named âmy_connâ
src/ls_mysql.c:379: error: âMYSQL_RESâ undeclared (first use in this
function)
src/ls_mysql.c:379: error: âresâ undeclared (first use in this function)
src/ls_mysql.c:379: warning: implicit declaration of function
âmysql_store_resultâ
src/ls_mysql.c:379: error: âconn_dataâ has no member named âmy_connâ
src/ls_mysql.c:380: warning: implicit declaration of function
âmysql_field_countâ
src/ls_mysql.c:380: error: âconn_dataâ has no member named âmy_connâ
src/ls_mysql.c:380: warning: ISO C90 forbids mixed declarations and code
src/ls_mysql.c:383: error: too many arguments to function âcreate_cursorâ
src/ls_mysql.c:388: warning: implicit declaration of function
âmysql_affected_rowsâ
src/ls_mysql.c:388: error: âconn_dataâ has no member named âmy_connâ
src/ls_mysql.c:392: error: âconn_dataâ has no member named âmy_connâ
src/ls_mysql.c: In function âconn_commitâ:
src/ls_mysql.c:403: error: âconn_dataâ has no member named âmy_connâ
src/ls_mysql.c: In function âconn_rollbackâ:
src/ls_mysql.c:413: error: âconn_dataâ has no member named âmy_connâ
src/ls_mysql.c: In function âconn_setautocommitâ:
src/ls_mysql.c:424: error: âconn_dataâ has no member named âmy_connâ
src/ls_mysql.c:427: error: âconn_dataâ has no member named âmy_connâ
src/ls_mysql.c: At top level:
src/ls_mysql.c:437: error: expected declaration specifiers or â...â before
âMYSQLâ
src/ls_mysql.c: In function âcreate_connectionâ:
src/ls_mysql.c:444: error: âconn_dataâ has no member named âmy_connâ
src/ls_mysql.c:444: error: âmy_connâ undeclared (first use in this function)
src/ls_mysql.c: In function âenv_connectâ:
src/ls_mysql.c:462: error: âMYSQLâ undeclared (first use in this function)
src/ls_mysql.c:462: error: âconnâ undeclared (first use in this function)
src/ls_mysql.c:466: warning: implicit declaration of function âmysql_initâ
src/ls_mysql.c:470: warning: implicit declaration of function
âmysql_real_connectâ
src/ls_mysql.c:478: error: too many arguments to function
âcreate_connectionâ
src/ls_mysql.c: In function âluaopen_luasql_mysqlâ:
src/ls_mysql.c:557: error: expected â)â before âMYSQL_SERVER_VERSIONâ
src/ls_mysql.c:557: error: too few arguments to function âlua_pushlstringâ
make: *** [src/ls_mysql.o] Error 1
[root at localhost luasql-2.1.1]#
please tell me the reason of the error:
Regards
Shahzad Bhatti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120415/a3a73f66/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list