From owner-freebsd-apache@FreeBSD.ORG Tue Feb 19 22:11:44 2013 Return-Path: Delivered-To: freebsd-apache@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1ADF9EFA for ; Tue, 19 Feb 2013 22:11:44 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from p578be941.dip0.t-ipconnect.de (p578be941.dip0.t-ipconnect.de [87.139.233.65]) by mx1.freebsd.org (Postfix) with ESMTP id B5180AB4 for ; Tue, 19 Feb 2013 22:11:43 +0000 (UTC) Received: from [192.168.0.100] (cde1100.uni.vrs [192.168.0.100]) (Authenticated sender: ohauer) by p578be941.dip0.t-ipconnect.de (Postfix) with ESMTPSA id 425F8208E2; Tue, 19 Feb 2013 23:01:33 +0100 (CET) Message-ID: <5123F63D.1030400@FreeBSD.org> Date: Tue, 19 Feb 2013 23:01:33 +0100 From: Olli Hauer User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: freebsd-apache@freebsd.org Subject: Re: apache22-worker-mpm check for apr threads fails References: In-Reply-To: X-Enigmail-Version: 1.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Geoff Speicher X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: freebsd-apache@freebsd.org List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2013 22:11:44 -0000 On 2013-02-19 16:57, Geoff Speicher wrote: > The check for APR threading support in the apache22 Makefile.modules > file, which gets used when building the apache22-worker-mpm port, is > broken. On a pristine 9.1 box with an up-to-date ports tree, > attempting to build apache22-worker-mpm successfully builds its > prerequisites, including devel/apr1 with threading enabled, but upon > returning to apache22-worker-mpm the build dies with the following > error: > > ===> apache22-worker-mpm-2.2.23_4 requires APR threads. Please > rebuild APR with THREAD support. > *** [all] Error code 1 > > This error occurs regardless of whether or not threading is enabled in > APR. Cursory snooping leads me to think that this may have been > broken by APR ports commit r312209. As a temporary workaround, I > patched my copy with the following: > > --- Makefile.modules.orig 2013-02-19 10:33:58.000000000 -0500 > +++ Makefile.modules 2013-02-19 10:41:40.000000000 -0500 > @@ -22,7 +22,7 @@ > .if exists(${APR_CONFIG}) > APR_LIBS!= ${SH} ${APR_CONFIG} --libs | ${SED} -e 's/-//g' > . if defined(APR_LIBS) && !empty(APR_LIBS) > -_T=pthread > +_T=lpthread > . for lib in ${APR_LIBS} > . if ${_T:M${lib}} > APR_HAS_THREADS= yes > > This works if APR was rebuilt using the new flags but probably not > otherwise. There must be a better way of determining thread support > that will work regardless of which flags were use to compile APR, e.g. > checking APR_HAS_THREADS in apr.h or something similar: > > # grep -r '#define APR_HAS_THREADS' /usr/local/include/apr* > /usr/local/include/apr-1/apr.h:#define APR_HAS_THREADS 1 > > Then again, maybe just updating the Makefile (as above) and bumping > the devel/apr1 PORTREVISION would work too. Hi Geoff, I just reverted the devel/apr commit, since the target there was to replace -lpthread with -pthread (setting LDFLAGS in apr1 does not result in the correct apr-1-config return values). Thanks for your note. Regards, olli