lua-users home
lua-l archive

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


I have lua5.4 and luarocks installed via homebrew on the mac. There are no other installations of lua available. When I try

$ luarocks install physfs
Installing https://luarocks.org/physfs-0.1-3.src.rock

sh osxbuild.sh
lua-physfs.c:2:10: fatal error: 'lua.h' file not found
#include <lua.h>
         ^~~~~~~
1 error generated.
physfs/archiver_lzma.c:305:14: warning: overflow converting case value to switch condition type (2147500037 to -2147467259) [-Wswitch]
        case SZE_FAIL:
             ^
physfs/lzma/C/Archive/7z/../../Types.h:74:18: note: expanded from macro 'SZE_FAIL'
#define SZE_FAIL (0x80004005L)
                 ^
physfs/archiver_lzma.c:302:14: warning: overflow converting case value to switch condition type (2147500033 to -2147467263) [-Wswitch]
        case SZE_NOTIMPL:
             ^
physfs/lzma/C/Archive/7z/../../Types.h:73:21: note: expanded from macro 'SZE_NOTIMPL'
#define SZE_NOTIMPL (0x80004001L)
                    ^
physfs/archiver_lzma.c:296:14: warning: overflow converting case value to switch condition type (2147942414 to -2147024882) [-Wswitch]
        case SZE_OUTOFMEMORY:
             ^
physfs/lzma/C/Archive/7z/../../Types.h:72:25: note: expanded from macro 'SZE_OUTOFMEMORY'
#define SZE_OUTOFMEMORY (0x8007000EL)
                        ^
3 warnings generated.

Error: Build error: Failed building.

Now lua.h was installed to /usr/local/Cellar/lua/5.4.3/include/lua/lua.h by homebrew and lua itself is a link to the same place

$ ls -l `which lua`
lrwxr-xr-x  1 peterhickman  admin  27 20 Jul 22:34 /usr/local/bin/lua -> ../Cellar/lua/5.4.3/bin/lua

How can I get luarocks to look in /usr/local/Cellar/lua/5.4.3/include for lua.h?

I've tried fiddling with the available options and even tried "luarocks install physfs -- --include-dir /usr/local/Cellar/lua/5.4.3/include" but to no avail

All my googlefu brings up is how to install luarocks on OSX

Any pointers?