Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do you install Lua 5.3?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
redblade7
n00b
n00b


Joined: 11 Jan 2018
Posts: 15

PostPosted: Thu Oct 11, 2018 5:55 am    Post subject: How do you install Lua 5.3? Reply with quote

How do you install Lua 5.3 as a slot with the stable 5.1.5 also installed? I can't find any information on the wiki about it.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 19883
Location: here

PostPosted: Thu Oct 11, 2018 5:59 am    Post subject: Reply with quote

In general for install a specific slot you can use
Code:
# emerge dev-lang/lua:5.3

but I see that lua:5.3 is masked then you should unmask it
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
redblade7
n00b
n00b


Joined: 11 Jan 2018
Posts: 15

PostPosted: Thu Oct 11, 2018 7:55 pm    Post subject: Reply with quote

Now I get a blocker:

Quote:
[ebuild NS #] dev-lang/lua-5.3.3:5.3::gentoo [5.1.5-r4:0::gentoo] USE="deprecated readline -emacs -static" ABI_X86="(64) -32 (-x32)" 288 KiB
[blocks B ] dev-lang/lua:0 ("dev-lang/lua:0" is blocking dev-lang/lua-5.3.3)


And can't depclean the old one because other packages depend on it.

EDIT: I can't depclean and re-emerge all lua-dependent packages because I'd be removing important stuff like pam.
Back to top
View user's profile Send private message
duane
n00b
n00b


Joined: 03 Jun 2002
Posts: 29
Location: Oklahoma City

PostPosted: Thu Oct 11, 2018 8:32 pm    Post subject: Reply with quote

As I understand it, gentoo has issues with lua because a lot of stable software is still using lua 5.1. I was never able to get it to install in multiple slots, either. Here's the compatibility bug report for 5.2, which shows blocking packages (and little progress made):

https://bugs.gentoo.org/407091

I don't think 5.3 is even being seriously considered yet.

Personally, I switched from lua 5.3 to 5.1, just to make things easier. There are still a number of lua libraries that don't support 5.3, and the differences between the versions are trivial from my point of view. If I really want 5.3 at some point, I'll just compile it separately, but in the last year, I haven't missed it, and I do a LOT of lua programming -- I prefer it to ruby and python.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10142
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Oct 11, 2018 8:45 pm    Post subject: Reply with quote

Notwithstanding any of the problems reported above by duane, the problem from Portage's perspective is that stable lua (5.1.5-r4) is not slotted but the later testing branch versions are. You typically can't install an unslotted version of a package alongside a slotted version. Actually, slotted and unslotted versions of packages typically don't coexist in the Portage tree. It's rare to have the situation we see with lua because, once you have slots working for a given package, you typically no longer need the unslotted versions. Looks like slot support is being worked on (because lua-5.1.5-r100 is slotted) but is incomplete or problematic (because this and all later versions are masked).

If you want to play with the slotted versions, then you have to install only the slotted versions.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.


Last edited by John R. Graham on Thu Oct 11, 2018 9:07 pm; edited 2 times in total
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 6578
Location: Austria

PostPosted: Thu Oct 11, 2018 8:48 pm    Post subject: Reply with quote

John R. Graham wrote:
Looks like slot support is being worked on (because lua-5.1.5-r100 is slotted) but is incomplete or problematic (because this and all later versions are masked).

In fact it is not being worked on. The person introducing the initial slotted versions is no longer around, and it never worked properly.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
redblade7
n00b
n00b


Joined: 11 Jan 2018
Posts: 15

PostPosted: Thu Oct 11, 2018 9:04 pm    Post subject: Reply with quote

It doesn't have to be slotted, but if lua 5.3 breaks stuff and is unmaintained, I'll just have to wait and stick with the older version of the program I wish to compile.

How does something as important as lua have no Gentoo maintainer?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5281

PostPosted: Thu Oct 11, 2018 9:33 pm    Post subject: Reply with quote

Gentoo's internal office politics makes it hard to onboard extra talent.
Back to top
View user's profile Send private message
Ralphred
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2013
Posts: 77

PostPosted: Thu Oct 11, 2018 9:39 pm    Post subject: Reply with quote

redblade7 wrote:
How does something as important as lua have no Gentoo maintainer?

Well volunteered Sir.

But from here
Code:
$ equery depends lua
 * These packages depend on lua:
app-admin/conky-1.10.8-r1 (>=dev-lang/lua-5.1.4-r8:0)
dev-games/openscenegraph-3.5.5 (lua ? >=dev-lang/lua-5.1.5)
media-libs/mlt-6.10.0 (lua ? >=dev-lang/lua-5.1.4-r4)
media-video/vlc-3.0.4 (lua ? >=dev-lang/lua-5.1:0)
so here only conky has a hard dependency on the :0 slot.

If I really wanted 5.3, I'd compile out as much :0 lua dependence as possible with use flags, use qpgk on the current lua install (as a fail safe backup), emerge -C to leave hard dependants "technically broken, but in place", emerge the version I want and see if anything is actually broken.

In the past I've had a relatively large local repository to keep portage happy with hacks like this moving forward, but never anything as complicated a virtual/slotted-package, that said there are quite a lot of "slotted ebuilds" to check what is going on nowadays.
Back to top
View user's profile Send private message
redblade7
n00b
n00b


Joined: 11 Jan 2018
Posts: 15

PostPosted: Thu Oct 11, 2018 9:55 pm    Post subject: Reply with quote

Actually I just wound up making a few quick hacks, mostly replacing things with stuff from the previous version and some functions which were renamed after lua 5.1, and it runs fine so far :)

BTW the program is nlarn, which was updated last month (v0.7.3), and is based around lua 5.3 now: https://github.com/nlarn/nlarn/releases

Also, apparently there are commits "Bye bye, Lua!", don't know what that means for the git version or a future release, but might take a look.
Back to top
View user's profile Send private message
duane
n00b
n00b


Joined: 03 Jun 2002
Posts: 29
Location: Oklahoma City

PostPosted: Thu Oct 11, 2018 9:57 pm    Post subject: Reply with quote

redblade7 wrote:
How does something as important as lua have no Gentoo maintainer?


It's got two maintainers: https://packages.gentoo.org/packages/dev-lang/lua Maintainers come and go over time. They may have other projects to deal with too.

Someone mentioned in the bug I linked that other distributions deal with this by letting the projects that want older lua statically link it, but gentoo prefers not to do that. (Edit) Some packages do this anyway. As an example, Minetest developers have stated that they won't upgrade lua, so the gentoo package uses their version, just for Minetest.

Ralphred wrote:
If I really wanted 5.3, I'd compile out as much :0 lua dependence as possible with use flags, use qpgk on the current lua install (as a fail safe backup), emerge -C to leave hard dependants "technically broken, but in place", emerge the version I want and see if anything is actually broken.


I'd hate to remove lua from anything that uses it. I love lua. I read that the latest versions of some of the dependent packages use 5.3. Maybe selecting the unstable versions of those packages would help.


Last edited by duane on Thu Oct 11, 2018 10:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
redblade7
n00b
n00b


Joined: 11 Jan 2018
Posts: 15

PostPosted: Thu Oct 11, 2018 10:02 pm    Post subject: Reply with quote

duane wrote:
redblade7 wrote:
How does something as important as lua have no Gentoo maintainer?


It's got two maintainers: https://packages.gentoo.org/packages/dev-lang/lua Maintainers come and go over time. They may have other projects to deal with too.

Someone mentioned in the bug I linked that other distributions deal with this by letting the projects that want older lua statically link it, but gentoo prefers not to do that. The Minetest developers have stated that they won't upgrade lua, so the gentoo package uses their version, just for Minetest.


It's ONLY Minetest that's holding ALL of Gentoo's lua packages back? I run three Minetest servers and know many developers involved with Minetest and its mods, will have to let them know what's going on.
Back to top
View user's profile Send private message
duane
n00b
n00b


Joined: 03 Jun 2002
Posts: 29
Location: Oklahoma City

PostPosted: Thu Oct 11, 2018 10:18 pm    Post subject: Reply with quote

redblade7 wrote:
It's ONLY Minetest that's holding ALL of Gentoo's lua packages back? I run three Minetest servers and know many developers involved with Minetest and its mods, will have to let them know what's going on.


No, no, no. Minetest is an example of a package that doesn't stick to the gentoo policy of dynamically linking. It's not holding anybody back from anything.
Back to top
View user's profile Send private message
redblade7
n00b
n00b


Joined: 11 Jan 2018
Posts: 15

PostPosted: Thu Oct 11, 2018 10:29 pm    Post subject: Reply with quote

duane wrote:
redblade7 wrote:
It's ONLY Minetest that's holding ALL of Gentoo's lua packages back? I run three Minetest servers and know many developers involved with Minetest and its mods, will have to let them know what's going on.


No, no, no. Minetest is an example of a package that doesn't stick to the gentoo policy of dynamically linking. It's not holding anybody back from anything.


Oh OK, hadn't said anything yet so good thing you caught me. Thank you.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6240

PostPosted: Fri Oct 12, 2018 5:48 am    Post subject: Reply with quote

The issue is actually severe, since already the important package media-gfx/ipe has been removed from the gentoo repository only because current versions of it depend on current lua versions!

The mv overlay contains besides that package also app-text/podofo and games-puzzle/fish-fillet ebuilds which contain a USE=slotted-lua to work with the slotted version of lua (in case of app-text/podofo there are also use-flags to decide whether lua:5.1 or lua:5.2 is used). However, there are currently no plans to extend this systematically for more packages depending on unslotted lua in the mv overlay: You would have to do this in a local (or public) overlay.

If eventually all ebuilds are fixed to depend on slotted lua (first optionally) in overlays/bug reports, maybe they can eventually go to the gentoo repository (perhaps first with a masked USE=slotted-lua), and then eventually slotted lua can be unmasked (and USE=slotted-lua can be unmasked or even removed).
Back to top
View user's profile Send private message
duane
n00b
n00b


Joined: 03 Jun 2002
Posts: 29
Location: Oklahoma City

PostPosted: Fri Oct 12, 2018 7:50 pm    Post subject: Reply with quote

John R. Graham wrote:
Notwithstanding any of the problems reported above by duane, the problem from Portage's perspective is that stable lua (5.1.5-r4) is not slotted but the later testing branch versions are. You typically can't install an unslotted version of a package alongside a slotted version.


What would it take to make the unslotted version into another slot? Would the main difficulty be getting other packages changed to use it? In all the years I've used gentoo, ebuilds have always befuddled me.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10142
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri Oct 12, 2018 8:11 pm    Post subject: Reply with quote

See mv's response above for a partial answer. It's non-trivial.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6240

PostPosted: Sat Oct 13, 2018 3:49 am    Post subject: Reply with quote

duane wrote:
Would the main difficulty be getting other packages changed to use it?

Yes. Since unfortunately lua upstream refuses to support slotted versions - they want it to be bundled and linked statically without PIC for performance reason (which nowadays IMHO is not only obsolete on 64bit but also unsane because of security reasons) - there is no "official" way how a package can request for a particular lua version. So the build system for each package has to be patched individually. If slotted lua provides corresponding .pc files this is usually just a matter of changing one name, but it can also be harder if .pc files are not used.
Back to top
View user's profile Send private message
shevy
n00b
n00b


Joined: 28 Aug 2017
Posts: 9

PostPosted: Tue Oct 16, 2018 8:07 pm    Post subject: Reply with quote

duane wrote:

> I do a LOT of lua programming -- I prefer it to ruby and python.

I can understand this to some extent. The creator of htop and one of the two founders of
GoboLinux (hisham https://github.com/hishamhm/htop) is heavily involved with lua and
luarocks. I am always curious to understand people's motife. :)

I did not like lua that much though; I guess it appeals to people in the embedded world
(C/C++) and it is lightweight, but I myself prefer ruby largely due to the syntax;
secondarily due to the philosophy. Mruby, the "variant" that was created some years
ago by matz, sort of learned from lua here and tries to fill that niche in the embedding
world, like lua, but being based on ruby (or at the last a simpler subset on it).

Python is currently the king among the "scripting" languages family. I use python too
but not nearly as much as ruby. To me personally, ruby and python are a lot "closer"
in regards to the use case than is lua; lua sort of has its own niche where it dominates.

To the issue of slots - I am a gentoo noob, but I assume this refers primarily to
different versions of programs. In this case, lua. The simplest approach is, IMHO, a
versioned directory scheme such as /Programs/Lua/ and inside there the different
versions. GoboLinux makes use of compatibility symlinks into the FHS /usr/ hierarchy
primarily for those programs that are misbehaving (or have embedded hardcoded
path entries, which a few do). But by and large, that approach works really well.

I assume that gentoo can not offer the same due to it being based on the FHS,
which means that everything will be spread onto /usr/, hence why slots as a
workaround have to be used. I am sure at /usr/bin/lua there can only be one
version; debian fake-solved this when they e. g. had ruby-1.8 and ruby-2.0
at /usr/bin/, on top of /etc/alternatives/ (or was it ruby1.8 and ruby2.0 ...
I can't remember these madness decisions). All quite strange to me to see how
different distributions try to solve the problem very inelegantly.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6240

PostPosted: Wed Oct 17, 2018 5:43 am    Post subject: Reply with quote

shevy wrote:
The simplest approach is, IMHO, a
versioned directory scheme such as /Programs/Lua/ and inside there the different
versions.

This won't simplify anything. The way lua slots are made in gentoo is better:
You have /usr/bin/lua5.{1,2,3} /usr/include/lua5.{1,2,3} /usr/$(libdir)/liblua5.{1,2,3}.so.0 etc,
and with
Code:
eselect lua
you can set compatibility symlinks if you want to.
The problem is that packages should not rely on the symlinks when building and running but
should really use (and hardcode into the binaries) the lua versions they actually support and
depend upon, independently of the current setting of these compatibility symlinks. This comes
down to changing some paths in the build system. This is not hard but a lot of work when a
lot of packages are involved, each having its own build system. The "standard" way of getting
these paths in the build system is to use a pkg-config, and for packages using this way, all what
needs to be changed is the argument of that pkg-config call.

(However, some .pc files installed by lua ebuilds had been broken by linking to -llua instead
of -llua${SLOT}, and similar the include directories relied on the symlink; I think I had reported
a bug on bugzilla, but I cannot find it currently.)

Edit: Not exactly the bug I meant but practically a duplicate is here.
(Perhaps I only planned to report the bug when I found that one and decided not to report a
further one - I really cannot remember).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum