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

Gracefully fallback for bit libraries #320

Closed
daurnimator opened this issue Mar 15, 2015 · 2 comments
Closed

Gracefully fallback for bit libraries #320

daurnimator opened this issue Mar 15, 2015 · 2 comments

Comments

@daurnimator
Copy link
Member

How can I gracefully fallback with bit libraries and luarocks?

I wrote some code that works with lua 5.3 or luabitop.
But luabitop won't compile with lua 5.3.
So it looks like I can't support all lua versions with the one rockspec?

(output from https://travis-ci.org/daurnimator/lua-http/jobs/54412346#L523 )

Using https://rocks.moonscript.org/luabitop-1.0.2-1.src.rock... switching to 'build' mode
gcc -O2 -fPIC -I/usr/local/include -c bit.c -o bit.o
bit.c: In function ‘barg’:
bit.c:83:2: error: #error "Unknown number type, check LUA_NUMBER_* in luaconf.h"
Error: Failed installing dependency: https://rocks.moonscript.org/luabitop-1.0.2-1.src.rock - Build error: Failed compiling object bit.o

@siffiejoe
Copy link
Contributor

Use two different rockspecs (one for Lua 5.3 without luabitop in the dependencies, and one for Lua 5.1/5.2 with luabitop), or use bit32 instead of luabitop. bit32 is available for Lua 5.1, 5.2, and 5.3.

@daurnimator
Copy link
Member Author

looks like I can't support all lua versions with the one rockspec?


Use two different rockspecs (one for Lua 5.3 without luabitop in the dependencies, and one for Lua 5.1/5.2 with luabitop)

So: yep :p

use bit32 instead of luabitop. bit32 is available for Lua 5.1, 5.2, and 5.3.

ah ha! this might save me for now.

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

No branches or pull requests

3 participants