FS#58089 - [lua51-socket] lib seems to be linked against something related to lua 5.2

Attached to Project: Community Packages
Opened by aeris (aeris) - Tuesday, 03 April 2018, 23:20 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 21 February 2019, 15:06 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi,

At least `serial.so` and `unix.so` seems to be linked against something related to lua 5.2+
When required with lua5.1, they try to use `luaL_setfuncs` which only exists since 5.2.

Regards,

Additional info:
* package version(s)

pacman -Qs "lua51|lua51-socket"
local/lua51 5.1.5-6
Powerful lightweight programming language designed for extending applications
local/lua51-socket 20160311-1
Networking support library for the Lua language

Steps to reproduce:

$ lua5.1
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
> require 'socket.unix'
error loading module 'socket.unix' from file '/usr/lib/lua/5.1/socket/unix.so':
/usr/lib/lua/5.1/socket/unix.so: undefined symbol: luaL_setfuncs
stack traceback:
[C]: ?
[C]: in function 'require'
stdin:1: in main chunk
[C]: ?
> require 'socket.serial'
error loading module 'socket.serial' from file '/usr/lib/lua/5.1/socket/serial.so':
/usr/lib/lua/5.1/socket/serial.so: undefined symbol: luaL_setfuncs
stack traceback:
[C]: ?
[C]: in function 'require'
stdin:1: in main chunk
[C]: ?
This task depends upon

Closed by  Sergej Pupykin (sergej)
Thursday, 21 February 2019, 15:06 GMT
Reason for closing:  Fixed
Comment by aeris (aeris) - Wednesday, 04 April 2018, 15:48 GMT
Digging into the source, I notice this line [1] about 5.1 compat is missing into the source package. compat.c defined the missing luaL_setfuncs.
Arch package is built from rev 23ce5aeaa22b49d6649096b520b292a3626474ef (7 Mar 2016), but 5.1 compat inclusion is only since 9f77f8b24f7fcce66678b5c73ca82ceb23576536 (30 Jun 2016) [2]

Upgrading source rev may fix this 5.1 compatibility trouble.

[1] https://github.com/diegonehab/luasocket/blob/master/src/makefile#L312
[2] https://github.com/diegonehab/luasocket/commit/9f77f8b24f7fcce66678b5c73ca82ceb23576536

Loading...