You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The build system shows it can not find malloc / free...
% luarocks install lzmq ZMQ_INCDIR=/opt/homebrew/Cellar/zeromq/4.3.5_1/include
Warning: falling back to wget - install luasec >= 1.1 to get native HTTPS support
Installing https://luarocks.org/lzmq-0.4.4-1.src.rock
lzmq 0.4.4-1 depends on lua >= 5.1, < 5.4 (5.1-1 provided by VM: success)
env MACOSX_DEPLOYMENT_TARGET=11.0 gcc -O2 -fPIC -I/Users/lo/Documents/DevTools/lua/include/luajit-2.1 -c src/lzmq.c -o src/lzmq.o -DLUAZMQ_USE_SEND_AS_BUF -DLUAZMQ_USE_TEMP_BUFFERS -DLUAZMQ_USE_ERR_TYPE_OBJECT -I/opt/homebrew/Cellar/zeromq/4.3.5_1/include
src/lzmq.c:371:10: error: call to undeclared library function 'malloc' with type 'void *(unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
dest = LUAZMQ_ALLOC_TEMP(buffer_storage, dest_len);
^
src/lzutils.h:90:67: note: expanded from macro 'LUAZMQ_ALLOC_TEMP'
# define LUAZMQ_ALLOC_TEMP(BUF, SIZE) (sizeof(BUF) >= SIZE)?(BUF):malloc(SIZE)
^
src/lzmq.c:371:10: note: include the header <stdlib.h> or explicitly provide a declaration for 'malloc'
src/lzutils.h:90:67: note: expanded from macro 'LUAZMQ_ALLOC_TEMP'
# define LUAZMQ_ALLOC_TEMP(BUF, SIZE) (sizeof(BUF) >= SIZE)?(BUF):malloc(SIZE)
^
src/lzmq.c:374:3: error: call to undeclared library function 'free' with type 'void (void *)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
LUAZMQ_FREE_TEMP(buffer_storage, dest);
^
src/lzutils.h:91:58: note: expanded from macro 'LUAZMQ_FREE_TEMP'
# define LUAZMQ_FREE_TEMP(BUF, PTR) do{if((PTR) != (BUF))free((void*)PTR);}while(0)
^
src/lzmq.c:374:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'free'
src/lzutils.h:91:58: note: expanded from macro 'LUAZMQ_FREE_TEMP'
# define LUAZMQ_FREE_TEMP(BUF, PTR) do{if((PTR) != (BUF))free((void*)PTR);}while(0)
^
2 errors generated.
Error: Build error: Failed compiling object src/lzmq.o
The text was updated successfully, but these errors were encountered:
The build system shows it can not find malloc / free...
The text was updated successfully, but these errors were encountered: