Another point which I forgot to mention. With the current layout (existing one), trying to create a sample module failed with the following error. ------------------------------------------------------------------------- % apxs -n foo -g % cd foo % make all reload make: Warning: Can't find `/usr/apache2/build/rules.mk': No such file or directory make: Fatal error in reader: /var/apache2/build/special.mk, line 26: Read of include file `/usr/apache2/build/rules.mk' failed -------------------------------------------------------------------------
The cause for the failure is the non-existence of /usr/apache2/build directory. The scripts fail to look at the configured installbuilddir. They expect it to be under $prefix/build directory which is incorrect. It could be an error on the Apache side as the build dir is one of the configurable parameter. Changing the installbuilddir from "/var/apache2/build" to "/usr/apache2/build" solved the issue. Should we change the "build" dir location or should we add a patch file which fixes the issue on the apache side ? Thanks and Regards, Seema. Seema Alevoor wrote: >> 1. I was wondering, for simplicity sake, should we not compile the >> apache httpd in the same way for both MPM models. This would allow us >> to use same configure script and change only line '--with-mpm' >> depending on which model we build. This way, going forward, if we need >> to add another MPM support (say Solaris specific), we don't introduce >> any different compilation options. > > Sure, we can do that. > >> 2. In your prototype, did you explore the need to bundle apxs >> separately (one for prefork and worker) ? > > No, I didn't. Test suite uses this script and it worked fine with the > common one. > >> Say a customer wanting to compile his third party apache module - foo >> , does he need to know what is the MPM model currently configured ? I >> am hoping that this is transparent to the customer and can simply use >> apxs irrespective of the MPM mode. But, just wanted to ensure that we >> took this issue into account. >> > The var within config_vars.mk that varies for prefork and worker is > MPM_NAME (which will be set to "prefork" or "worker" mpm mode) > and progname (will be set to "httpd"). apxs uses "progname" var to check > if the server has been build with mod_so > module and also to use server's default .conf file (httpd.conf). Since > both these mpms are built with mod_so, check succeeds. > > As I had mentioned in my previous mail, I do see some differences in the > files. I have attached the list of files which differ and are new. > Would this mean bundling 2 sets of these differing files, one for > prefork and one for worker ? > > > Thanks and Regards, > Seema. > > > ------------------------------------------------------------------------ > > diff -r worker/usr/apache2/include/ap_config_auto.h > prefork/usr/apache2/include/ap_config_auto.h > 5c5 > < #define APACHE_MPM_DIR "server/mpm/worker" > --- >> #define APACHE_MPM_DIR "server/mpm/prefork" > 114c114 > < #define HAVE_PTHREAD_KILL 1 > --- >> /* #undef HAVE_PTHREAD_KILL */ > > diff -r worker/usr/apache2/include/mpm.h prefork/usr/apache2/include/mpm.h > 25a26,27 >> #include "httpd.h" >> #include "mpm_default.h" > 29,30c31,32 > < #ifndef APACHE_MPM_WORKER_H > < #define APACHE_MPM_WORKER_H > --- >> #ifndef APACHE_MPM_PREFORK_H >> #define APACHE_MPM_PREFORK_H > 32c34 > < #define WORKER_MPM > --- >> #define PREFORK_MPM > 34c36 > < #define MPM_NAME "Worker" > --- >> #define MPM_NAME "Prefork" > 47,48d48 > < #define AP_MPM_WANT_SET_STACKSIZE > < #define AP_MPM_WANT_SET_GRACEFUL_SHUTDOWN > 49a50 >> #define AP_MPM_WANT_SET_GRACEFUL_SHUTDOWN > 51a53 >> #define AP_MPM_USES_POD 1 > 59,61c61 > < extern char ap_coredump_dir[MAX_STRING_LEN]; > < > < #endif /* APACHE_MPM_WORKER_H */ > --- >> #endif /* APACHE_MPM_PREFORK_H */ > > diff -r worker/usr/apache2/include/mpm_default.h > prefork/usr/apache2/include/mpm_default.h > 32c32 > < #define DEFAULT_START_DAEMON 3 > --- >> #define DEFAULT_START_DAEMON 5 > 46c46 > < #define DEFAULT_MIN_FREE_DAEMON 3 > --- >> #define DEFAULT_MIN_FREE_DAEMON 5 > 49,52d48 > < #ifndef DEFAULT_THREADS_PER_CHILD > < #define DEFAULT_THREADS_PER_CHILD 25 > < #endif > < > > diff -r worker/usr/apache2/modules/httpd.exp > prefork/usr/apache2/modules/httpd.exp > 345a344,348 >> ap_mpm_pod_open >> ap_mpm_pod_check >> ap_mpm_pod_close >> ap_mpm_pod_signal >> ap_mpm_pod_killpg > > diff -r worker/var/apache2/build/config.nice > prefork/var/apache2/build/config.nice > 30c30 > < "--with-mpm=worker" \ > --- >> "--with-mpm=prefork" \ > > diff -r worker/var/apache2/build/config_vars.mk > prefork/var/apache2/build/config_vars.mk > 25c25 > < MPM_NAME = worker > --- >> MPM_NAME = prefork > > Only in worker/usr/apache2/include: fdqueue.h > Only in worker/usr/apache2/include: pod.h >
