Skip to content

Mac install error 'depends on lua >= 5.1' #188

@fafrd

Description

@fafrd

Getting an error on MacOS Ventura 13.2.1 with an ARM mac.

I'm using Lua version 5.4.4 and luarocks 3.9.2

% luarocks install luacurl
Installing https://luarocks.org/luacurl-1.2.1-1.src.rock

luacurl 1.2.1-1 depends on lua >= 5.1 (5.4-1 provided by VM)
env MACOSX_DEPLOYMENT_TARGET=11.0 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c luacurl.c -o luacurl.o -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
luacurl.c:281:26: error: implicit declaration of function 'lua_strlen' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                memcpy(ptr, readBytes, lua_strlen(c->L, -1));
                                       ^
luacurl.c:354:41: error: implicit declaration of function 'lua_strlen' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                lua_pushstring(L, curl_escape(s, (int)lua_strlen(L, 1)));
                                                      ^
luacurl.c:369:43: error: implicit declaration of function 'lua_strlen' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                lua_pushstring(L, curl_unescape(s, (int)lua_strlen(L, 1)));
                                                        ^
luacurl.c:630:7: warning: '/*' within block comment [-Wcomment]
                                                /* userdata or function set the curl option value to the lua object reference */
                                                ^
luacurl.c:813:43: error: array has incomplete element type 'const struct luaL_reg'
static const struct luaL_reg luacurl_meths[] =
                                          ^
luacurl.c:813:21: note: forward declaration of 'struct luaL_reg'
static const struct luaL_reg luacurl_meths[] =
                    ^
luacurl.c:823:43: error: array has incomplete element type 'const struct luaL_reg'
static const struct luaL_reg luacurl_funcs[] =
                                          ^
luacurl.c:813:21: note: forward declaration of 'struct luaL_reg'
static const struct luaL_reg luacurl_meths[] =
                    ^
luacurl.c:1088:2: error: implicit declaration of function 'luaL_openlib' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        luaL_openlib (L, 0, luacurl_meths, 0);
        ^
1 warning and 6 errors generated.

Error: Build error: Failed compiling object luacurl.o

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions