Opened 8 years ago

Closed 4 months ago

#40423 closed defect (fixed)

luarocks @2.0.13_2 is broken when Lua 5.1 is installed

Reported by: agladysh@… Owned by: anddam (Andrea D'Amore)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc: cooljeanius (Eric Gallager)
Port: luarocks

Description

LuaRocks code is installed to /opt/local/share/lua/5.2, but it looks it up in /5.1.

Lua 5.2 it is a different language, not fully compatible with 5.1. It should not be treated as a package upgrade.

Lua 5.2 at this moment lacks widespread module support of 5.1. One should be able to keep both versions of the language in the system.

See also #40421

Change History (9)

comment:1 Changed 8 years ago by agladysh@…

Cc: agladysh@… added

Cc Me!

comment:2 Changed 8 years ago by anddam (Andrea D'Amore)

Cc: and.damore@… agladysh@… removed
Owner: changed from macports-tickets@… to and.damore@…
Status: newassigned

You don't need to add yourself as CC recipient. When there's only one maintainer assign the ticket to him.

I'll look into this, we talked about this on mailing list, IIRC. I don't know if both 5.1 and 5.2 can coexist so this may end in having a conflict between the two ports.

comment:3 Changed 8 years ago by agladysh@…

FWIW I believe that 5.1 and 5.2 can coexist on Debian (but can be wrong).

Anyway, 5.1 will be around for a long time, do not remove it.

comment:4 Changed 8 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:5 Changed 8 years ago by anddam (Andrea D'Amore)

Can you explain what do you mean with "it looks it up in /5.1", i.e. can you detail what the bug is and the steps to reproduce it?

comment:6 Changed 8 years ago by agladysh@…

I don't have immediate access to the environment to reproduce that now, but, AFAIR, LuaRocks looks its own code in /opt/local/share/lua/5.1 instead of /opt/local/share/lua/5.2 if lua5.1 is installed.

Steps to reproduce:

  • Install Lua 5.1, uninstall 5.2.
  • Install LuaRocks
  • Try to install any rock (e.g. sudo luarocks install luasocket)

Tell me if you need more details.

comment:7 Changed 8 years ago by agladysh@…

Note that, IMO, LuaRocks must *not* require 5.2 to be installed, it must use whatever package there is. I, for sure, don't want any 5.2 on my machine.

comment:8 in reply to:  6 Changed 7 years ago by anddam (Andrea D'Amore)

Replying to agladysh@…:

Tell me if you need more details.

Yes, there's need for more details because I installed lua 5.1.4, then luarocks and I was able to install rocks that way:

  • What outcome did you get?
  • What were you expecting instead?

Port luarocks being installed in $prefix/lib/lua/5.2 even if you have 5.1 is due to the fact that binary packages are built using the latest ports tree so when you install a previous port lua version, like 5.1, and then run port install luarocks you're fetching a luarocks package that has been built with 5.2 .

You also wrote:

but it looks it up in /5.1.

This is most likely just due to the default package.[path|cpath] for lua 5.1

If you're using a local repository for keeping port lua at a previous like I suggested in ticket:40421#comment:11 then you'll have to use -s option when installing luarocks. This way luarocks will build from source and it will reflect your installed lua version.

We cannot possibly support every configuration of mixed previous port versions on users' local repository.

comment:9 Changed 4 months ago by l2dy (Zero King)

Resolution: fixed
Status: assignedclosed

In 23192cab70ddb970f0bbea6d006a89f03e8e6db8/macports-ports (master):

lua-luarocks: update to 3.7.0 and add subports

Adopt port and rename it to make it consistent with the upcoming luarocks PortGroup.

Use port select to choose the default.

Closes: #40423

Note: See TracTickets for help on using tickets.