luasocket icon indicating copy to clipboard operation
luasocket copied to clipboard

Lua.socket installation o Mac osx Mojave fails.

Open Josue198s opened this issue 5 years ago • 1 comments

DRFS-GSs-MacBook:luasocket drfs_gs$ make macosx /Applications/Xcode.app/Contents/Developer/usr/bin/make -C src macosx /Applications/Xcode.app/Contents/Developer/usr/bin/make all-unix PLAT=macosx gcc -I/opt/local/include/lua/5.1 -I/opt/local/include/lua5.1 -I/opt/local/include/lua-5.1 -DLUASOCKET_NODEBUG -DUNIX_HAS_SUN_LEN -Wall -O2 -fno-common -c -o luasocket.o luasocket.c In file included from luasocket.c:15: ./luasocket.h:27:10: fatal error: 'lua.h' file not found #include "lua.h" ^~~~~~~ 1 error generated. make[2]: *** [luasocket.o] Error 1 make[1]: *** [macosx] Error 2 make: *** [macosx] Error 2

Josue198s avatar Aug 17 '19 16:08 Josue198s

Here are two possible options -- both of which begin with knowing where your particular copy of lua.h has been installed.

  1. Use MYCFLAGS in your make command to instruct make to look in the additional location, e.g.
make -C src MYCFLAGS="-I/your/local/path" macosx
  1. Create a symbolic link in a place that is already searched for include files, e.g.
ln -sv /your/local/path/lua.h /usr/local/include/

ewestbrook avatar Aug 17 '19 19:08 ewestbrook

It seems like this has probably been addressed. If there is anything current to be dealt with here feel free to bring up specifics.

alerque avatar Nov 10 '23 19:11 alerque