luajava
luajava copied to clipboard
Build on OSX
It seems like the Makefile is not longer able to work on OSX 10.7.5.
I keep getting issues along the lines of :
In file included from src/c/luajava.c:39: src/c/luajava.h:2:17: error: jni.h: No such file or directory
It seems that in the switch from Apple to Oracle, things have been moved.
There's no hardcoding of the paths to the headers in the Makefile that I can see. Assuming you have a JDK installed you could simply symlink the jdk include directory to /usr/include and resolve that issue. If it was a Makefile change, you'd see a cc parameter such as -I/usr/java/include, which you don't. So I'm guessing you might only have a JRE installed.
Placeholder - I'll update when I'm on my Mac at home and can verify.
I have successfully compiled it on Mac OSX, altering the following lines in...
Makefile: $(SO_FILE): $(OBJS) export MACOSX_DEPLOYMENT_TARGET=10.11; $(CC) $(LIB_OPTION) -o $@ $? $(LIB_LUA)
config: INCS= -I$(JDK)/include -I$(JDK)/include/linux -I$(LUA_INCLUDES) -I$(JDK_HOME)/include -I$(JDK_HOME)/include/darwin