[asterisk-bugs] [JIRA] (ASTERISK-27718) [patch] BuildSystem: Enable Lua in NetBSD.

Alexander Traud (JIRA) noreply at issues.asterisk.org
Mon Mar 5 07:58:13 CST 2018


Alexander Traud created ASTERISK-27718:
------------------------------------------

             Summary: [patch] BuildSystem: Enable Lua in NetBSD.
                 Key: ASTERISK-27718
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27718
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Core/BuildSystem
    Affects Versions: 15.2.2, 13.19.2
         Environment: NetBSD 7.1.1
            Reporter: Alexander Traud
            Severity: Minor
         Attachments: NetBSD_enable_lua.patch

Lua exists in several versions. The current version is 5.3. Asterisk started to leverage Lua with version 5.1. On some platforms, a default Lua exists, which is not pre/post-fixed with its version number in its path. For example in NetBSD:
* {{/usr/lib/liblua.so}} and
* {{/usr/include/lua.h}}.

In that case, the script {{./configure}} checks for the existence of the symbol {{luaL_openlib(.)}}. However, in recent versions of Lua, {{luaL_openlib(.)}} got removed. Therefore, {{./configure}} is not able to find Lua anymore. The trick is to use a symbol which is available in Lua 5.1, 5.2, and 5.3.

{{luaL_newstate(.)}} is already used for those Lua installations with the version number in the path. No reason is known, why the very same symbol should not be used for the pre/post-fix less installations. Consequently, the attached patch goes for that approach.

An even more smarter approach is discussed in ASTERISK-27638. However, for the start, this patch here is much easier.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list