Hello, I'm a developer with the MacPorts package management system, trying to compile LÖVE on OS X so that I can make it available in MacPorts.
In MacPorts we have lua 5.2.2. I understand that LÖVE 0.8.0 is not compatible with lua 5.2 so I am building the latest code from bitbucket, revision 5b2f0515b7052e8856b2f4e8844724a8db7ad63b.
I see you have an Xcode project file, but it assumes I have the dependencies installed as OS X frameworks. In MacPorts, those dependencies are built as normal libraries, not frameworks, so I'm not using the Xcode project. Instead I've patched your code to remove the special treatment of OS X based on the
LOVE_MACOSX define from several of your include files.
Initially, LÖVE's configure script failed with:
checking for library containing lua_pcall... no configure: error: Can't LÖVE without lua
until I found that I should use the
--with-luaversion=5.2 configure argument. Auto-detection of the lua version, or a message advising me to use this configure argument, would have been more helpful than this error message.
Ultimately however the build fails with:
libtool: compile: /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I.. -I. -I./modules -I./libraries -I./libraries/enet/libenet/include -I/usr/include/freetype2 -D_FILE_OFFSET_BITS=64 -isystem/opt/local/include -D_THREAD_SAFE -I/opt/local/include/SDL2 -pipe -Os -arch x86_64 -stdlib=libc++ -std=c++11 -MT libraries/enet/enet.lo -MD -MP -MF libraries/enet/.deps/enet.Tpo -c libraries/enet/enet.cpp -fno-common -DPIC -o libraries/enet/.libs/enet.o libraries/enet/enet.cpp:729:2: error: use of undeclared identifier 'luaL_register' luaL_register(l, NULL, enet_host_funcs); ^ libraries/enet/enet.cpp:736:2: error: use of undeclared identifier 'luaL_register' luaL_register(l, NULL, enet_peer_funcs); ^ libraries/enet/enet.cpp:751:2: error: use of undeclared identifier 'luaL_register' luaL_register(l, "enet", enet_funcs); ^ 3 errors generated.
My limited research suggests that
luaL_register was deleted in lua 5.2, so this seems to be a LÖVE code bug that needs to be fixed for lua 5.2 compatibility.