[Home]

Summary:ASTERISK-24194: Loading AST_MODFLAG_DEFAULT in pbx_lua.c causes undefined symbol error
Reporter:Eric Howey (erichowey)Labels:
Date Opened:2014-08-08 11:03:36Date Closed:2014-08-08 11:36:54
Priority:MajorRegression?
Status:Closed/CompleteComponents:PBX/pbx_lua
Versions:11.11.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:CentOS 6.5 x64 Linux 2.6.32-431.1.2.0.1.el6.x86_64 Lua 5.1.4Attachments:
Description:When calling an outside lua library, such as lua-sql-mysql, the library fails to load. After searching on this issue, it appears to be resolved once before in ASTERISK-17279, but after looking through the changelog for 11.11.0, it was reverted back to its original setting in r416581-416668. This change triggers the same issue that was first found in ASTERISK-17279. Simply replacing AST_MODFLAG_DEFAULT with  AST_MODFLAG_GLOBAL_SYMBOLS in pbx_lua.c resolves the issue at hand.


{quote}
ERROR[3275][C-00000001] pbx_lua.c: Error executing lua extension:
error loading module 'luasql.mysql' from file '/usr/lib64/lua/5.1/luasql/mysql.so':
       /usr/lib64/lua/5.1/luasql/mysql.so: undefined symbol: lua_getfield
stack traceback:
       [C]: ?
       [C]: in function 'require'
       dialplan/db.lua:15: in function 'open'
       dialplan/find.lua:420: in function 'pstnExten'
       dialplan/main.lua:64: in function <dialplan/main.lua:52>
{quote}
Comments:By: George Joseph (gjoseph) 2014-08-08 11:36:54.706-0500

Duplicate of ASTERISK-23818

Patch committed and can be found here... https://reviewboard.asterisk.org/r/3891/



By: Eric Howey (erichowey) 2014-08-08 11:54:11.973-0500

Awesome, thanks! I missed that one. Sorry for opening the redundant issue.