Error while installing luajwtjitsi

I am trying to get information about rooms from the server. I have enabled “muc_size” module in the /etc/prosody/conf.d/localhost.cfg.lua and configured nginx. I am getting 404 error. My prosody log is like this:

I tried to install luajwtjitsi using luarocks-5.2, but it depends on luacrypto which gives a lot of error while installing. What should I do to avoid these errors? @saghul @damencho

I have some notes on installing those let me paste it here, probably it will help you:

"apt-get install liblua5.2-dev
wget https://keplerproject.github.io/luarocks/releases/luarocks-2.4.1.tar.gz
./configure --lua-version=5.2 --versioned-rocks-dir
make build
sudo make install
luarocks-5.2 install net-url"
luarocks-5.2  install basexx
apt-get install libssl1.0-dev
luarocks-5.2  install luajwtjitsi
luarocks-5.2  install lua-cjson 2.1.0-1

Thanks a lot for your help. It worked.

Now I am facing a different issues. Whenever I query for room-size with a room name it returns 404(room doesn’t exist) even if there is already a room with that room name.

While debugging, I saw that get_room_from_jid() function always returns nil.

What am I missing?

What is value you pass to get_room_from_jid?
Is it room@conference.mydomain.com?

Yes and also it worked after waiting for 5 minutes. Thanks a lot for your help.

sudo apt-get install libssl1.0-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package libssl1.0-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘libssl1.0-dev’ has no installation candidate

not able to install libssl1.0-dev. When trying to install luajwtjitsi it asks for crypto. Please suggest

further
libssl-dev is already the newest version (1.1.1c-1ubuntu4).

sudo luarocks-5.2 install luajwtjitsi
Installing https://luarocks.org/luajwtjitsi-1.3-7.rockspec
Missing dependencies for luajwtjitsi 1.3-7:
luacrypto >= 0.3.2-1 (not installed)
lua-cjson >= 2.1.0 (not installed)
lbase64 >= 20120807-3 (not installed)

luajwtjitsi 1.3-7 depends on luacrypto >= 0.3.2-1 (not installed)
Installing https://luarocks.org/luacrypto-0.3.2-2.src.rock
gcc -O2 -fPIC -I/usr/include/lua5.2 -c src/lcrypto.c -o src/lcrypto.o -I/usr/include
src/lcrypto.c: In function ‘digest_pnew’:
src/lcrypto.c:81:61: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_MD_CTX’ {aka ‘struct evp_md_ctx_st’}
81 | EVP_MD_CTX *c = (EVP_MD_CTX *)lua_newuserdata(L, sizeof(EVP_MD_CTX));
| ^~~~~~~~~~
src/lcrypto.c: In function ‘digest_reset’:
src/lcrypto.c:120:10: warning: implicit declaration of function ‘EVP_MD_CTX_cleanup’; did you mean ‘EVP_MD_CTX_create’? [-Wimplicit-function-declaration]
120 | if (!EVP_MD_CTX_cleanup©)
| ^~~~~~~~~~~~~~~~~~
| EVP_MD_CTX_create
src/lcrypto.c: In function ‘encrypt_pnew’:
src/lcrypto.c:331:69: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX’ {aka ‘struct evp_cipher_ctx_st’}
331 | EVP_CIPHER_CTX *c = (EVP_CIPHER_CTX *)lua_newuserdata(L, sizeof(EVP_CIPHER_CTX));
| ^~~~~~~~~~~~~~
src/lcrypto.c: In function ‘encrypt_fencrypt’:
src/lcrypto.c:425:20: error: storage size of ‘c’ isn’t known
425 | EVP_CIPHER_CTX c;
| ^
src/lcrypto.c: In function ‘decrypt_pnew’:
src/lcrypto.c:470:69: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX’ {aka ‘struct evp_cipher_ctx_st’}
470 | EVP_CIPHER_CTX *c = (EVP_CIPHER_CTX *)lua_newuserdata(L, sizeof(EVP_CIPHER_CTX));
| ^~~~~~~~~~~~~~
src/lcrypto.c: In function ‘decrypt_fdecrypt’:
src/lcrypto.c:561:20: error: storage size of ‘c’ isn’t known
561 | EVP_CIPHER_CTX c;
| ^
src/lcrypto.c: In function ‘hmac_pnew’:
src/lcrypto.c:604:57: error: invalid application of ‘sizeof’ to incomplete type ‘HMAC_CTX’ {aka ‘struct hmac_ctx_st’}
604 | HMAC_CTX *c = (HMAC_CTX *)lua_newuserdata(L, sizeof(HMAC_CTX));
| ^~~~~~~~
src/lcrypto.c: In function ‘hmac_fnew’:
src/lcrypto.c:621:5: warning: implicit declaration of function ‘HMAC_CTX_init’; did you mean ‘HMAC_CTX_new’? [-Wimplicit-function-declaration]
621 | HMAC_CTX_init©;
| ^~~~~~~~~~~~~
| HMAC_CTX_new
src/lcrypto.c: In function ‘hmac_clone’:
src/lcrypto.c:631:5: error: dereferencing pointer to incomplete type ‘HMAC_CTX’ {aka ‘struct hmac_ctx_st’}
631 | *d = *c;
| ^~
src/lcrypto.c: In function ‘hmac_gc’:
src/lcrypto.c:697:5: warning: implicit declaration of function ‘HMAC_CTX_cleanup’ [-Wimplicit-function-declaration]
697 | HMAC_CTX_cleanup©;
| ^~~~~~~~~~~~~~~~
src/lcrypto.c: In function ‘hmac_fdigest’:
src/lcrypto.c:711:14: error: storage size of ‘c’ isn’t known
711 | HMAC_CTX c;
| ^
src/lcrypto.c: In function ‘sign_pnew’:
src/lcrypto.c:747:61: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_MD_CTX’ {aka ‘struct evp_md_ctx_st’}
747 | EVP_MD_CTX *c = (EVP_MD_CTX *)lua_newuserdata(L, sizeof(EVP_MD_CTX));
| ^~~~~~~~~~
src/lcrypto.c: In function ‘sign_fsign’:
src/lcrypto.c:828:20: error: storage size of ‘c’ isn’t known
828 | EVP_MD_CTX c;
| ^
src/lcrypto.c: In function ‘verify_pnew’:
src/lcrypto.c:857:61: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_MD_CTX’ {aka ‘struct evp_md_ctx_st’}
857 | EVP_MD_CTX *c = (EVP_MD_CTX *)lua_newuserdata(L, sizeof(EVP_MD_CTX));
| ^~~~~~~~~~
src/lcrypto.c: In function ‘verify_fverify’:
src/lcrypto.c:940:20: error: storage size of ‘c’ isn’t known
940 | EVP_MD_CTX c;
| ^
src/lcrypto.c: In function ‘rand_pseudo_bytes’:
src/lcrypto.c:992:5: warning: ‘RAND_pseudo_bytes’ is deprecated [-Wdeprecated-declarations]
992 | return rand_do_bytes(L, RAND_pseudo_bytes);
| ^~~~~~
In file included from /usr/include/openssl/e_os2.h:13,
from /usr/include/openssl/err.h:13,
from src/lcrypto.c:7:
/usr/include/openssl/rand.h:44:1: note: declared here
44 | DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
| ^~~~~~~~~~~~~~~~~~
src/lcrypto.c: In function ‘pkey_generate’:
src/lcrypto.c:1064:9: warning: ‘RSA_generate_key’ is deprecated [-Wdeprecated-declarations]
1064 | RSA *rsa = RSA_generate_key(key_len, RSA_F4, NULL, NULL);
| ^~~
In file included from /usr/include/openssl/e_os2.h:13,
from /usr/include/openssl/err.h:13,
from src/lcrypto.c:7:
/usr/include/openssl/rsa.h:234:1: note: declared here
234 | DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
| ^~~~~~~~~~~~~~~~~~
src/lcrypto.c:1074:9: warning: ‘DSA_generate_parameters’ is deprecated [-Wdeprecated-declarations]
1074 | DSA *dsa = DSA_generate_parameters(key_len, NULL, 0, NULL, NULL, NULL, NULL);
| ^~~
In file included from /usr/include/openssl/e_os2.h:13,
from /usr/include/openssl/err.h:13,
from src/lcrypto.c:7:
/usr/include/openssl/dsa.h:117:1: note: declared here
117 | DEPRECATEDIN_0_9_8(DSA *DSA_generate_parameters(int bits,
| ^~~~~~~~~~~~~~~~~~
src/lcrypto.c: In function ‘pkey_to_pem’:
src/lcrypto.c:1164:27: error: dereferencing pointer to incomplete type ‘struct evp_pkey_st’
1164 | if (private && pkey_st->type == EVP_PKEY_DSA)
| ^~
src/lcrypto.c: In function ‘pkey_tostring’:
src/lcrypto.c:1277:60: error: dereferencing pointer to incomplete type ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
1277 | sprintf(buf, “%s %s %d %p”, LUACRYPTO_PKEYNAME, (*pkey)->type == EVP_PKEY_DSA ? “DSA” : “RSA”, EVP_PKEY_bits(*pkey), pkey);
| ^~
src/lcrypto.c: In function ‘seal_pnew’:
src/lcrypto.c:1299:46: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX’ {aka ‘struct evp_cipher_ctx_st’}
1299 | c->ctx = (EVP_CIPHER_CTX *)malloc(sizeof(EVP_CIPHER_CTX));
| ^~~~~~~~~~~~~~
In file included from src/lcrypto.c:8:
src/lcrypto.c: In function ‘seal_tostring’:
src/lcrypto.c:1320:81: error: dereferencing pointer to incomplete type ‘EVP_CIPHER_CTX’ {aka ‘struct evp_cipher_ctx_st’}
1320 | sprintf(s, “%s %p %s”, LUACRYPTO_SEALNAME, (void *)c, EVP_CIPHER_name(c->ctx->cipher));
| ^~
src/lcrypto.c: In function ‘seal_fseal’:
src/lcrypto.c:1400:20: error: storage size of ‘ctx’ isn’t known
1400 | EVP_CIPHER_CTX ctx;
| ^~~
src/lcrypto.c: In function ‘open_pnew’:
src/lcrypto.c:1483:46: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX’ {aka ‘struct evp_cipher_ctx_st’}
1483 | c->ctx = (EVP_CIPHER_CTX *)malloc(sizeof(EVP_CIPHER_CTX));
| ^~~~~~~~~~~~~~
src/lcrypto.c: In function ‘open_fopen’:
src/lcrypto.c:1602:20: error: storage size of ‘ctx’ isn’t known
1602 | EVP_CIPHER_CTX ctx;
| ^~~

Error: Failed installing dependency: https://luarocks.org/luacrypto-0.3.2-2.src.rock - Build error: Failed compiling object src/lcrypto.o

Yah, I’m running into the same issue on my Debian 10 aka Buster machine… and as far as I can tell it’s looking like luacrypto relies on the now deprecated structure sizes which they are trying to make opaque. So I think there may need to be code chances to lcrypto to support the new openssl context interface? I’m not clear on the differences between luacrypto and luacrypto2… but perhaps that might help? I need to get some sleep… will look a bit more in the morning.

root@comms:~# luarocks install luajwtjitsi
Installing https://luarocks.org/luajwtjitsi-1.3-7.rockspec
Missing dependencies for luajwtjitsi 1.3-7:
luacrypto >= 0.3.2-1 (not installed)

luajwtjitsi 1.3-7 depends on luacrypto >= 0.3.2-1 (not installed)
Installing https://luarocks.org/luacrypto-0.3.2-2.src.rock
gcc -O2 -fPIC -I/usr/include/lua5.2 -c src/lcrypto.c -o src/lcrypto.o -I/usr/include
src/lcrypto.c: In function ‘digest_pnew’:
src/lcrypto.c:81:61: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_MD_CTX’ {aka ‘struct evp_md_ctx_st’}
EVP_MD_CTX *c = (EVP_MD_CTX *)lua_newuserdata(L, sizeof(EVP_MD_CTX));
^~~~~~~~~~
src/lcrypto.c: In function ‘digest_reset’:
src/lcrypto.c:120:10: warning: implicit declaration of function ‘EVP_MD_CTX_cleanup’; did you mean ‘EVP_MD_CTX_create’? [-Wimplicit-function-declaration]
if (!EVP_MD_CTX_cleanup©)
^~~~~~~~~~~~~~~~~~
EVP_MD_CTX_create
src/lcrypto.c: In function ‘encrypt_pnew’:
src/lcrypto.c:331:69: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX’ {aka ‘struct evp_cipher_ctx_st’}
EVP_CIPHER_CTX *c = (EVP_CIPHER_CTX *)lua_newuserdata(L, sizeof(EVP_CIPHER_CTX));
^~~~~~~~~~~~~~
src/lcrypto.c: In function ‘encrypt_fencrypt’:
src/lcrypto.c:425:20: error: storage size of ‘c’ isn’t known
EVP_CIPHER_CTX c;
^
and more stuff…

Then a bit further on:

src/lcrypto.c: In function ‘rand_pseudo_bytes’:
src/lcrypto.c:992:5: warning: ‘RAND_pseudo_bytes’ is deprecated [-Wdeprecated-declarations]
return rand_do_bytes(L, RAND_pseudo_bytes);
^~~~~~
In file included from /usr/include/openssl/e_os2.h:13,
from /usr/include/openssl/err.h:13,
from src/lcrypto.c:7:
/usr/include/openssl/rand.h:44:1: note: declared here
DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
^~~~~~~~~~~~~~~~~~
src/lcrypto.c: In function ‘pkey_generate’:
src/lcrypto.c:1064:9: warning: ‘RSA_generate_key’ is deprecated [-Wdeprecated-declarations]
RSA *rsa = RSA_generate_key(key_len, RSA_F4, NULL, NULL);
^~~
In file included from /usr/include/openssl/e_os2.h:13,
from /usr/include/openssl/err.h:13,
from src/lcrypto.c:7:
/usr/include/openssl/rsa.h:234:1: note: declared here
DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
^~~~~~~~~~~~~~~~~~
src/lcrypto.c:1074:9: warning: ‘DSA_generate_parameters’ is deprecated [-Wdeprecated-declarations]
DSA *dsa = DSA_generate_parameters(key_len, NULL, 0, NULL, NULL, NULL, NULL);
^~~
In file included from /usr/include/openssl/e_os2.h:13,
from /usr/include/openssl/err.h:13,
from src/lcrypto.c:7:
/usr/include/openssl/dsa.h:117:1: note: declared here
DEPRECATEDIN_0_9_8(DSA *DSA_generate_parameters(int bits,
^~~~~~~~~~~~~~~~~~

For reference I’m running against

openssl version
OpenSSL 1.1.1d 10 Sep 2019

and was able to install lbase64 and lua-cjson with no issues, but that still leaves the issue of luacrypto, I tried installing luacrypto2… and it made no difference…

I have installed and still i am getting this prosody error
Jun 11 19:21:17 modulemanager error Unable to load module ‘blocklist’: /usr/lib/prosody/modules/mod_blocklist.lua: No such file or directory
Jun 11 19:21:17 vebinarr.website:muc_status error requires a version of Prosody with util.async
Jun 11 19:21:17 modulemanager error Error initializing module ‘muc_status’ on ‘vebinarr.website’: /usr/bin/prosody:168: module ‘basexx’ not found:Failed loading module basexx in LuaRocks rock basexx 0.4.1-1
no field package.preload[‘basexx’]
no file ‘/usr/lib/prosody/basexx.lua’
no file ‘/usr/local/share/lua/5.1/basexx.lua’
no file ‘/usr/local/share/lua/5.1/basexx/init.lua’
no file ‘/usr/local/lib/lua/5.1/basexx.lua’
no file ‘/usr/local/lib/lua/5.1/basexx/init.lua’
no file ‘/usr/share/lua/5.1/basexx.lua’
no file ‘/usr/share/lua/5.1/basexx/init.lua’
no file ‘/var/lib/prosody/.luarocks/share/lua/5.1/basexx.lua’
no file ‘/var/lib/prosody/.luarocks/share/lua/5.1/basexx/init.lua’
no file ‘/usr/lib/prosody/basexx.so’
no file ‘/usr/local/lib/lua/5.1/basexx.so’
no file ‘/usr/lib/x86_64-linux-gnu/lua/5.1/basexx.so’
no file ‘/usr/lib/lua/5.1/basexx.so’
no file ‘/usr/local/lib/lua/5.1/loadall.so’
no file ‘/var/lib/prosody/.luarocks/lib/lua/5.1/basexx.so’
stack traceback:
/usr/lib/prosody/core/modulemanager.lua:29: in function </usr/lib/prosody/core/modulemanager.lua:29>
[C]: in function ‘_real_require’
/usr/bin/prosody:168: in function ‘require’
…/share/jitsi-meet/prosody-plugins/token/util.lib.lua:4: in main chunk
(tail call): ?
…/share/jitsi-meet/prosody-plugins/mod_muc_status.lua:27: in main chunk
(tail call): ?
[C]: in function ‘xpcall’
/usr/lib/prosody/core/modulemanager.lua:29: in function ‘pcall’
/usr/lib/prosody/core/modulemanager.lua:171: in function ‘do_load_module’
/usr/lib/prosody/core/modulemanager.lua:249: in function ‘load’
/usr/lib/prosody/core/modulemanager.lua:74: in function ‘?’
/usr/lib/prosody/util/events.lua:67: in function ‘fire_event’
/usr/lib/prosody/core/hostmanager.lua:98: in function ‘activate’
/usr/lib/prosody/core/hostmanager.lua:44: in function ‘?’
/usr/lib/prosody/util/events.lua:67: in function ‘fire_event’
/usr/bin/prosody:337: in function ‘prepare_to_start’
/usr/bin/prosody:403: in main chunk
[C]: ?
Jun 11 19:21:17 modulemanager error Unable to load module ‘blocklist’: /usr/lib/prosody/modules/mod_blocklist.lua: No such file or directory
Jun 11 19:21:17 modulemanager error Unable to load module ‘auth_internal_plan’: /usr/lib/prosody/modules/mod_auth_internal_plan.lua: No such file or directory
Jun 11 19:21:17 localhost:tls error Unable to initialize TLS: No SSL/TLS configuration present for localhost
Jun 11 19:21:17 localhost:tls error Unable to initialize TLS: No SSL/TLS configuration present for localhost
Jun 11 19:21:17 modulemanager error Unable to load module ‘blocklist’: /usr/lib/prosody/modules/mod_blocklist.lua: No such file or directory
Jun 11 19:21:17 modulemanager error Unable to load module ‘blocklist’: /usr/lib/prosody/modules/mod_blocklist.lua: No such file or directory