Bug 237183 - net-im/prosody: unable to find LuaSec
Summary: net-im/prosody: unable to find LuaSec
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: David Thiel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-10 17:33 UTC by Zilon
Modified: 2019-08-14 18:57 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (lx)


Attachments
List of installed ports (4.19 KB, text/plain)
2019-08-14 08:26 UTC, Zilon
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zilon 2019-04-10 17:33:02 UTC
When I start or restart Prosody, it claims that it is unable to find LuaSec:

**************************
Prosody was unable to find LuaSec
This package can be obtained in the following ways:

        Source:           https://github.com/brunoos/luasec
        Debian/Ubuntu:    sudo apt-get install lua-sec
        luarocks:         luarocks install luasec

SSL/TLS support will not be available
More help can be found on our website, at https://prosody.im/doc/depends
**************************

The LuaSec port is installed. I already tried to reinstall Prosody and its dependencies but the message still occurs.
Comment 1 David Thiel freebsd_committer 2019-08-13 22:01:29 UTC
I'm not able to reproduce this in my environment. Perhaps you can attach your current list of packages?
Comment 2 Zilon 2019-08-14 08:26:57 UTC
Created attachment 206514 [details]
List of installed ports

Hello,
the list of installed ports is attached.

BR
Zilon
Comment 3 David Thiel freebsd_committer 2019-08-14 16:56:19 UTC
Ok, I don't see anything wrong there.  

As suggested by the devs, does

lua51 -e 'print(require"ssl" and "ok")'

Work correctly?
Comment 4 Zilon 2019-08-14 17:05:50 UTC
When I try

lua51 -e 'print(require"ssl" and "ok")'

I get the following error:

lua51: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.1/ssl.so':
        /usr/local/lib/lua/5.1/ssl.so: Undefined symbol "sk_num"
stack traceback:
        [C]: ?
        [C]: in function 'require'
        /usr/local/share/lua/5.1/ssl.lua:8: in main chunk
        [C]: in function 'require'
        (command line):1: in main chunk
        [C]: ?


Thany you for the hint. So this seems to be a Lua issue on my machine.
Comment 5 David Thiel freebsd_committer 2019-08-14 17:11:14 UTC
Interesting. Can you do an 

ldd /usr/local/lib/lua/5.1/ssl.so
Comment 6 Zilon 2019-08-14 17:13:56 UTC
This given the the following output:

/usr/local/lib/lua/5.1/ssl.so:
        libssl.so.111 => /usr/lib/libssl.so.111 (0x800677000)
        libcrypto.so.111 => /lib/libcrypto.so.111 (0x800e00000)
        libc.so.7 => /lib/libc.so.7 (0x800248000)
        libthr.so.3 => /lib/libthr.so.3 (0x80070c000)
Comment 7 David Thiel freebsd_committer 2019-08-14 17:24:25 UTC
Ok, unfortunately that doesn't clear much up. Only other thing I can think of is did you install the packages from pkg or ports?
Comment 8 Zilon 2019-08-14 17:27:00 UTC
OK, thank you so far.
I installed and also reinstalled from ports.
Comment 9 David Thiel freebsd_committer 2019-08-14 17:39:00 UTC
I'd say try uninstalling and installing straight from the pkg repos (latest) and see if it works. Otherwise, I'm unfortunately out of ideas.
Comment 10 Zilon 2019-08-14 18:46:40 UTC
That finally helped! Thank you!

The reason seems to be an issue with lua51-luasec-0.8 from ports. If then lua51-luasec-0.7 from packages is used, everything is fine.
Comment 11 David Thiel freebsd_committer 2019-08-14 18:57:41 UTC
Ok, cool. I actually only updated the port to LuaSec 0.8 yesterday, so that probably wasn't the original problem, but glad it works now. I've tested 0.8 in production, so when you update via packages, it should hopefully continue to work.