From nobody@FreeBSD.org  Sun Oct 21 04:25:31 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 3335F35B
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 21 Oct 2012 04:25:31 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id F11708FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 21 Oct 2012 04:25:30 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q9L4PUUL014152
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 21 Oct 2012 04:25:30 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q9L4PUdp014150;
	Sun, 21 Oct 2012 04:25:30 GMT
	(envelope-from nobody)
Message-Id: <201210210425.q9L4PUdp014150@red.freebsd.org>
Date: Sun, 21 Oct 2012 04:25:30 GMT
From: Charlie Ambrose <C.Ambrose@latrobe.edu.au>
To: freebsd-gnats-submit@FreeBSD.org
Subject: LuaYAML-Testcases test-suite for lua extension of syck-0.70 dies of signal 11
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         172917
>Category:       ports
>Synopsis:       textproc/syck: LuaYAML-Testcases test-suite for lua extension of syck-0.70 dies of signal 11
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 21 04:30:00 UTC 2012
>Closed-Date:    Tue Nov 12 13:25:14 UTC 2013
>Last-Modified:  Tue Nov 12 13:25:14 UTC 2013
>Originator:     Charlie Ambrose
>Release:        9.0-RELEASE-p3
>Organization:
n/a
>Environment:
FreeBSD nietzsche 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Compiling lua extension for syck library builds the shared-object module (syck.so) but testing dies of Signal 11:

--- snip : start ---
cc -I/usr/local/include/lua51 -I/usr/local/include -Wall -fPIC -c syck.c
syck.c: In function 'lua_syck_parser_handler':
syck.c:148: warning: cast to pointer from integer of different size
syck.c: In function 'syck_load':
syck.c:270: warning: passing argument 2 of 'syck_parser_error_handler' from incompatible pointer type
syck.c: In function 'syck_dump':
syck.c:301: warning: passing argument 2 of 'syck_output_handler' from incompatible pointer type
syck.c:350:2: warning: no newline at end of file
cc -o syck.so -shared syck.o -lsyck -L/usr/local/lib/lua51 -L/usr/local/lib
/usr/local/bin/lua51/lua test.lua

#### Test Suite with 3 Tests in 1 Test Cases loaded.

#### Running 'LuaYAML Testcases' (3 Tests)...
*** Signal 11

Stop in /usr/ports/textproc/syck/work/syck-0.70/ext/lua.
--- snip : stop ---
I needed to modify the Makefile in order for compiler to find lua and syck libs and headers.
>How-To-Repeat:
1. Install lua 5.1 from ports (/usr/ports/lang/lua)
2. Install syck from ports (/usr/ports/textproc/syck)
3. go to lua ext subdir
   $ cd /usr/ports/textproc/syck/work/syck-0.70/ext/lua
4. Edit Makefile to enable compiler to find syck and lua libraries and headers:

--- snip : start ---
PREFIX=/usr/local

# System's libraries directory (where binary libraries are installed)
LUA_LIBDIR= $(PREFIX)/lib/lua/5.1

# System's lua directory (where Lua libraries are installed)
LUA_DIR= $(PREFIX)/share/lua/5.1

LUAINC= $(PREFIX)/include/lua51         #=== 20121021 : cja
LUALIB= $(PREFIX)/lib/lua51             #=== 20121021 : cja
LUABIN= $(PREFIX)/bin/lua51             #=== 20121021 : cja

SYCKINC= $(PREFIX)/include              #+++ 20121021 : cja
SYCKLIB= $(PREFIX)/lib                  #+++ 20121021 : cja

CFLAGS= $(INCS) $(WARN)
CFLAGS+= -fPIC                          #+++ 20121021 : cja

WARN= -Wall
INCS= -I$(LUAINC) -I$(SYCKINC)          #+++ 20121021 : cja
LIBS=-lsyck -L$(LUALIB) -L$(SYCKLIB)    #+++ 20121021 : cja
--- snip : stop ---
5. Run make 
  $ sudo make clean
  $ sudo make all


>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ia64->freebsd-amd64 
Responsible-Changed-By: marcel 
Responsible-Changed-When: Sat Oct 27 21:26:54 UTC 2012 
Responsible-Changed-Why:  
Correct misfiling. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172917 
Responsible-Changed-From-To: freebsd-amd64->freebsd-ports-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Dec 3 04:54:54 UTC 2012 
Responsible-Changed-Why:  
ports PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172917 
State-Changed-From-To: open->closed 
State-Changed-By: jadawin 
State-Changed-When: Tue Nov 12 13:25:13 UTC 2013 
State-Changed-Why:  
No update sin 3 Dec 2012 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172917 
>Unformatted:
