Date: Tue, 19 Feb 2013 23:01:33 +0100 From: Olli Hauer <ohauer@FreeBSD.org> To: freebsd-apache@freebsd.org Cc: Geoff Speicher <geoff@sea-incorporated.com> Subject: Re: apache22-worker-mpm check for apr threads fails Message-ID: <5123F63D.1030400@FreeBSD.org> In-Reply-To: <CAFMeXOZr6buM0akb%2B3L=zRU_Vym9LUo7Tb0XVVQ4ZSSkexgvfg@mail.gmail.com> References: <CAFMeXOZr6buM0akb%2B3L=zRU_Vym9LUo7Tb0XVVQ4ZSSkexgvfg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5123F63D.1030400>