New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix building on Mac/Darwin #22
Conversation
Hey many thanks for trying on Mac! The changes looks fine, merged! I would like to know if all the test suite pass on Mac, to run the you need LuaRocks+Busted installed with Lua 5.4, can be tricky to setup, then you run |
I can get the tests to run if I use my system-installed Lua 5.4 and LuaRocks, but I'm having trouble getting Currently stuck on this error:
Are you installing LuaRocks using FWIW running
|
Running with the bundled nelua lua interpreter failed mostly because it was unable to find the LuaRocks libraries I think (would requires fixing the But running with vanilla Lua is enough! Thanks for running the tests! |
I did run into that issue at first, but I'm able to get past that by setting
The http://www.lua.org/source/5.4/lauxlib.c.html#luaL_checkudata So I'm thinking this might mean that compiling on macOS isn't totally fixed yet? Seems like I might not have the right linker flags set. |
This is fine, just the test suite is failing to run there due to busted dependencies, users don't need install busted or run the test suite to use Nelua, this is more for developers of the language (me). What is important for users on MacOS is to run files in the examples and tests folder, and from what I understood worked for you.
Actually you should have exported the variable, like:
|
Hi there, very cool project!
I'm running macOS Catalina and am not able to compile Nelua using just
make
:There seem to be a few issues:
-DLUA_USE_POSIX
, not justLUA_USE_POSIX
.#include <sys/time.h>
but_POSIX_TIMERS
isn't> 0
.ld
is different from GNU's and doesn't support-s
or-E
.This PR just checks for Darwin/Mac and sets the right flags. So far everything seems to work for me, but I'm no expert.