Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jun 2011 09:58:53 GMT
From:      Frank Wall <fw@moov.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/158423: [PATCH] lang/php52: fix segmentation faults by adding threads support
Message-ID:  <201106290958.p5T9wrXj000594@red.freebsd.org>
Resent-Message-ID: <201106291000.p5TA0IKu036024@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         158423
>Category:       ports
>Synopsis:       [PATCH] lang/php52: fix segmentation faults by adding threads support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 29 10:00:18 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Frank Wall
>Release:        7.3-RELEASE-p2
>Organization:
>Environment:
FreeBSD 7.3-RELEASE-p2 FreeBSD 7.3-RELEASE-p2 #0: Mon Jul 12 19:23:19 UTC 2010     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
As per discussion on ports@FreeBSD.org, @ale recommends to enable threads support for lang/php52. This should fix segmentation faults with various PHP extensions. It has proven to work with lang/php5.
>How-To-Repeat:
See thread "php5-5.3.6_1 with Segmentation fault (amd64)" on ports@FreeBSD.org. This also applies to PHP 5.2.

>Fix:
apply the patch (untested)

Patch attached with submission follows:

--- lang/php52/Makefile.orig	2011-06-29 11:44:40.000000000 +0200
+++ lang/php52/Makefile	2011-06-29 11:48:18.000000000 +0200
@@ -2,11 +2,12 @@
 # Date created:				17 Apr 2010
 # Whom:					Alex Keda <admin@lissyara.su>
 #
-# $FreeBSD: ports/lang/php52/Makefile,v 1.17 2011/01/09 18:56:55 mm Exp $
+# $FreeBSD: $
 #
 
 PORTNAME=	php52
 PORTVERSION=	5.2.17
+PORTREVISION=	1
 CATEGORIES?=	lang devel www
 MASTER_SITES=	${MASTER_SITE_PHP}
 MASTER_SITE_SUBDIR=	distributions
@@ -46,7 +47,8 @@
 		DISCARD "Enable discard-path support (CGI only)" off \
 		FASTCGI "Enable fastcgi support (CGI only)" on \
 		FPM "Enable fastcgi process manager (CGI only)" off \
-		PATHINFO "Enable path-info-check support (CGI only)" on
+		PATHINFO "Enable path-info-check support (CGI only)" on \
+		LINKTHR "Link thread lib (for threaded extensions)" off
 
 CONFLICTS=	php4-4* php5-5.3*
 
@@ -170,6 +172,10 @@
 
 MAKE_ENV+=	LDFLAGS="${LDFLAGS}"
 
+.if defined(WITH_LINKTHR)
+CONFIGURE_ENV+=        LIBS="${LIBS} ${PTHREAD_LIBS}"
+.endif
+
 .if defined(WITH_DEBUG)
 CONFIGURE_ARGS+=--enable-debug
 .endif


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106290958.p5T9wrXj000594>