Skip to content
This repository has been archived by the owner on Oct 14, 2018. It is now read-only.

Luacrypto #241

Open
Sethlans opened this issue Jun 6, 2015 · 9 comments
Open

Luacrypto #241

Sethlans opened this issue Jun 6, 2015 · 9 comments

Comments

@Sethlans
Copy link

Sethlans commented Jun 6, 2015

Hello. When i try to install the bot i got this error

Missing dependencies for oauth:
luacrypto

Using https://rocks.moonscript.org/luacrypto-0.3.0.20120524-1.src.rock... switching to 'build' mode
gcc -O2 -fPIC -I/usr/include -c src/lcrypto.c -o src/lcrypto.o -I/usr/include
In file included from src/lcrypto.c:31:0:
src/lcrypto.h:30:79: error: unknown type name ‘luaL_reg’
LUACRYPTO_API int luacrypto_createmeta (lua_State *L, const char *name, const luaL_reg *methods);
^
src/lcrypto.c:1708:79: error: unknown type name ‘luaL_reg’
LUACRYPTO_API int luacrypto_createmeta (lua_State *L, const char *name, const luaL_reg *methods)
^
src/lcrypto.c: In function ‘create_metatables’:
src/lcrypto.c:1758:19: error: array type has incomplete element type
struct luaL_reg core_functions[] = {
^
src/lcrypto.c:1763:19: error: array type has incomplete element type
struct luaL_reg digest_methods[] = {
^
src/lcrypto.c:1773:15: error: array type has incomplete element type
EVP_METHODS(encrypt);
^
src/lcrypto.c:1744:19: note: in definition of macro ‘EVP_METHODS’
struct luaL_reg name##_methods[] = {
^
src/lcrypto.c:1774:15: error: array type has incomplete element type
EVP_METHODS(decrypt);
^
src/lcrypto.c:1744:19: note: in definition of macro ‘EVP_METHODS’
struct luaL_reg name##_methods[] = {
^
src/lcrypto.c:1775:15: error: array type has incomplete element type
EVP_METHODS(sign);
^
src/lcrypto.c:1744:19: note: in definition of macro ‘EVP_METHODS’
struct luaL_reg name##_methods[] = {
^
src/lcrypto.c:1776:15: error: array type has incomplete element type
EVP_METHODS(verify);
^
src/lcrypto.c:1744:19: note: in definition of macro ‘EVP_METHODS’
struct luaL_reg name##_methods[] = {
^
src/lcrypto.c:1777:15: error: array type has incomplete element type
EVP_METHODS(seal);
^
src/lcrypto.c:1744:19: note: in definition of macro ‘EVP_METHODS’
struct luaL_reg name##_methods[] = {
^
src/lcrypto.c:1778:15: error: array type has incomplete element type
EVP_METHODS(open);
^
src/lcrypto.c:1744:19: note: in definition of macro ‘EVP_METHODS’
struct luaL_reg name##_methods[] = {
^
src/lcrypto.c:1779:19: error: array type has incomplete element type
struct luaL_reg hmac_functions[] = {
^
src/lcrypto.c:1784:19: error: array type has incomplete element type
struct luaL_reg hmac_methods[] = {
^
src/lcrypto.c:1794:19: error: array type has incomplete element type
struct luaL_reg rand_functions[] = {
^
src/lcrypto.c:1805:19: error: array type has incomplete element type
struct luaL_reg pkey_functions[] = {
^
src/lcrypto.c:1811:19: error: array type has incomplete element type
struct luaL_reg pkey_methods[] = {
^
src/lcrypto.c:1818:19: error: array type has incomplete element type
struct luaL_reg x509_functions[] = {
^
src/lcrypto.c:1821:19: error: array type has incomplete element type
struct luaL_reg x509_methods[] = {
^
src/lcrypto.c:1827:19: error: array type has incomplete element type
struct luaL_reg x509_ca_functions[] = {
^
src/lcrypto.c:1830:19: error: array type has incomplete element type
struct luaL_reg x509_ca_methods[] = {
^
src/lcrypto.c: In function ‘luaopen_crypto’:
src/lcrypto.c:1901:19: error: array type has incomplete element type
struct luaL_reg core[] = {
^

Error: Failed installing dependency: https://rocks.moonscript.org/luacrypto-0.3.0.20120524-1.src.rock - Build error: Failed compiling object src/lcrypto.o
Error. Exiting.

I am on Arch Linux

@rockneurotiko
Copy link
Collaborator

Install lua-sec and maybe lua-crypto from AUR.
And becareful, in arch default lua is lua 5.3.

@Sethlans
Copy link
Author

Sethlans commented Jun 6, 2015

So I have to install the 5.2 version?

@rockneurotiko
Copy link
Collaborator

Probably you will have to use lua-5.2 or lua-5.1 (I have it with lua 5.1)

@Sethlans
Copy link
Author

Sethlans commented Jun 6, 2015

I've noticed that i have Lua 5.3 installed

@starius
Copy link

starius commented Nov 2, 2015

Try the following command:

$ luarocks install luacrypto 0.3.2-1 --local

@starius
Copy link

starius commented Nov 2, 2015

The official rockspec for luacrypto has the following Lua version line:

dependencies = {
        "lua >= 5.1, < 5.3",
}

That is why luarocks doesn't list this version for Lua 5.3.

I have fixed incompatibilities with Lua 5.3 this issue in my fork of luacrypto and uploaded modified rockspec to gist.

The following command installs luacrypto from my fork. It should work for Lua 5.3.

$ luarocks install https://gist.githubusercontent.com/starius/b20d3e63929ae678c857/raw/4b4499f442337b6f577422364358590bd00c9d48/luacrypto-0.3.2-2.rockspec --local

You can use this workaround until this issue is fixed in the upstream.

@FuriouslyCurious
Copy link

Thank you - this rockspec workaround finally fixed my issue. Any idea when LuaCrypto rockspec will be updated in the main repository?

@starius
Copy link

starius commented Jul 3, 2016

Any idea when LuaCrypto rockspec will be updated in the main repository?

Unfortunately, the main repo seems abandoned.

@FuriouslyCurious
Copy link

Yeah :-( I have opened an issue, hopefully that gets it updated. Thank you for the workaround in the meantime!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants