Bug 220281 - Mk/bsd.default-versions.mk: Set Lua 5.3 as default
Summary: Mk/bsd.default-versions.mk: Set Lua 5.3 as default
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Port Management Team
Depends on:
Reported: 2017-06-26 10:12 UTC by Dani I.
Modified: 2020-10-31 08:38 UTC (History)
6 users (show)

See Also:
i.dani: maintainer-feedback? (portmgr)
i.dani: exp-run?

Patch to update default version of Lua to 5.3 with UPDATING (1.15 KB, patch)
2017-06-26 10:12 UTC, Dani I.
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani I. 2017-06-26 10:12:47 UTC
Created attachment 183802 [details]
Patch to update default version of Lua to 5.3 with UPDATING

Lua 5.2 has last been update on the 07 Mar 2015, while Lua 5.3.0 has been released on 12 Jan 2015. The latest release is 5.3.4, which has been released on 30 Jan 2017. See here [1]. There will be no further releases of Lua 5.2. 

There is also sosme new stuff with Lua 5.3. Full changelog from 5.2 to 5.3 can be found here [2]. Breaking changes can be found here [3].

Thanks for taking a look at it.

[1] http://www.lua.org/versions.html
[2] http://www.lua.org/manual/5.3/readme.html#changes
[3] http://www.lua.org/manual/5.3/manual.html#8
Comment 1 Dani I. 2017-06-26 10:14:46 UTC
Additional info: Lua 5.2[1] is without a maintainer, while 5.3[2] has an active maintainer. This should be considered too.

[1] https://www.freshports.org/lang/lua52
[2] https://www.freshports.org/lang/lua53
Comment 2 Antoine Brodin freebsd_committer 2017-06-27 21:41:34 UTC
New failures on 11.0 amd64:


Around 70 ports were skipped due to those failures.
Comment 3 Russell Haley 2017-12-31 04:57:51 UTC
Hi, I have some cliff notes on the failures. 
My thoughts are to set all items in #1 to be 5.2 dependent (assuming such things are possible) and try patching #2 as they should all be easy fixes (to find the next possible failures). Items in #3 are more nuanced. I think 3.1 should be set to 5.2 dependent as well. That to me would would be a first step and then perhaps request another exp-run?

1) 5.2 Dependent systems: 7
Failures seem to be genuine dependencies on 5.2. Some have stated dependencies. Others... I'm not terribly familiar with the Lua C API but the failures are missing/wrong functions during compilation (which suggests an API change).

mmex,lua-ada, openkdm, cclive, quvi, cardpeek, httest

2) Missing lua.h files (misconfigured builds?): 3

Celestia (only checked first Celestia package), freeswitch, volta

3) Others

3.1) lzlib 
	No longer maintainted. 
	Replacement may be:

	Where is the source for lzlib coming from? I'm not sure what this means:

3.2) lua-alien
	Configure step fails. Latest from Github has different configure script. Update to use latest from github?

	notes:I checked the configure script in the work directory and upon patching it the compilation starts and fails later.
	I downloaded the latest from github and ran boostrap and checked the configure scipt. configure has been *changed* and no longer performs the check the same way, but notably checks for lua < 5.4

3.3) neovim
	Requires lpeg but the dependency doesn't seem to be explicitly stated

3.4) wordgrinder
	Dependency on 5.2 in the configuration step. It might build if patched?
	=======================<phase: run-depends    >============================
	===>   wordgrinder-0.6 depends on file: /usr/local/lib/lua/5.2/lfs.so - not found
	===>   Installing existing package /packages/All/lua53-luafilesystem-1.6.3.txz
	[110amd64-default-PR220281-job-15] Installing lua53-luafilesystem-1.6.3...
	[110amd64-default-PR220281-job-15] `-- Installing lua53-5.3.4...
	[110amd64-default-PR220281-job-15] `-- Extracting lua53-5.3.4: ......... done
	[110amd64-default-PR220281-job-15] Extracting lua53-luafilesystem-1.6.3: .......... done
	===>   wordgrinder-0.6 depends on file: /usr/local/lib/lua/5.2/lfs.so - not found

3.5) lua-ldap
	Not sure about this one...

	gmake[1]: Entering directory '/wrkdirs/usr/ports/net/lualdap/work/lualdap-1.1.0'
	cc -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -ansi -I/usr/local/include/lua53 -I/usr/local/include -I../compat/src -I/usr/local/include/  -c -o src/lualdap.o src/lualdap.c
	In file included from src/lualdap.c:23:
	In file included from /usr/local/include/lua53/lua.h:16:
	/usr/local/include/lua53/luaconf.h:581:2: error: "Compiler does not support 'long long'. Use option '-DLUA_32BITS'   or '-DLUA_C89_NUMBERS' (see file 'luaconf.h' for details)"
	#error "Compiler does not support 'long long'. Use option '-DLUA_32BITS' \
	In file included from src/lualdap.c:23:
	/usr/local/include/lua53/lua.h:93:9: error: unknown type name 'LUA_INTEGER'
	typedef LUA_INTEGER lua_Integer;
	/usr/local/include/lua53/lua.h:96:21: error: expected ';' after top level declarator
	typedef LUA_UNSIGNED lua_Unsigned;
	3 errors generated.
	gmake[1]: *** [<builtin>: src/lualdap.o] Error 1
	gmake[1]: Leaving directory '/wrkdirs/usr/ports/net/lualdap/work/lualdap-1.1.0'
	*** Error code 1

3.6) syslogng
	syslog-ng checks for lua in it's configuration, fails to find it but proceeds to try and package the liblua.so file. This port doesn't seem 
	to be correctly configured to use lua on FreeBSD.

	syslog-ng Incubator 0.4.1 configured
	 Debugging:            no
	  basicfuncs-plus      yes
	  kafka                no
	  logmongource:        no
	  lua:                 no 
	  monitor-source:      no 
	  perl:                yes
	  python:              yes (python-2.7)
	  rss                  yes
	  trigger-source       yes
	  tfgetent             yes
	  zmq                  no
	  grok-parser          no
	  java                 no

	=======================<phase: build          >============================

	====> Compressing man pages (compress-man)
	=======================<phase: package        >============================
	===>  Building package for syslog-ng-incubator-0.4.1_3
	pkg-static: Unable to access file /wrkdirs/usr/ports/sysutils/syslog-ng-incubator/work/stage/usr/local/lib/syslog-ng/liblua.a:No such file or directory
	pkg-static: Unable to access file /wrkdirs/usr/ports/sysutils/syslog-ng-incubator/work/stage/usr/local/lib/syslog-ng/liblua.so:No such file or directory
	pkg-static: Unable to access file /wrkdirs/usr/ports/sysutils/syslog-ng-incubator/work/stage/usr/local/lib/syslog-ng/libmonitor-source.a:No such file or directory
	pkg-static: Unable to access file /wrkdirs/usr/ports/sysutils/syslog-ng-incubator/work/stage/usr/local/lib/syslog-ng/libmonitor-source.so:No such file or directory
	*** Error code 1

	make: stopped in /usr/ports/sysutils/syslog-ng-incubator
	====>> Cleaning up wrkdir
	===>  Cleaning for syslog-ng-incubator-0.4.1_3
	build of sysutils/syslog-ng-incubator ended at Tue Jun 27 09:41:55 UTC 2017
	build time: 00:00:31
	!!! build failure encountered !!!

3.7) luaexpat
	Another long long fail?

	===>  Building for lua53-luaexpat-1.3.0_2
	gmake[1]: Entering directory '/wrkdirs/usr/ports/textproc/luaexpat/work/luaexpat-1.3.0'
	cc -I/usr/local/include/lua53 -I/usr/local/include -g -pedantic -Wall -O2 -fPIC -DPIC -ansi -O2 -pipe  -DLUA_INT_LONG -fPIC -fstack-protector -fno-strict-aliasing -o src/lxp.so src/lxplib.c -shared -lexpat  -L/usr/local/lib -fstack-protector
	In file included from src/lxplib.c:14:
	In file included from /usr/local/include/lua53/lua.h:16:
	/usr/local/include/lua53/luaconf.h:110:9: warning: 'LUA_INT_LONG' macro redefined [-Wmacro-redefined]
	#define LUA_INT_LONG            2
	<command line>:2:9: note: previous definition is here
	#define LUA_INT_LONG 1
Comment 4 Dima Panov freebsd_committer 2018-01-08 16:55:41 UTC
(In reply to Russell Haley from comment #3)

For 3.7 luaexpat — PR 224644 (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224644) is already opened, waiting for maintaner[-timeout?]
Comment 5 Dima Panov freebsd_committer 2018-01-08 16:58:02 UTC
(In reply to Russell Haley from comment #3)

3.5 lua-ldap should be fixed same way as luaexpat
Comment 6 Dima Panov freebsd_committer 2018-01-14 06:31:50 UTC
JFYI - fix for luaexpat was committed
Comment 7 Adam Weinberger freebsd_committer 2018-08-18 15:46:02 UTC
neovim builds against lua53 with no problem now.
Comment 8 VVD 2019-07-30 10:25:08 UTC
Patch for net/freeswitch:

--- net/freeswitch/Makefile.orig
+++ net/freeswitch/Makefile
@@ -39,7 +39,7 @@
 GNU_CONFIGURE=         yes
 CONFIGURE_ARGS=        --with-pkgconfigdir=${PREFIX}/libdata/pkgconfig \
-CFLAGS+=       -Wno-error
+CFLAGS+=       -Wno-error -I${LUA_INCDIR}
 USERS=         ${PORTNAME}
 GROUPS=                ${USERS}
Comment 9 Russell Haley 2020-04-17 04:13:37 UTC
There is work being done over here: https://reviews.freebsd.org/D14709
and here: 
Comment 10 Kyle Evans freebsd_committer 2020-10-25 17:31:31 UTC
(In reply to Russell Haley from comment #9)

Should this be revisited now that flavors has landed?