2

I'm installing LuaSec 0.9 via LuaRocks 3.3.1 with OpenSSL 1.1.1g (via MacPorts).

I use luarocks install OPENSSL_DIR=/opt/local luasec

The compilation/installation is successful for Lua 5.1, 5.2, and 5.3

However, when I attempt to use it, I get errors, as follows:

  1. Lua 5.1
  • dlopen(/usr/local/lib/lua/5.1/ssl.so, 2): Symbol not found: _luaL_checkversion_
  1. Lua 5.2
  • dlopen(/usr/local/lib/lua/5.2/ssl.so, 6): Symbol not found: _lua_rotate
  1. Lua 5.3
  • success
LiamF
  • 523
  • 3
  • 13

1 Answers1

0

Turns out this is not a luasec or Lua issue; it's an issue with LuaRocks after upgrading to the latest version. The situation has been resolved; see here.

LiamF
  • 523
  • 3
  • 13
  • Following the link, was the resolution that you figured out how to use the poorly-if-at-all documented `--lua-dir` and `--lua-version` flags? If so, some description of that solution might be helpful here. – ad absurdum Jul 27 '20 at 13:59
  • 1
    The precise solution depends on how you build and install your Lua interpreters. I install them in `/usr/local/lua-5.X` where `X` is the minor version. Therefore, a typical `luarocks` invocation (for me) would be something like `luarocks install --lua-version=5.2 --lua-dir=/usr/local/lua-5.2 OPENSSL_DIR=/opt/local luasec` Both flags are needed. – LiamF Aug 02 '20 at 21:52