You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Larry Lipsmeyer <la...@nascent.com> on 1998/09/02 16:20:51 UTC

general/2945: DEBUG compile of util.c fails with undefined variable

>Number:         2945
>Category:       general
>Synopsis:       DEBUG compile of util.c fails with undefined variable
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Sep  2 07:30:00 PDT 1998
>Last-Modified:
>Originator:     larry@nascent.com
>Organization:
apache
>Release:        1.3.1
>Environment:
josta# uname -a
SunOS josta 5.6 Generic_105182-05 i86pc i386 i86pc

josta# gcc -v
Reading specs from /usr/local/lib/gcc-lib/i386-pc-solaris2.6/2.8.1/specs
gcc version 2.8.1
>Description:
Downloaded the source and ran ./configure.  Next I typed make and when it got to util.c
the compile failed:

gcc -c  -I../os/unix -I../include   -DSOLARIS2=260 -DDEBUG `../apaci` util.c
util.c: In function `ap_cfg_closefile':
util.c:704: `fp' undeclared (first use in this function)
util.c:704: (Each undeclared identifier is reported only once
util.c:704: for each function it appears in.)
gmake[3]: *** [util.o] Error 1
gmake[3]: Leaving directory `/export/home/larry/apache_1.3.1/src/main'
gmake[2]: *** [subdirs] Error 1
gmake[2]: Leaving directory `/export/home/larry/apache_1.3.1/src'
gmake[1]: *** [build-std] Error 2
gmake[1]: Leaving directory `/export/home/larry/apache_1.3.1'
gmake: *** [build] Error 2

I had my CFLAGS environment variable set from compiling my software so that's where the
-DDEBUG is coming from in the compile line.  This is just a typo in the source.  If
I change line 704 in util.c as I suggest below it takes care of the error.
>How-To-Repeat:
set CFLAGS environment variable to -DDEBUG and then do a make.
>Fix:
change line 704 of util.c from:

ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, NULL, "Done with config file %s", fp->name);

to:

ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, NULL, "Done with config file %s", cfp->name);
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> 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!         ]