agraef / pd-lua

Lua bindings for Pd, updated for Lua 5.3+
https://agraef.github.io/pd-lua/
GNU General Public License v2.0
51 stars 11 forks source link

macOS with Homebrew lua: can't find lua.h #8

Closed wkc1986 closed 1 year ago

wkc1986 commented 4 years ago

It expects lua.h to be in /usr/include/lua. However Homebrew doesn't put it there.

$ make 
cc -I/usr/local/opt/ruby/include -I"/Applications/Pd-0.51-1.app/Contents/Resources/src" -DPD -DVERSION='"0.10.1"'  -fPIC -I/sw/include  -I/opt/local/include -Wall -W -g -I/usr/include/lua -ftree-vectorize -o pdlua.o -c pdlua.c
pdlua.c:45:10: fatal error: 'lua.h' file not found
#include <lua.h>   
         ^~~~~~~
1 error generated. 
make: *** [Makefile:307: pdlua.o] Error 1
$ find / -name lua.h
/usr/local/Cellar/lua/5.3.5_1/include/lua/lua.h
/usr/local/Cellar/lua/5.3.5_1/include/lua5.3/lua.h

Compiled after changing line 70 of Makefile:

#LUA_CFLAGS = -I/usr/include/lua
LUA_CFLAGS = -I/usr/local/Cellar/lua/5.3.5_1/include/lua

Though it still throws a couple warnings:

ld: warning: directory not found for option '-L/sw/lib'
ld: warning: directory not found for option '-L/opt/local/lib'  
agraef commented 1 year ago

This should be fixed in rev. 90707a5573121c0f74516eeb10de601ce03860e8.