>Number: 3240
>Category: config
>Synopsis: Mishandling of -DSERVER_SUBVERSION="PHP/3.0.3 AuthMySQL/2.20"
>in src/Configure
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Mon Oct 19 05:50:00 PDT 1998
>Last-Modified:
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: 1.3.3
>Environment:
Linux xxx 2.0.35 #1 Wed Aug 12 14:04:31 CEST 1998 i686 unknown
glibc-2.0.7-19
RedHat-5.1
>Description:
Configuration of apache with two additional Modules stop with an weird error
message:
Configuring for Apache, Version 1.3.3
+ activated php3 module (modules/php3/libphp3.a)
+ activated auth_mysql module (modules/auth_mysql/libauth_mysql.a)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for Linux platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ checking for system header files
+ adding selected modules
o php3_module uses ConfigStart/End
o auth_mysql_module uses ConfigStart/End
gcc: AuthMySQL/2.20": No such file or directory
helpers/dummy.c:0: unterminated string or character constant
helpers/dummy.c:0: possible real start of unterminated constant
make: *** [dummy] Error 1
+ doing sanity check on compiler and options
** A test compilation with your Makefile configuration
** failed. This is most likely because your C compiler
** is not ANSI. Apache requires an ANSI C Compiler, such
** as gcc. The above error message from your compiler
** will also provide a clue.
Aborting!
The reason seems to be the mishandling of -DSERVER_SUBVERSION="PHP/3.0.3
AuthMySQL/2.20"
in src/Configure:
It's given as -DSERVER_SUBVERSION=\"PHP/3.0.3 AuthMySQL/2.20\" to the
commandline, so
gcc doesn't found: AuthMySQL/2.20"
It's misparsed at a "for ... in $CFLAGS" construct, which breaks at every space,
so it divides the define above in two unusable parts.
>How-To-Repeat:
Use two modules which set $SUBVERSION,
if you wish, I can email you the rpm spec file with which I'm building apache.
>Fix:
Correct handling of -DSERVER_SUBVERSION="PHP/3.0.3 AuthMySQL/2.20" in
src/Configure
My hack is (working on Linux, eg. with bash and GNU sed, will probably fail on
others):
--- apache_1.3.3/src/Configure.confpatch Mon Oct 19 11:30:30 1998
+++ apache_1.3.3/src/Configure Mon Oct 19 13:54:16 1998
@@ -1693,7 +1693,7 @@
##
if [ "x$SUBVERSION" != "x" ] ; then
SUBVERSION=`echo $SUBVERSION | sed 's/^ +//'`
- CFLAGS="$CFLAGS -DSERVER_SUBVERSION=\\\"$SUBVERSION\\\""
+ CFLAGS="$CFLAGS -DSERVER_SUBVERSION=\"$SUBVERSION\""
fi
####################################################################
@@ -1766,6 +1766,7 @@
## ap_config_auto.h so they are available to external modules needing to
## include Apache header files.
##
+#MUST replace space in -Dxxx="test1 test2" !
for cflag in $(echo $CFLAGS | sed 's/[ \t]-D/@@/g;s/[ ]/_/g;s/@@/ -D/g'); do
echo $cflag | sed 's/\\\"/\"/g' >>$tmpconfig ;
done
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request ]
[from a developer. ]
[Reply only with text; DO NOT SEND ATTACHMENTS! ]