httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Wiedmann <carsten_st...@gmx.de>
Subject Re: [mod_fcgid] can't find apr headers
Date Thu, 10 Dec 2009 17:30:10 GMT
Am 10.12.2009 15:07, schrieb Jeff Trawick:
>>>> No, the apr include dir is not part of EXTRA_INCLUDES. The apr inlude dir
is
>>>> defined in APR_INCLUDEDIR.
>>>
>>> The APR include dir should appear within both APR_INCLUDEDIR and
>>> EXTRA_INCLUDES.  Report that to your httpd provider, or open a bug at
>>> https://issues.apache.org/bugzilla/ if you built it yourself.
>>
>> This only happens, if you build httpd with a preinstalled APR, but not with
>> the bundled APR
>>
> I'm confused...  What is the condition where EXTRA_INCLUDES doesn't
> find APR include files?  When the bundled APR is used with certain
> non-default layouts, or something else?

OK, just two tests (the thing the layouts is a "special" case).

1st test:
# ./configure --prefix=/var/tmp/httpd-2.2.14
# make && make install
# /var/tmp/httpd-2.2.14/bin/apxs -q INCLUDEDIR
/var/tmp/httpd-2.2.14/include
# /var/tmp/httpd-2.2.14/bin/apxs -q EXTRA_INCLUDES
-I/var/tmp/httpd-2.2.14/include
-I.
-I/root/httpd-2.2.14/srclib/apr/include
-I/root/httpd-2.2.14/srclib/apr-util/include
-I/usr/local/include
# /var/tmp/httpd-2.2.14/bin/apxs -q APR_INCLUDEDIR
/var/tmp/httpd-2.2.14/include

As you can see, the APR include dir is not part of EXTRA_INCLUDES. But is
defined in APR_INCLUDEDIR (and it's "by chance" the same thing as INCLUDEDIR
is). If you say:
>>> The APR include dir should appear within both APR_INCLUDEDIR and
>>> EXTRA_INCLUDES.
that's a bug.


2nd test:
# cd srclib/apr
# ./configure --prefix=/var/tmp/httpd-2.2.14
# make && make install
# cd ../apr-util
# ./configure --prefix=/var/tmp/httpd-2.2.14 \
              --with-apr=/var/tmp/httpd-2.2.14
# make && make install
# cd ../..
# ./configure --prefix=/var/tmp/httpd-2.2.14 \
              --with-apr=/var/tmp/httpd-2.2.14 \
              --with-apr-util=/var/tmp/httpd-2.2.14
# make && make install
# /var/tmp/httpd-2.2.14/bin/apxs -q INCLUDEDIR
/var/tmp/httpd-2.2.14/include
# /var/tmp/httpd-2.2.14/bin/apxs -q EXTRA_INCLUDES
-I/var/tmp/httpd-2.2.14/include
-I.
-I/var/tmp/httpd-2.2.14/include/apr-1
-I/usr/local/include
# /var/tmp/httpd-2.2.14/bin/apxs -q APR_INCLUDEDIR
/var/tmp/httpd-2.2.14/include/apr-1

As you can see, now APR_INCLUDEDIR is also part of EXTRA_INCLUDES.

So EXTRA_INCLUDES is just listing the includes which were used during the
build of httpd.

(BTW: APU_INCLUDEDIR can also be a different directory)


>> With the bundled APR, that's only working for (most) people, because
>> apr/apr-util doesn't (normally) respect it's own config.layout (if
>> --enable-layout is used), and so the httpd and APR headers are going to
>> the same directory, which is the directory defined in "includedir" in
>> condig_vars.mk.

OK, the special case. For a test, let us use the OpenBSD layout. As a
prerequisite, I have to change:
-    exec_prefix:   /usr
+    exec_prefix:   ${prefix}
in "config.layout", "srclib/apr/config.layout" and
"srclib/apr-util/config.layout" (my /usr is a read-only filesystem).

3rd test:
# ./configure --prefix=/var/tmp/httpd-2.2.14 \
              --enable-layout=OpenBSD
# make && make install

Ok, in "config.layout" I have:
| includedir:    ${exec_prefix}/lib/apache/include
fine, I can see the files.

Now I'm looking to "srclib/apr/config.layout" and I have:
| includedir:    ${exec_prefix}/lib/apr/include
But surprise... this directory (and others) doesn't exists, and the APR
headers are also in "${exec_prefix}/lib/apache/include".


That's one problem.
Well, easy to fix (Makefile.in patches). And with this "fix" the APR files
are going into the directories defined in "srclib/apr/config.layout" as
expected. But now you have the problem from the 1st test:
The httpd headers are in "${exec_prefix}/lib/apache/include", the APR
headers are in "${exec_prefix}/lib/apr/include", but this dir is not listed
in INCLUDEDIR or EXTRA_INCLUDES. Only in APR_INCLUDEDIR.

Regards,
Carsten


Mime
View raw message