You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Jeremy D. Weiss" <jd...@chanweiss.com> on 2003/04/03 01:00:30 UTC

[users@httpd] prefork.c compile error (Apache 2.0.45)

My system is a somewhat-heavily modified debian-3.0 installation, running 
the 2.4.20 kernel.

Everything compiles fine, until it gets to the prefork.c file (in 
server/mpm/prefork).  At that point, it spits out:

/bin/sh /usr/local/src/httpd-2.0.45/srclib/apr/libtool --silent 
--mode=compile gcc  -g -O2 -pthread    -DLINUX=2 -D_REENTRANT 
-D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE 
-DAP_HAVE_DESIGNATED_INITIALIZER 
-I/usr/local/src/httpd-2.0.45/srclib/apr/include 
-I/usr/local/src/httpd-2.0.45/srclib/apr-util/include -I/usr/local/include 
-I. -I/usr/local/src/httpd-2.0.45/os/unix 
-I/usr/local/src/httpd-2.0.45/server/mpm/prefork 
-I/usr/local/src/httpd-2.0.45/modules/http 
-I/usr/local/src/httpd-2.0.45/modules/filters 
-I/usr/local/src/httpd-2.0.45/modules/proxy 
-I/usr/local/src/httpd-2.0.45/include 
-I/usr/local/src/httpd-2.0.45/modules/dav/main -prefer-non-pic -static -c 
prefork.c && touch prefork.lo
prefork.c: In function `child_main':
prefork.c:563: `ap_max_mem_free' undeclared (first use in this function)
prefork.c:563: (Each undeclared identifier is reported only once
prefork.c:563: for each function it appears in.)
make[4]: *** [prefork.lo] Error 1
make[4]: Leaving directory `/usr/local/src/httpd-2.0.45/server/mpm/prefork'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/src/httpd-2.0.45/server/mpm/prefork'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/httpd-2.0.45/server/mpm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/httpd-2.0.45/server'
make: *** [all-recursive] Error 1


I looked around a bit, and it appears that "ap_max_mem_free" is defined via 
an 'extern' in include/mpm_common.h

#ifdef AP_MPM_WANT_SET_MAX_MEM_FREE
extern apr_uint32_t ap_max_mem_free;
extern const char *ap_mpm_set_max_mem_free(cmd_parms *cmd, void *dummy,
                                            const char *arg);
#endif


and AP_MPM_WANT_SET_MAX_MEM_FREE is #defined in mpm/prefork/mpm.h

Now, I confess little enough knowledge of Makefiles to be able to figure 
out what is being built from where (and what is included).   Greping the 
various .h files, however, shows that mpm_common.h is #included in 
prefork.c and mpm.h is #included in mpm_common.c
Actually, looking closer, it appears that mpm.h is #included in 
mpm_common.h as well.

It seems to me, if mpm.h is included into mpm_common.h, and mpm_common.h is 
included into prefork.c then this problem shouldn't be occurring...but 
obviously it is, and I can't figure out why.  I've searched both ML and 
newsgroup archives, and found someone else posting a similar problem, but 
no solution.

Thanks in advance,
==Jeremy



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] prefork.c compile error (Apache 2.0.45)

Posted by "Jeremy D. Weiss" <jd...@chanweiss.com>.
At 06:00 PM 04/02/2003 -0500, you wrote:
>My system is a somewhat-heavily modified debian-3.0 installation, running 
>the 2.4.20 kernel.
>
>Everything compiles fine, until it gets to the prefork.c file (in 
>server/mpm/prefork).  At that point, it spits out:

And in the 'stupid errors' category:  It turns out, I had an old 2.0.39 
install, with it's include files symlinked to /usr/local/include.  The 
build of 2.0.45 found THOSE before it found it's OWN, thus the errors.

I shall now go away, and sooth my bruised ego (I can't BELIEVE I didn't 
catch that!)

==Jeremy 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org