lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I'm trying to install struct on OS-X (10.11), and am getting compile
errors.  I'm new to Lua, so I might be missing something obvious.  The
details are at the end:

I have Lua51 installed via macports, along with luarocks.  I'll
primarily be using it with luajit.

Anybody have this working?

Is there a way to get luarocks to use gcc?

Where would I send a bug?

Thanks,

Dan


sudo luarocks install struct

Installing https://luarocks.org/struct-1.2-2.src.rock...

Using https://luarocks.org/struct-1.2-2.src.rock... switching to 'build' mode

env MACOSX_DEPLOYMENT_TARGET=10.8 /usr/bin/clang -O2 -fPIC
-I/opt/local/include -c struct.c -o struct.o

struct.c:181:27: warning: implicit declaration of function
'luaL_putchar' is invalid in C99 [-Wimplicit-function-declaration]

    while (toalign-- > 0) luaL_putchar(&b, '\0');

                          ^

struct.c:318:37: error: array has incomplete element type 'const
struct luaL_reg'

static const struct luaL_reg thislib[] = {

                                    ^

struct.c:318:21: note: forward declaration of 'struct luaL_reg'

static const struct luaL_reg thislib[] = {

                    ^

struct.c:326:3: warning: implicit declaration of function
'luaL_register' is invalid in C99 [-Wimplicit-function-declaration]

  luaL_register(L, "struct", thislib);

  ^

2 warnings and 1 error generated.


Error: Build error: Failed compiling object struct.o