From gwright@comcast.net  Mon Jan  9 04:10:36 2006
Return-Path: <gwright@comcast.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 88C1B16A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  9 Jan 2006 04:10:36 +0000 (GMT)
	(envelope-from gwright@comcast.net)
Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1893743D45
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  9 Jan 2006 04:10:35 +0000 (GMT)
	(envelope-from gwright@comcast.net)
Received: from ivy-mike.18clay.com (pcp0011937718pcs.eatntn01.nj.comcast.net[69.249.70.141])
          by comcast.net (sccrmhc12) with ESMTP
          id <2006010904103401200jpghae>; Mon, 9 Jan 2006 04:10:34 +0000
Received: from ivy-mike.18clay.com (localhost [127.0.0.1])
	by ivy-mike.18clay.com (8.13.4/8.13.4) with ESMTP id k094AX7m007448
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 8 Jan 2006 23:10:33 -0500 (EST)
	(envelope-from gwright@ivy-mike.18clay.com)
Received: (from gwright@localhost)
	by ivy-mike.18clay.com (8.13.4/8.13.4/Submit) id k094AX5P007447;
	Sun, 8 Jan 2006 23:10:33 -0500 (EST)
	(envelope-from gwright)
Message-Id: <200601090410.k094AX5P007447@ivy-mike.18clay.com>
Date: Sun, 8 Jan 2006 23:10:33 -0500 (EST)
From: Gregory Wright <gwright@antiope.com>
Reply-To: Gregory Wright <gwright@antiope.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] texmacs port crashes on startup when built on FreeBSD 6.0-RELEASE-p1
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         91545
>Category:       ports
>Synopsis:       [patch] texmacs port crashes on startup when built on FreeBSD 6.0-RELEASE-p1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pav
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 09 04:20:08 GMT 2006
>Closed-Date:    Tue Jan 10 14:18:23 GMT 2006
>Last-Modified:  Tue Jan 10 14:18:23 GMT 2006
>Originator:     Gregory Wright
>Release:        FreeBSD 6.0-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD ivy-mike.18clay.com 6.0-RELEASE-p1 FreeBSD 6.0-RELEASE-p1 #1: Tue Dec 20 14:31:02 EST 2005 gwright@ivy-mike.18clay.com:/usr/obj/usr/src/sys/IVY-MIKE i386


	dual 2.8 GHz Xeon, 2 GB, using SMP enabled kernel.
>Description:
	Texmacs 1.0.6 builds successfully using the current portfile,
	however, when the program is started it fails as soon as
	input is attempted in the main canvas with an allocation
	exception, and the program immediately terminates.

	This behavior did not occur with the previous version of
	texmacs (1.0.5) on FreeBSD 5.4-RELEASE.
>How-To-Repeat:
	# cd /usr/ports/editors/texmacs
	# make install
	# cd
	# texmacs

	...and attempt input in the main canvas. The program willr
	generate an exception and terminate.
>Fix:
	The problem seems to be that disabling texmac's internal
	allocator (by the --disable-fastalloc configure option)
	triggers a bug under FreeBSD 6.0. Changing to the default
	configuration fixed the problem.

	The resulting texmacs was tested by running a maxima
	session and ran successfully.

	A patch which uses the default allocator on FreeBSD 6.0
	and above is attached. It should be applied in
	/usr/ports/editors/texmacs.

--- texmacs.Makefile.patch begins here ---
--- Makefile	Mon Dec 12 07:03:25 2005
+++ Makefile.new	Thu Jan  5 08:54:24 2006
@@ -30,8 +30,13 @@
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
 		LDFLAGS="-L${LOCALBASE}/lib"
-CONFIGURE_ARGS=	--disable-fastalloc --enable-optimize="${CXXFLAGS}" \
+CONFIGURE_ARGS=	--enable-optimize="${CXXFLAGS}" \
 		--with-iconv="${LOCALBASE}"
+
+.if ${OSVERSION} < 600000
+CONFIGURE_ARGS+=--disable-fastalloc
+.endif
+
 MAKE_ARGS=	CP="${CP} -R -f"
 ALL_TARGET=	${PORTNAME:U}
 
--- texmacs.Makefile.patch ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->pav 
Responsible-Changed-By: pav 
Responsible-Changed-When: Tue Jan 10 12:50:39 UTC 2006 
Responsible-Changed-Why:  
Take 

http://www.freebsd.org/cgi/query-pr.cgi?pr=91545 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Tue Jan 10 14:18:15 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

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