Tiny Core Extensions > TCE Corepure64

[Solved] lua 5.4.6 for TCL14 x86_64

<< < (6/8) > >>

GNUser:
Sometimes it helps to see how other projects have dealt with packaging conundrums.

In Devuan and Termux there is no binary named lua. In both projects, the lua interpreter is called lua5.3 or lua5.4 etc, depending on lua version(s) installed.

In Termux, interestingly, the package that provides Lua 5.3 is called lua53.deb (no decimal point in the package name). After installing the package, typing lua in the terminal results in "command not found" error. User must type lua5.3 to start the interactive interpreter.

In Devuan, /usr/bin/lua exists but is just a link:

--- Code: ---Devuan$ which lua
/usr/bin/lua
Devuan$ ls -l /usr/bin/lua
lrwxrwxrwx 1 root root 33 Jul 17  2022 /usr/bin/lua -> /etc/alternatives/lua-interpreter
Devuan$ ls -l /etc/alternatives/lua-interpreter
lrwxrwxrwx 1 root root 15 Jul 17  2022 /etc/alternatives/lua-interpreter -> /usr/bin/lua5.4
--- End code ---

GNUser:
Hi jazzbiker and friends. Two more questions to consider.

1) Regarding the startup scripts, wouldn't it be better for it to link the unversioned file to the version in that extension? Like this:

* lua-5.3.tcz forcibly links /usr/local/bin/lua to /tmp/tcloop/lua-5.3/usr/local/bin/lua5.3
* lua-5.4.tcz forcibly links /usr/local/bin/lua to /tmp/tcloop/lua-5.4/usr/local/bin/lua5.4

Same idea for lua.pc and liblua.so.

The advantage of this method is that the user could easily choose which lua version should be the default simply by the order in which extensions are loaded. Last one loaded wins.

2) Does everybody else also prefer the simpler names without hyphens (lua5.3.tcz, lua5.4.tcz, lua5.3.pc, etc)? If so, maybe the time to fix it is now while we are at it ;D

I don't mind recreating the extensions until we have a consensus and everybody is happy :)

Rich:
Hi GNUser

--- Quote from: GNUser on August 19, 2023, 02:15:20 AM --- ... Not in Lua, where x.y is the major version. ...
--- End quote ---
Fair enough.  :)

jazzbiker:
Hi GNUser,

Your extensions are in the x86_64 repo since yesterday morning, seems we are wasting time.

You can ask me, how I deal with Lua 5.4.
I built it in the separate directory, I use my own build scripts where I defined -I, -L and all necessary switches. I mean I don't use pkg-config for Lua. I link with static library. In the scripts I use shebang to point to the lua binary. My ~/.local/bin contains proper redirections to my lua and luac binaries.
All these preparations took quite small time. You know that Lua is built in a few moments.

I beg Your pardon for so much messing.

Happy hacking!

GNUser:
Hi jazzbiker.

Those extensions were my first attempt--vanilla build without external libs, without pkgconfig, without any thought to concurrent versions.

Yes, I feel like now I'm making a mess, creating noise and more work for everybody. I think I'm doing a disservice to Lua.

After I finish this post I will create and submit one last set of 5.4 extensions for the x86_64 repo, with today's timestamp (2023/08/19). The set will have the -lib extension, pkgconfig, and simple startup scripts that use the last-loaded-wins idea I mentioned in reply #26. I will keep hyphens in extension names.

If this final set is considered to add value to TCL, I would be happy to see it accepted. If not, no hurt feelings.

Rich, please mark thread as solved.

Happy hacking!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version