I can't get luasql to compile on CentOS 5.4: [root@topaz luasql-2.1.1]# make gcc -fPIC -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic -I../compat/src -I/usr/include/mysql -I/usr/local/include -o src/mysql.so -shared src/luasql.o src/ls_mysql.o -L/usr/local/mysql/lib -lmysqlclient -lz /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/mysql.so] Error 1 I've tried adding the -fPIC in the make but still no luck. Also, the FS wiki warns agains compiling with the MySQL driver since it leaks memory. So how do I install luasql for MySQL? Couldn't find any RPMs, can anyone here share one? Thanks, Neil
Hi Niel, Lua Mysql driver is not recommended. Use the Lua ODBC driver for the connectivity. Enable the ODBC in the config file Here is the modification need in the config file CFLAGS= -O2 *-fPIC* $(WARN) -I$(COMPAT_DIR) $(DRIVER_INCS) $(INCS) $(DEFS) Hope this will help you to solve the problem. Thanks Lloyd On Sat, Mar 27, 2010 at 12:15 PM, Brian West <brian@freeswitch.org> wrote:
Because the rpm's were not compiled with -fPIC its getting fixed.. till then you'll have to compile it yourself.
/b
On Mar 26, 2010, at 10:16 PM, Neil Patel wrote:
I can't get luasql to compile on CentOS 5.4:
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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? Thanks, Neil On Sat, Mar 27, 2010 at 9:32 AM, Aloysius Lloyd <lloyd.aloysius@gmail.com>wrote:
Hi Niel,
Lua Mysql driver is not recommended. Use the Lua ODBC driver for the connectivity. Enable the ODBC in the config file
Here is the modification need in the config file
CFLAGS= -O2 *-fPIC* $(WARN) -I$(COMPAT_DIR) $(DRIVER_INCS) $(INCS) $(DEFS)
Hope this will help you to solve the problem.
Thanks Lloyd
On Sat, Mar 27, 2010 at 12:15 PM, Brian West <brian@freeswitch.org> wrote:
Because the rpm's were not compiled with -fPIC its getting fixed.. till then you'll have to compile it yourself.
/b
On Mar 26, 2010, at 10:16 PM, Neil Patel wrote:
I can't get luasql to compile on CentOS 5.4:
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Try: rm -f src/luasql.o make Mathieu Rene Avant-Garde Solutions Inc Office: + 1 (514) 664-1044 x100 Cell: +1 (514) 664-1044 x200 mrene@avgs.ca On 2010-03-29, at 12:44 AM, Neil Patel 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?
Thanks, Neil
On Sat, Mar 27, 2010 at 9:32 AM, Aloysius Lloyd <lloyd.aloysius@gmail.com
wrote: Hi Niel,
Lua Mysql driver is not recommended. Use the Lua ODBC driver for the connectivity. Enable the ODBC in the config file
Here is the modification need in the config file
CFLAGS= -O2 -fPIC $(WARN) -I$(COMPAT_DIR) $(DRIVER_INCS) $(INCS) $ (DEFS)
Hope this will help you to solve the problem.
Thanks Lloyd
On Sat, Mar 27, 2010 at 12:15 PM, Brian West <brian@freeswitch.org> wrote: Because the rpm's were not compiled with -fPIC its getting fixed.. till then you'll have to compile it yourself.
/b
On Mar 26, 2010, at 10:16 PM, Neil Patel wrote:
I can't get luasql to compile on CentOS 5.4:
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
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.
Thanks all, got it to compile and seems like my odbc connection is working properly: [root@topaz bin]# isql maxpowersoft_odbc <myUser> <myPwd> +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> In my lua script I have require "luasql.odbc" But am getting this error: 2010-03-28 22:21:42.080859 [ERR] mod_lua.cpp:182 /usr/local/freeswitch/scripts/AO/paths.lua:49: [unixODBC][Driver Manager]Data source name not found, and no default driver specified The line it's failing on is: env = assert (luasql.odbc()); Thanks in advance for letting me know what I'm doing wrong. Best, Neil On Sun, Mar 28, 2010 at 10:03 PM, mayamatakeshi <mayamatakeshi@gmail.com>wrote:
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.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Did you uncomment from the following line in config file. T= odbc Thanks Lloyd On Mon, Mar 29, 2010 at 3:30 AM, Neil Patel <neilp@cs.stanford.edu> wrote:
Thanks all, got it to compile and seems like my odbc connection is working properly:
[root@topaz bin]# isql maxpowersoft_odbc <myUser> <myPwd> +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL>
In my lua script I have
require "luasql.odbc"
But am getting this error:
2010-03-28 22:21:42.080859 [ERR] mod_lua.cpp:182 /usr/local/freeswitch/scripts/AO/paths.lua:49: [unixODBC][Driver Manager]Data source name not found, and no default driver specified
The line it's failing on is:
env = assert (luasql.odbc());
Thanks in advance for letting me know what I'm doing wrong.
Best, Neil
On Sun, Mar 28, 2010 at 10:03 PM, mayamatakeshi <mayamatakeshi@gmail.com>wrote:
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.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Yes! I followed the instructions here<http://wiki.freeswitch.org/wiki/Mod_spidermonkey_odbc#Manual_Installation>for setting up ODBC, including linking the .ini files in freeswitch/etc. Based on the test below it seems that the driver is working properly. Is the code below correct (i.e. 'require "luasql.odbc";' and 'env = assert(luasql.odbc());')? Thanks, Neil On Mon, Mar 29, 2010 at 7:55 AM, Aloysius Lloyd <lloyd.aloysius@gmail.com>wrote:
Did you uncomment from the following line in config file.
T= odbc
Thanks Lloyd
On Mon, Mar 29, 2010 at 3:30 AM, Neil Patel <neilp@cs.stanford.edu> wrote:
Thanks all, got it to compile and seems like my odbc connection is working properly:
[root@topaz bin]# isql maxpowersoft_odbc <myUser> <myPwd> +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL>
In my lua script I have
require "luasql.odbc"
But am getting this error:
2010-03-28 22:21:42.080859 [ERR] mod_lua.cpp:182 /usr/local/freeswitch/scripts/AO/paths.lua:49: [unixODBC][Driver Manager]Data source name not found, and no default driver specified
The line it's failing on is:
env = assert (luasql.odbc());
Thanks in advance for letting me know what I'm doing wrong.
Best, Neil
On Sun, Mar 28, 2010 at 10:03 PM, mayamatakeshi <mayamatakeshi@gmail.com>wrote:
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.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
The config is correct. But that is UnixODBC configuration. Then you need to load the LUA odbc driver for lua code access the UnixODBC. Did you load the luasql.odbc? The code is correct. Thanks Lloyd On Mon, Mar 29, 2010 at 11:46 AM, Neil Patel <neilp@cs.stanford.edu> wrote:
Yes! I followed the instructions here<http://wiki.freeswitch.org/wiki/Mod_spidermonkey_odbc#Manual_Installation>for setting up ODBC, including linking the .ini files in freeswitch/etc. Based on the test below it seems that the driver is working properly. Is the code below correct (i.e. 'require "luasql.odbc";' and 'env = assert(luasql.odbc());')?
Thanks, Neil
On Mon, Mar 29, 2010 at 7:55 AM, Aloysius Lloyd <lloyd.aloysius@gmail.com>wrote:
Did you uncomment from the following line in config file.
T= odbc
Thanks Lloyd
On Mon, Mar 29, 2010 at 3:30 AM, Neil Patel <neilp@cs.stanford.edu>wrote:
Thanks all, got it to compile and seems like my odbc connection is working properly:
[root@topaz bin]# isql maxpowersoft_odbc <myUser> <myPwd> +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL>
In my lua script I have
require "luasql.odbc"
But am getting this error:
2010-03-28 22:21:42.080859 [ERR] mod_lua.cpp:182 /usr/local/freeswitch/scripts/AO/paths.lua:49: [unixODBC][Driver Manager]Data source name not found, and no default driver specified
The line it's failing on is:
env = assert (luasql.odbc());
Thanks in advance for letting me know what I'm doing wrong.
Best, Neil
On Sun, Mar 28, 2010 at 10:03 PM, mayamatakeshi <mayamatakeshi@gmail.com
wrote:
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.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Do you mean did I have this in my code? require "luasql.odbc"; Yes, that is there. On Mon, Mar 29, 2010 at 8:57 AM, Aloysius Lloyd <lloyd.aloysius@gmail.com>wrote:
The config is correct. But that is UnixODBC configuration. Then you need to load the LUA odbc driver for lua code access the UnixODBC.
Did you load the luasql.odbc?
The code is correct.
Thanks Lloyd
On Mon, Mar 29, 2010 at 11:46 AM, Neil Patel <neilp@cs.stanford.edu>wrote:
Yes! I followed the instructions here<http://wiki.freeswitch.org/wiki/Mod_spidermonkey_odbc#Manual_Installation>for setting up ODBC, including linking the .ini files in freeswitch/etc. Based on the test below it seems that the driver is working properly. Is the code below correct (i.e. 'require "luasql.odbc";' and 'env = assert(luasql.odbc());')?
Thanks, Neil
On Mon, Mar 29, 2010 at 7:55 AM, Aloysius Lloyd <lloyd.aloysius@gmail.com
wrote:
Did you uncomment from the following line in config file.
T= odbc
Thanks Lloyd
On Mon, Mar 29, 2010 at 3:30 AM, Neil Patel <neilp@cs.stanford.edu>wrote:
Thanks all, got it to compile and seems like my odbc connection is working properly:
[root@topaz bin]# isql maxpowersoft_odbc <myUser> <myPwd> +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL>
In my lua script I have
require "luasql.odbc"
But am getting this error:
2010-03-28 22:21:42.080859 [ERR] mod_lua.cpp:182 /usr/local/freeswitch/scripts/AO/paths.lua:49: [unixODBC][Driver Manager]Data source name not found, and no default driver specified
The line it's failing on is:
env = assert (luasql.odbc());
Thanks in advance for letting me know what I'm doing wrong.
Best, Neil
On Sun, Mar 28, 2010 at 10:03 PM, mayamatakeshi < mayamatakeshi@gmail.com> wrote:
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.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
No that is not my question. Did you successfully install luasql with odbc driver enabled in the config file? On Mon, Mar 29, 2010 at 12:17 PM, Neil Patel <neilp@cs.stanford.edu> wrote:
Do you mean did I have this in my code?
require "luasql.odbc";
Yes, that is there.
On Mon, Mar 29, 2010 at 8:57 AM, Aloysius Lloyd <lloyd.aloysius@gmail.com>wrote:
The config is correct. But that is UnixODBC configuration. Then you need to load the LUA odbc driver for lua code access the UnixODBC.
Did you load the luasql.odbc?
The code is correct.
Thanks Lloyd
On Mon, Mar 29, 2010 at 11:46 AM, Neil Patel <neilp@cs.stanford.edu>wrote:
Yes! I followed the instructions here<http://wiki.freeswitch.org/wiki/Mod_spidermonkey_odbc#Manual_Installation>for setting up ODBC, including linking the .ini files in freeswitch/etc. Based on the test below it seems that the driver is working properly. Is the code below correct (i.e. 'require "luasql.odbc";' and 'env = assert(luasql.odbc());')?
Thanks, Neil
On Mon, Mar 29, 2010 at 7:55 AM, Aloysius Lloyd < lloyd.aloysius@gmail.com> wrote:
Did you uncomment from the following line in config file.
T= odbc
Thanks Lloyd
On Mon, Mar 29, 2010 at 3:30 AM, Neil Patel <neilp@cs.stanford.edu>wrote:
Thanks all, got it to compile and seems like my odbc connection is working properly:
[root@topaz bin]# isql maxpowersoft_odbc <myUser> <myPwd> +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL>
In my lua script I have
require "luasql.odbc"
But am getting this error:
2010-03-28 22:21:42.080859 [ERR] mod_lua.cpp:182 /usr/local/freeswitch/scripts/AO/paths.lua:49: [unixODBC][Driver Manager]Data source name not found, and no default driver specified
The line it's failing on is:
env = assert (luasql.odbc());
Thanks in advance for letting me know what I'm doing wrong.
Best, Neil
On Sun, Mar 28, 2010 at 10:03 PM, mayamatakeshi < mayamatakeshi@gmail.com> wrote:
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.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (5)
-
Aloysius Lloyd
-
Brian West
-
Mathieu Rene
-
mayamatakeshi
-
Neil Patel