Subject: pkg/25248: LUA is compiled with certain flags that breaks some scripts
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <pancake@phreaker.net>
List: pkgsrc-bugs
Date: 04/19/2004 23:19:09
>Number:         25248
>Category:       pkg
>Synopsis:       LUA is compiled with certain flags that breaks some scripts
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 19 22:20:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 2.0C
>Organization:
	
>Environment:
	
	
System: NetBSD pl2 2.0C NetBSD 2.0C (pancake-laptop) #15: Tue Apr 13 22:07:57 CEST 2004 pancake@panser:/usr/src/sys/arch/i386/compile/PANCAKE_LAPTOP i386
Architecture: i386
Machine: i386
>Description:
	
	patch-aa of lang/lua isn't corrent and breaks the execution of some
	scripts like 'io.write("pop")'.

>How-To-Repeat:
	$cat /tmp/foo.lua
	io.write("test");
	$lua /tmp/foo.lua
	lua: foo.lua:1: bad argument #2 to `write' (string expected, got
	  table)
	stack traceback:
	        [C]: in function `write'
		foo.lua:1: in main chunk
		[C]: ?

	-------
	That's a bug because write have no second argument. I talk to lua
	people and refer me to the compilation flags.

	
>Fix:
	To fix that it's simple, just change this line on: patch-aa

	-# -DLUA_COMPATUPSYNTAX -DLUA_COMPATUPVALUES
	+EXTRA_DEFS=-DLUA_COMPATUPSYNTAX -DLUA_COMPATUPVALUES

	to

	-# -DLUA_COMPATUPSYNTAX -DLUA_COMPATUPVALUES
	+#EXTRA_DEFS=-DLUA_COMPATUPSYNTAX -DLUA_COMPATUPVALUES

	I tested that loading modules, testing scripts, and linking liblua
	and liblualib. And I receive no errors.
	
>Release-Note:
>Audit-Trail:
>Unformatted: