ports/113513: devel/swig13: graphics/graphviz fails to build when WITH_LUA defined

Scot Hetzel swhetzel at gmail.com
Sun Jun 10 07:50:02 UTC 2007


>Number:         113513
>Category:       ports
>Synopsis:       devel/swig13: graphics/graphviz fails to build when WITH_LUA defined
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 10 07:50:02 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Scot Hetzel
>Release:        7.0-CURRENT
>Organization:
>Environment:
FreeBSD hp010.hetzel.org 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Fri May 25 17:09:04 CDT 2007     swhetzel at hp010.hetzel.org:/usr/src/7x/sys-p4/amd64/compile/GENERIC.debug  amd64

>Description:
While trying to rebuild KDE after the xorg 7.2 and gcc 4.2 imports, the compile failed while building graphics/graphviz because the gv_lua.cpp file that is generated by swig13 includes luarun.swg.  The luarun.swg file has "#include <malloc.h>" in it, and it generates an error due to __STDC__ is defined.
>How-To-Repeat:
cd /usr/ports/graphics/graphviz
make build
:
 c++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../lib/gvc -I../../lib/common -I../../lib/graph -I../../lib/cdt -I../../lib/pathplan -I/usr/local/lib/perl5/5.8.8/mach/CORE -I/usr/local/include/python2.4 -I/usr/local/lib/ruby/1.8/amd64-freebsd7 -I/usr/local/include/tcl8.4 -I/usr/local/include/tcl8.4/generic -I/usr/local/include -I/usr/local/include -I/usr/local/include/tcl8.4 -I/usr/local/include/tk8.4 -I/usr/local/include/lua51 -I/usr/local/include -O2 -fno-strict-aliasing -pipe -MT gv_lua.lo -MD -MP -MF .deps/gv_lua.Tpo -c gv_lua.cpp  -fPIC -DPIC -o .libs/gv_lua.o
In file included from gv_lua.cpp:711:
/usr/include/malloc.h:3:2: error: #error "<malloc.h> has been replaced by <stdlib.h>"
gmake[3]: *** [gv_lua.lo] Error 1
gmake[3]: Leaving directory `/usr/ports/graphics/graphviz/work/graphviz-2.12/tclpkg/gv'


>Fix:
Apply that attached patch to the devel/swig13 port which changes malloc.h to stdlib.h, since malloc.h has been depreciated since Nov 2001.

Patch attached with submission follows:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/swig13/Makefile,v
retrieving revision 1.74
diff -u -r1.74 Makefile
--- Makefile	31 Mar 2007 01:10:13 -0000	1.74
+++ Makefile	10 Jun 2007 06:13:41 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	swig
 PORTVERSION=	1.3.31
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -32,6 +33,8 @@
 post-patch:
 	${REINPLACE_CMD} -e 's/SKIP_CHICKEN=$$/&"1"/' ${WRKSRC}/configure
 	${REINPLACE_CMD} -e 's|$$RUBY |${RUBY} |' ${WRKSRC}/configure
+	${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' \
+		${WRKSRC}/Lib/lua/luarun.swg
 
 post-configure:
 	${REINPLACE_CMD} -e 's#null#&|| true#' ${WRKSRC}/Makefile


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list