https://issues.apache.org/bugzilla/show_bug.cgi?id=54613

            Bug ID: 54613
           Summary: httpd assumes apr with APR_HAS_THREADS true
           Product: Apache httpd-2
           Version: 2.4.4
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Build
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified

TLDR: apache-2.4 cannot be compiled on FreeBSD<=5.2, this is not clearly
documented, the requirements for threading support are not clearly documented,
"configure" issues no warning or errors, the compile step fails inelegantly.

The unconditional presence of the type "apr_thread_mutex_t" in the
"request_rec" struct member "invoke_mtx" (include/httpd.h) means that httpd
will only compile when apr is built with APR_HAS_THREADS defined non-zero. This
member was not present in 2.2.x.

Observed on 
- x86 FreeBSD-4.11 (don't ask)
- httpd-2.4.4
- apr-1.4.6
- apr-util-1.5.1

This means that httpd-2.4.4 can be configured successfully with
"--with-mpm=prefork" but the wheels come off part way through the compile.
(apr support for threading support on FreeBSD is limited to >=5.2, specifically
kern.osreldate >= 502102 when libpthread/libkse support was enabled)

The only place this structure member is used in core
(modules/http/http_request.c) *is* guarded with "#if APR_HAS_THREADS", so it
appears safe to fix, but I do not know to what extent this structure is used in
the ABI.
(The experimental mod_dialup also uses it, it implicitly requires threading.)

mod_proxy's "proxy_worker" and "proxy_balancer" have a similar issue. mod_proxy
appears to require threads, though it does not check for apr support, and the
documentation (http://httpd.apache.org/docs/2.4/mod/mod_proxy.html) still
refers to prefork MPM support. I also mention this because server/core.c
includes mod_proxy.h even if no proxy module is enabled.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to