Skip to content
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

luasystem no longer compiles with luajit #38

Closed
rgg-dtemple opened this issue Dec 17, 2024 · 0 comments · Fixed by #39
Closed

luasystem no longer compiles with luajit #38

rgg-dtemple opened this issue Dec 17, 2024 · 0 comments · Fixed by #39

Comments

@rgg-dtemple
Copy link

Hello,

Following LuaJIT/LuaJIT@cd8d0a4 luajit will no longer compile because it is missing the #include for limits.h. The below error is from an install of busted by luarocks using luajit version LuaJIT 2.1.1734355927

luasystem 0.4.4-1 depends on lua >= 5.1 (5.1-1 provided by VM: success)
gcc -O2 -fPIC -I/usr/local/include/luajit-2.1 -c src/core.c -o src/core.o -I/usr/include
gcc -O2 -fPIC -I/usr/local/include/luajit-2.1 -c src/compat.c -o src/compat.o -I/usr/include
gcc -O2 -fPIC -I/usr/local/include/luajit-2.1 -c src/time.c -o src/time.o -I/usr/include
src/time.c: In function 'time_lua_sleep':
src/time.c:141:17: error: 'INT_MAX' undeclared (first use in this function)
  141 |         if (n > INT_MAX) n = INT_MAX;
      |                 ^~~~~~~
src/time.c:33:1: note: 'INT_MAX' is defined in header '<limits.h>'; this is probably fixable by adding '#include <limits.h>'
   32 | #include "compat.h"
  +++ |+#include <limits.h>
   33 | 
src/time.c:141:17: note: each undeclared identifier is reported only once for each function it appears in
  141 |         if (n > INT_MAX) n = INT_MAX;
      |                 ^~~~~~~

Error: Failed installing dependency: https://luarocks.org/luasystem-0.4.4-1.src.rock - Build error: Failed compiling object src/time.o

I haven't verified but I would suspect lifting https://github.com/lunarmodules/luasystem/blob/master/src/time.c#L11 out of the #ifdef should fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant