Bug 46810

Summary: apxs / apu-1-config outputting erroneous include path
Product: Apache httpd-2 Reporter: Kris <kristen.glynn>
Component: BuildAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED LATER    
Severity: normal Keywords: MassUpdate
Priority: P2    
Version: 2.2.11   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: httpd-2.2.11 config.log

Description Kris 2009-03-05 21:40:10 UTC
Created attachment 23345 [details]
httpd-2.2.11 config.log

Overview:
Building/compiling/installing httpd-2.2.11 completes 100% but executing "apache/bin/apu-1-config --includes" displays incorrect details.

Steps to Reproduce:

httpd-2.2.11 configure options:

env CPPFLAGS="-I/data/wwwmgmt3/apache/include -I/data/wwwmgmt3/apache/include/openssl" LDFLAGS="-L/data/wwwmgmt3/apache/lib -R/data/wwwmgmt3/apache/lib" ./configure --prefix=/data/wwwmgmt3/apache --enable-so --enable-deflate --enable-proxy --enable-authn-anon --enable-authn-dbm --enable-auth-digest --enable-ldap --enable-authnz-ldap  --enable-ssl --enable-dav --enable-dav-fs --enable-rewrite --enable-so --with-ssl=/data/wwwmgmt3/apache --with-z=/data/wwwmgmt3/apache --enable-mods-shared=all --with-ldap --with-berkeley-db=/data/wwwmgmt3/apache/lib --with-included-apr

Then run - "/data/wwwmgmt3/apache/bin/apu-1-config --includes"

Actual Results:

-I/data/wwwmgmt3/apache/include /include

Expected Results:

-I/data/wwwmgmt3/apache/include

Build Date & Platform:

Fri Mar 6 15:11:06 EST 2009
CentOS release 3.8 (Final)
Linux 2.4.21-47.0.1.ELsmp #1 SMP Thu Oct 19 11:33:45 EDT 2006 i686 i686 i386 GNU/Linux

Additional Information:

The incorrect results of apu-1-config causes 3rd party modules to build incorrectly since it is passing the following in my instance to 3rd party modules Makefiles via apxs

Example 1. - mod_ntlm2

[mod_ntlm2]# make
/data/wwwmgmt3/apache/bin/apxs -c -o mod_ntlm.so -Wc,-shared mod_ntlm.c
/data/wwwmgmt3/apache/build/libtool --silent --mode=compile gcc -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread -I/data/wwwmgmt3/apache/include  -I/data/wwwmgmt3/apache/include   -I/data/wwwmgmt3/apache/include /include -shared  -c -o mod_ntlm.lo mod_ntlm.c && touch mod_ntlm.slo
gcc: cannot specify -o with -c or -S and multiple compilations
apxs:Error: Command failed with rc=65536
.
make: *** [mod_ntlm.so] Error 1

Example 2. - php-5.2.9

/bin/sh /home/glynnk/workdir/my_web/php-5.2.9/libtool --silent --preserve-dup-deps --mode=compile gcc  -I/data/wwwmgmt3/apache/include   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/data/wwwmgmt3/apache/include   -I/data/wwwmgmt3/apache/include /include -Isapi/apache2handler/ -I/home/glynnk/workdir/my_web/php-5.2.9/sapi/apache2handler/ -DPHP_ATOM_INC -I/home/glynnk/workdir/my_web/php-5.2.9/include -I/home/glynnk/workdir/my_web/php-5.2.9/main -I/home/glynnk/workdir/my_web/php-5.2.9 -I/data/wwwmgmt3/apache/include/libxml2 -I/data/wwwmgmt3/apache/include -I/home/glynnk/workdir/my_web/php-5.2.9/ext/date/lib -I/usr/X11R6//include -I/data/wwwmgmt3/apache/include/freetype2 -I/data/wwwmgmt3/apache/include/mysql -I/usr/include/oracle/10.2.0.3/client -I/home/glynnk/workdir/my_web/php-5.2.9/TSRM -I/home/glynnk/workdir/my_web/php-5.2.9/Zend    -I/usr/include -g -O2  -prefer-non-pic -c /home/glynnk/workdir/my_web/php-5.2.9/sapi/apache2handler/mod_php5.c -o sapi/apache2handler/mod_php5.lo 


As you can see in the examples above /include appears which it shouldn't (as I don't even have a /include dir and never passed options to include it) and it is also lacking a -I proceeding it anyway which obviously causes gcc to fail since "/include" does not exist and because it is not proceeded with -I

make --version
GNU Make 3.80

gcc --version
gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-56)

httpd-2.2.11 config.log attached.

Interestingly apr-1-config (not apu-1-config) outputs correct results..

Command: /data/wwwmgmt3/apache/bin/apr-1-config --includes
Output: -I/data/wwwmgmt3/apache/include
Comment 1 William A. Rowe Jr. 2018-11-07 21:09:19 UTC
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd.

As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd.

If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question.

If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with.

Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated.