Bug 220281

Summary: Mk/bsd.default-versions.mk: Set Lua 5.3 as default
Product: Ports & Packages Reporter: Dani <i.dani>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: New ---    
Severity: Affects Many People CC: fluffy, portmgr, ports-bugs, russ.haley
Priority: --- Flags: i.dani: maintainer-feedback? (portmgr)
i.dani: exp-run?
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch to update default version of Lua to 5.3 with UPDATING none

Description Dani 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 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:


http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/lua53-lzlib-0.4.3.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/celestia-glut-1.6.1_9.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/celestia-gnome-1.6.1_9.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/celestia-gtk-1.6.1_9.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/lua53-alien-0.7.0.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/fxite-0.92_4.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/neovim-0.2.0.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/wordgrinder-0.6.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/mmex-1.2.7_4.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/lua-ada-1.0_1.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/opendkim-2.10.3_6.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/cclive-0.7.16_3.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/quvi-0.4.2_3.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/freeswitch-1.6.13_3.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/lua53-lualdap-1.1.0_2.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/cardpeek-0.8.4.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/syslog-ng-incubator-0.4.1_3.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/lua53-luaexpat-1.3.0_2.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/httest-2.4.19.log
http://package22.nyi.freebsd.org/data/110amd64-default-PR220281/2017-06-27_08h46m05s/logs/volta-0.3.0_1.log

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:
	https://luarocks.org/modules/brimworks/lua-zlib

	Where is the source for lzlib coming from? I'm not sure what this means:
	MASTER_SITES=	SAVANNAH/lzip/lzlib

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
	 Modules:
	  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

	Stop.
	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'
	export MACOSX_DEPLOYMENT_TARGET="10.3";
	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.