Bug #1038
Freeswitch scripts dependencies with lua (maybe even with other modules)
| Status: | Closed | Start date: | 03/02/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% | |
| Category: | Aports | |||
| Target version: | Alpine 2.5.0 | |||
| Affected versions: |
Description
using luasql.sqlite3 in a freeswitch script (/etc/freeswitch/scripts/*) returns the following error:
2012-03-02 12:29:17.854519 [ERR] mod_lua.cpp:191 /etc/freeswitch/scripts/ucd.lua:9: module 'luasql.sqlite3' not found:
no field package.preload['luasql.sqlite3']
no file './luasql/sqlite3.lua'
no file '/usr/local/share/lua/5.1/luasql/sqlite3.lua'
no file '/usr/local/share/lua/5.1/luasql/sqlite3/init.lua'
no file '/usr/local/lib/lua/5.1/luasql/sqlite3.lua'
no file '/usr/local/lib/lua/5.1/luasql/sqlite3/init.lua'
no file './luasql/sqlite3.so'
no file './libluasql/sqlite351.so'
no file '/usr/local/lib/lua/5.1/luasql/sqlite3.so'
no file '/usr/local/lib/lua/5.1/libluasql/sqlite351.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './luasql.so'
no file './libluasql51.so'
no file '/usr/local/lib/lua/5.1/luasql.so'
no file '/usr/local/lib/lua/5.1/libluasql51.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
/etc/freeswitch/scripts/ucd.lua:9: in main chunk
Seems that freeswitch is not compiled against liblua:
readelf -d /usr/bin/freeswitch
-------------
Dynamic section at offset 0x3314 contains 26 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libfreeswitch.so.1]
0x00000001 (NEEDED) Shared library: [libuuid.so.1]
0x00000001 (NEEDED) Shared library: [librt.so.0.9.32]
0x00000001 (NEEDED) Shared library: [libcrypt.so.0.9.32]
0x00000001 (NEEDED) Shared library: [libpthread.so.0.9.32]
0x00000001 (NEEDED) Shared library: [libc.so.0.9.32]
0x0000000f (RPATH) Library rpath: [/usr/lib]
0x0000000c (INIT) 0xd40
0x0000000d (FINI) 0x26f4
0x00000004 (HASH) 0x110
0x00000005 (STRTAB) 0x79c
0x00000006 (SYMTAB) 0x33c
0x0000000a (STRSZ) 899 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000015 (DEBUG) 0x0
0x00000003 (PLTGOT) 0x4424
0x00000002 (PLTRELSZ) 472 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0xb68
0x00000011 (REL) 0xb20
0x00000012 (RELSZ) 72 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x00000018 (BIND_NOW)
0x6ffffffb (FLAGS_1) Flags: NOW
0x6ffffffa (RELCOUNT) 4
0x00000000 (NULL) 0x0
-------------
scanelf -n /usr/bin/freeswitch
-------------
TYPE NEEDED FILE
ET_DYN libfreeswitch.so.1,libuuid.so.1,librt.so.0.9.32,libcrypt.so.0.9.32,libpthread.so.0.9.32,libc.so.0.9.32 /usr/bin/freeswitch
-------------
History
#1
Updated by Cameron Banta about 1 year ago
This can be fixed by adding something like the following to the freeswitch config xml file:
<configuration name="lua.conf" description="Lua Config">
<settings>
<param name="script-directory"
value="$${base_dir}/scripts/?.lua;/usr/share/lua/5.1/?.lua"/>
<param name="module-directory" value="/usr/lib/lua/5.1/?.so"/>
</settings>
</configuration>
If you're using the sample freeswitch configs, I think the lines are already in the config, you just need to uncomment them.
#2
Updated by Natanael Copa 12 months ago
- Category set to Aports
- Target version set to Alpine 2.5.0
is this a bug or a config issue?
should we patch the default config?