Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Any advices to have several Lua version on Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
destroyedlolo
l33t
l33t


Joined: 17 Jun 2011
Posts: 846
Location: Close to Annecy (France)

PostPosted: Tue Mar 20, 2018 4:59 pm    Post subject: Any advices to have several Lua version on Gentoo Reply with quote

Hello,

I've created several tools related to home automation that use Lua as embedded language (majors ones are Marcel and Selene). They are using Lua 5.1.5.

I'm on way to do some big changes and especially move them to latest 5.4 (which seems not yet packaged for Gentoo but it's another story).

So, is it possible to have 2 differents packaged Lua version on a system, and if so, is it possible to switch an interactive shell to the newer version with disturbing the rest of the system (I think eselect switch globally) ?

Thanks


Last edited by destroyedlolo on Tue Mar 20, 2018 7:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Tue Mar 20, 2018 5:04 pm    Post subject: Reply with quote

Yes. Lua packages have been slotted. With eselect you chose the default interpreter.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30917
Location: here

PostPosted: Tue Mar 20, 2018 5:09 pm    Post subject: Reply with quote

Zucca wrote:
Yes. Lua packages have been slotted. With eselect you chose the default interpreter.

That's true but for moment only 5.1.4-r4 isn't hard masked
Code:
[I] dev-lang/lua                                                                                                                                         
     Available versions:                                                                                                                                 
     (0)    5.1.5-r4                                                                                                                                     
     (5.1)  [M]~5.1.5-r100 [M]~5.1.5-r101                                                                                                                 
     (5.2)  [M]~5.2.3 [M]~5.2.3-r1 [M]~5.2.3-r2                                                                                                           
     (5.3)  [M]~5.3.3 [M]~5.3.3-r1                                                                                                                       
       {+deprecated emacs readline static ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}                                   
     Installed versions:  5.1.5-r4(19:24:00 05. 01. 18)(deprecated readline -emacs -static ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")                                                                                                                                   
     Homepage:            http://www.lua.org/                                                                                                             
     Description:         A powerful light-weight programming language designed for extending applications 

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Tue Mar 20, 2018 6:48 pm    Post subject: Reply with quote

Oh. I forgot... My bad.
By reading the package.mask from portage tree... I'm not sure why the mask has been set.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30917
Location: here

PostPosted: Tue Mar 20, 2018 6:54 pm    Post subject: Reply with quote

Zucca wrote:
By reading the package.mask from portage tree... I'm not sure why the mask has been set.

/usr/portage/profiles/package.mask:
# Matti Bickel <mabi@gentoo.org> (22 Apr 2014)
# Masked slotted lua for testing
# William Hubbs <williamh@gentoo.org> (07 Aug 2016)
# Taking this mask since Mabi is retired
# Rafael Martins <rafaelmartins@gentoo.org> (04 Dec 2016)
# Adding Lua 5.3 to mask
app-eselect/eselect-lua
=dev-lang/lua-5.1.5-r2
=dev-lang/lua-5.1.5-r100
=dev-lang/lua-5.1.5-r101
=dev-lang/lua-5.2.3
=dev-lang/lua-5.2.3-r1
=dev-lang/lua-5.2.3-r2
=dev-lang/lua-5.3.3
=dev-lang/lua-5.3.3-r1

# Samuli Suominen <ssuominen@gentoo.org> (06 Mar 2012)
# Masked for testing since this is known to break nearly
# every reverse dependency wrt bug 407091
>=dev-lang/lua-5.2.0

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Mr. T.
Guru
Guru


Joined: 26 Dec 2016
Posts: 477

PostPosted: Tue Mar 20, 2018 7:06 pm    Post subject: Reply with quote

Hey!

lua.org wrote:
Work on Lua 5.4 has begun but there is no release date yet nor a roadmap. If you want to try it now, get the latest work version. Note that all details may change in the final version.


P.S: There is a typo in the title of the thread: Any advices...

Edit: See also bug 407091

helecho
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Tue Mar 20, 2018 7:37 pm    Post subject: Reply with quote

For some reason I missed the bug number first time I read the file. :P
But yeah, Gentoo is lagging behind with lua packages. Hopefully they'll resolve the bug soon.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
destroyedlolo
l33t
l33t


Joined: 17 Jun 2011
Posts: 846
Location: Close to Annecy (France)

PostPosted: Tue Mar 20, 2018 7:50 pm    Post subject: Reply with quote

Speaking about "Masking" : I've checked, on my smart home system, only GVIM has a dependancy on Lua and if it causes issue, I can disable it.

[quote="helecho"]
lua.org wrote:
Work on Lua 5.4 has begun but there is no release date yet nor a roadmap. If you want to try it now, get the latest work version. Note that all details may change in the final version.

Yes, I know :)
But taking in account the time I'll have to spend on my own migration (because there is lot of changes b/w 5.1 and >= 5.2 API), 5.4 will be released.

helecho wrote:
P.S: There is a typo in the title of the thread: advices

Corrected :wink:

Another question : without a "patch", Lua is not multi-thread compliant, and, frankly speaking, having multiple Lua's State in a program creates lot of side effect (i.e : strings can't be compared).
So, do someone already created this patch ? (Lua's website provides only an example for m$-windows).
If so, what about adding a "USE" flag "multi-thread" to enable this patch ?

Bye

Laurent
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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