Tiny Core Extensions > TCE Corepure64
[Solved] lua 5.4.6 for TCL14 x86_64
GNUser:
Hi, Juanito and jazzbiker. Messaging system is not letting me send PMs right now, so I will continue the discussion here.
Thank you both very much for your input. I think I have everything I need to move forward.
lua-5.4.tcz will contain executables called lua5.4 and luac5.4 and will happily coexist with lua-5.3.tcz
lua-5.4-lib.tcz and lua-5.4-dev.tcz I will just submit as-is. It seems too complicated to make any special provisions for concurrent different versions.
User can load lua-5.3-lib.tcz and lua-5.4-lib.tcz at same time if needed. The only clash will be liblua.so, which is just a link anyway. Without manual intervention, whichever version of the lib extension is loaded last will win with regard to where liblua.so is pointing.
Inside /usr/local/lib/pkgconfig/lua.pc there are variables for version and release as well as hardcoded paths to include/lua5.3 or include/lua5.4. I think having different versions of the dev extension loaded at the same time will not be a good idea.
jazzbiker:
Hi Bruno and Juanito,
Here's how I imagine the tce.installed for lua-x.y-lib.tcz:
--- Code: ---LIBLUA_LATEST=$(ls -r /usr/local/lib/liblua.so.?.?.? | sed 1q )
ln -sf $(readlink $LIBLUA_LATEST) /usr/local/lib/liblua.so
--- End code ---
What's Your opinion, is it correct code?
jazzbiker:
--- Quote from: GNUser on August 18, 2023, 10:33:59 AM ---Inside /usr/local/lib/pkgconfig/lua.pc there are variables for version and release as well as hardcoded paths to include/lua5.3 or include/lua5.4. I think having different versions of the dev extension loaded at the same time will not be a good idea.
--- End quote ---
It would be nice for lua-5.4-dev.tcz to contain /usr/local/lib/pkgconfig/lua-5.4.pc instead of lua.pc. Such lua.pc and lua-5.4.pc files can coexist and contain differing paths.
In fact lua.pc is usually not necessary, still it would be nice to keep it existing.
GNUser:
What if version has two digits somewhere? I'd use * to cover for that. Also, sorting version numbers is tricky. Best to let "sort -V" handle it than rely on ls.
How about this?
--- Code: ---LIBLUA_LATEST=$(ls /usr/local/lib/liblua.so.*.*.* | sort -V | tail -n1)
ln -sf $(readlink $LIBLUA_LATEST) /usr/local/lib/liblua.so
--- End code ---
Regarding the .pc file, you are the lua expert. Let's go with lua-5.4.pc, then.
GNUser:
Okay, I submitted the following extensions:
* lua-5.4.tcz (with binaries renamed to lua5.4 and luac5.4)
* lua-5.4-lib.tcz (with startup script that points lualib.so to highest version of liblua.so.*.*.*)
* lua-5.4-dev.tcz (with lua.pc renamed to lua-5.4.pc)
Thanks for all your input, guys. If we discover this is not the very best solution, we can always tweak. But it seems really solid to me.
Navigation
[0] Message Index
[#] Next page
Go to full version