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

lib/lua/5.1 is hardcoded in places #27

Closed
hishamhm opened this issue Apr 11, 2011 · 9 comments
Closed

lib/lua/5.1 is hardcoded in places #27

hishamhm opened this issue Apr 11, 2011 · 9 comments

Comments

@hishamhm
Copy link
Member

This prevents LuaRocks from installing cleanly in 64-bit systems that use lib64/ (and this will have to be changed anyway when LR gets support for Lua 5.2).

Related info: http://article.gmane.org/gmane.comp.lang.lua.luarocks/2415/

@hishamhm
Copy link
Member Author

All references to lib/lua/5.1 are now configurable through the luarocks.cfg mechanisms.

@ildar
Copy link

ildar commented Jul 3, 2012

Sorry for the noise.
As an example of the fix, the right /etc/luarocks/config.lua for x86_64 platform would be:

rocks_servers = {
[[http://luarocks.org/repositories/rocks]]
}
rocks_trees = {
home..[[/.luarocks]],
{ root = /usr,
bin_dir = /usr/bin,
lib_dir = /usr/lib64/lua/5.1,
lua_dir = /usr/share/lua/5.1
}
}

Works for me.

@ildar
Copy link

ildar commented Jul 12, 2012

Though the fix is not complete:
when using --tree arg, LR doesn't look at rocks_trees and builds path with lib_modules_path, which is hardcoded to "/lib/lua/"..lua_version.
I filed FR: #83

Care to reopen?

@hishamhm
Copy link
Member Author

Yes, it uses lib_modules_path from cfg.lua, but that is overrideable in config.lua as well. I'll keep #83 as valid, but lib/lua/5.1 is not hardcoded (it's just an overrideable defult).

@ildar
Copy link

ildar commented Jul 12, 2012

Yes! exactly. Again, sorry for the noise.
Then the correct /etc/luarocks/config.lua for x86_64 platform would be:

rocks_servers = {
[[http://luarocks.org/repositories/rocks]]
}
rocks_trees = {
home..[[/.luarocks]],
[[/usr]]
}
lib_modules_path = "/lib64/lua/"..lua_version

Works for me, even with --tree option.

@qbarnes
Copy link

qbarnes commented Jan 4, 2013

I just started playing with luarocks a few days ago and hit this problem, so consider me a luarocks noob.

Your reply above using lib_modules_path certainly works for me, but when I first hit this problem a couple of days ago, I had thought the way to fix this was to change the definition of LUA_LIBDIR in the site_config.lua file from "/usr/lib" to "/usr/lib64". However, that approach didn't work. Hisham, could you comment on whether this approach should have worked or not?

@hishamhm
Copy link
Member Author

hishamhm commented Jan 4, 2013

No, they are different things. LUA_LIBDIR is the place where the shared library of the Lua interpreter is supposed to be. lib_modules_path is the path fragment for where Lua modules written in C should be installed to.

@qbarnes
Copy link

qbarnes commented Jan 4, 2013

Sounds like (also) changing LUA_LIBDIR to "/usr/lib64" on x86_64 is still a correct thing to do; it just doesn't address this problem, right?

I think I follow your explanation. That's why this variable is called "LUA_LIBDIR" rather than something like "LUAROCKS_LIBDIR".

@hishamhm
Copy link
Member Author

hishamhm commented Jan 4, 2013

Sounds like (also) changing LUA_LIBDIR to "/usr/lib64" on x86_64 is still a correct thing to do

If your liblua_.so_ is there, then yes.

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