[Freeswitch-users] not able to install luasql

Peter Olsson peter.olsson at visionutveckling.se
Wed Sep 1 07:03:16 PDT 2010


Try to install mysql-devel package.

/Peter

Från: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] För ovvenkat
Skickat: den 1 september 2010 15:46
Till: FreeSWITCH Users Help
Ämne: Re: [Freeswitch-users] not able to install luasql

Hi thanks for you help, I have installed lua devel package.  After that , I am getting following compilation error

gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic -I../compat/src -I/usr/include/mysql -I/usr/local/include    -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:213: warning: assignment makes pointer from integer without a cast
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:376: warning: passing argument 3 of 'luasql_failmessage' makes pointer from integer without a cast
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:392: warning: passing argument 3 of 'luasql_failmessage' makes pointer from integer without a cast
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:474: warning: passing argument 2 of '__builtin_strncpy' makes pointer from integer without a cast
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



"config" settings

# 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 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/lib/mysql -lmysqlclient -lz
DRIVER_INCS= -I/usr/include/mysql

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 $


I am using CENT OS 5.3 32-bit.


Regards,
Venkat.




On Wed, Sep 1, 2010 at 6:05 PM, Seven Du <dujinfang at gmail.com<mailto:dujinfang at gmail.com>> wrote:
src/luasql.c:8:17: error: lua.h: No such file or directory
seems like you need to install lua devel package. I don't have CENT
but the package name should like lua-devel or lua51-devel etc.

On Wed, Sep 1, 2010 at 7:55 PM, ovvenkat <ovvenkatesan at gmail.com<mailto:ovvenkatesan at gmail.com>> wrote:
> Hi to all,
>
> I could not able to compile "luasql-2.1.1" on CENT 5.3 32-bit. I am getting
> following errors while compiling the source code
>
>
> gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic
> -I../compat/src  -I/usr/local/include    -c -o src/luasql.o src/luasql.c
> src/luasql.c:8:17: error: lua.h: No such file or directory
> src/luasql.c:9:21: error: lauxlib.h: No such file or directory
> src/luasql.c:11:24: error: compat-5.1.h: No such file or directory
> In file included from src/luasql.c:15:
> src/luasql.h:23: error: expected ')' before '*' token
> src/luasql.h:24: error: expected ')' before '*' token
> src/luasql.h:25: error: expected ')' before '*' token
> src/luasql.h:26: error: expected ')' before '*' token
> src/luasql.c:20: error: expected ')' before '*' token
> src/luasql.c:31: error: expected ')' before '*' token
> src/luasql.c:46: error: expected ')' before '*' token
> src/luasql.c:78: error: expected ')' before '*' token
> src/luasql.c:87: error: expected ')' before '*' token
> make: *** [src/luasql.o] Error 1
>
> Any one faced resolved the same issue?
>
> --
>
> Regards
> Venkat.
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org<mailto:FreeSWITCH-users at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>


--
Blog: http://www.dujinfang.com
Proj:  http://www.freeswitch.org.cn

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org<mailto:FreeSWITCH-users at lists.freeswitch.org>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



--

If you have come to help me, you are wasting your time.
If you have come to because your liberation is bound up in mine, we can work together.


Regards
Venkatesan OV.

!DSPAM:4c7e5b6932933554619198!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100901/e2750cac/attachment-0001.html 


More information about the FreeSWITCH-users mailing list