apache22-worker-mpm check for apr threads fails
Geoff Speicher
geoff at sea-incorporated.com
Tue Feb 19 15:57:48 UTC 2013
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.
More information about the freebsd-apache
mailing list