Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev

[mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h

 

 

Apache dev RSS feed   Index | Next | Previous | View Threaded


mmerz at gmx

Sep 25, 2009, 10:20 AM

Post #1 of 16 (849 views)
Permalink
[mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h

I do not know whether i did something wrong but before a new release of
mod_fcgid, i wanted to share my experience:

I use Apache 2.2.13 on a OpenSUSE 10.3 distri and did download and extract
mod_fcgid-2.3.1-beta.tar.gz to /usr/local/source/mod_fcgid-2.3.1

From there i did

APXS=/usr/sbin/apxs2 ./configure.apxs

and following 'make', i got a gcc compiler error complaining about a missing
mpm.h and mpm_default.h in /usr/include/apache2

I came around the problem by symlinking both files using
:/usr/include/apache2 # ln -s ../apache2-prefork/mpm.h mpm.h
:/usr/include/apache2 # ln -s ../apache2-prefork/mpm_default.h mpm_default.h

and instead of 'make install' i just copied the resulting mod_fcgid.so as
mod_fcgid.so-2.3.1 to /usr/lib64/apache2 followed by

:/usr/lib64/apache2 # ln -s mod_fcgid.so-2.3.1 mod_fcgid.so after renaming
the original file to mod_fcgid.so-2.2.org

So, in the end i got it running (the problems i entered after using
mod_fcgid with binary content are in another thread on this list). I just
wonder whether i did something wrong or whether there is a 'flaw' in the
Makefile which might causes this error with other people who may not be too
experienced to find a solution themselves.

Regards,
Marcus


trawick at gmail

Sep 25, 2009, 10:48 AM

Post #2 of 16 (812 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

On Fri, Sep 25, 2009 at 1:02 PM, Marcus Merz <mmerz [at] gmx> wrote:

> I do not know whether i did something wrong but before a new release of
> mod_fcgid, i wanted to share my experience:
>
> I use Apache 2.2.13 on a OpenSUSE 10.3 distri and did download and extract
> mod_fcgid-2.3.1-beta.tar.gz to /usr/local/source/mod_fcgid-2.3.1
>
> From there i did
>
> APXS=/usr/sbin/apxs2 ./configure.apxs
>
> and following 'make', i got a gcc compiler error complaining about a
> missing
> mpm.h and mpm_default.h in /usr/include/apache2
>
> I came around the problem by symlinking both files using
> :/usr/include/apache2 # ln -s ../apache2-prefork/mpm.h mpm.h
> :/usr/include/apache2 # ln -s ../apache2-prefork/mpm_default.h
> mpm_default.h
>

mod_fcgid includes mpm_common.h, which in turn includes those.

It is perhaps odd for an unbundled module to use those, but httpd does
intend for them to be installed. (In fact the mod_fcgid process manager has
enough commonality with the httpd MPMs that it might use the same services
more extensively in the future.)

Can you confirm that this simple module also fails to build?

---------mod_foo.c--------
#include "mpm_common.h"
---------end--------------

Try to build with "apxs -c mod_foo.c"

Can you follow up with the OpenSUSE folks on that? It sounds like a
packaging problem with their httpd which could affect a minority of modules
(those which use mpm_common.h), but maybe they have an explanation of how
those .h files are to be found when using apxs.



>
> So, in the end i got it running (the problems i entered after using
> mod_fcgid with binary content are in another thread on this list).


I hope to get back to that thread this weekend.

(I don't think it has anything to do with binary content, FWIW. It just has
to do with the selection by the PHP interpreter of which is the script, and
whether or not mod_fcgid is passing information about the request to PHP in
a way that PHP can figure it out.)


pgnet.dev+httpd at gmail

Sep 25, 2009, 10:52 AM

Post #3 of 16 (813 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

On Fri, Sep 25, 2009 at 10:02 AM, Marcus Merz <mmerz [at] gmx> wrote:
> APXS=/usr/sbin/apxs2 ./configure.apxs

iirc (?), try,

APXS=/usr/sbin/apxs2-prefork

instead ...


wrowe at rowe-clan

Sep 25, 2009, 12:10 PM

Post #4 of 16 (812 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

Marcus Merz wrote:
>
> Umm, I am no expert so please bear with me... ;-)
>
> I did create mod_foo.c in :/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
> with vim and only one line
> ---
> #include "mpm_common.h"
> ---
>
> and afterwards
>
> :/usr/local/src/mod_fcgid-2.3.1/modules/fcgid # apxs2 -c mod_foo.c

Then try with
# apxs2-prefork -c mod_foo.c

and report the results in a SUSE incident. We can't help you here with troubles
in a specific distribution :( Sorry.

Bill


mmerz at gmx

Sep 25, 2009, 12:20 PM

Post #5 of 16 (806 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

"Jeff Trawick" <trawick [at] gmail> schrieb im Newsbeitrag news:cc67648e0909251048q1039d7d2u5610e491faeec128 [at] mail

mod_fcgid includes mpm_common.h, which in turn includes those.

It is perhaps odd for an unbundled module to use those, but httpd does intend for them to be installed. (In fact the mod_fcgid process manager has enough commonality with the httpd MPMs that it might use the same services more extensively in the future.)

Can you confirm that this simple module also fails to build?

---------mod_foo.c--------
#include "mpm_common.h"
---------end--------------

Try to build with "apxs -c mod_foo.c"

Can you follow up with the OpenSUSE folks on that? It sounds like a packaging problem with their httpd which could affect a minority of modules (those which use mpm_common.h), but maybe they have an explanation of how those .h files are to be found when using apxs.

Umm, I am no expert so please bear with me... ;-)

I did create mod_foo.c in :/usr/local/src/mod_fcgid-2.3.1/modules/fcgid with vim and only one line
---
#include "mpm_common.h"
---

and afterwards

:/usr/local/src/mod_fcgid-2.3.1/modules/fcgid # apxs2 -c mod_foo.c
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apache2 -I/usr/include/apr-1 -I/usr/include/apr-1 -c -o mod_foo.lo mod_foo.c && touch mod_foo.slo
In file included from mod_foo.c:1:
/usr/include/apache2/mpm_common.h:46:17: error: mpm.h: No such file or directory
In file included from mod_foo.c:1:
/usr/include/apache2/mpm_common.h:192: error: expected ')' before '*' token
/usr/include/apache2/mpm_common.h:362: error: expected ')' before '*' token
apxs:Error: Command failed with rc=65536
.

HTH
Marcus


mmerz at gmx

Sep 25, 2009, 12:20 PM

Post #6 of 16 (803 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

"PGNet Dev" <pgnet.dev+httpd [at] gmail> schrieb im Newsbeitrag
news:94f2e81e0909251052j69beff84j63fe9336e08328cf [at] mail
> On Fri, Sep 25, 2009 at 10:02 AM, Marcus Merz <mmerz [at] gmx> wrote:
>> APXS=/usr/sbin/apxs2 ./configure.apxs
>
> iirc (?), try,
>
> APXS=/usr/sbin/apxs2-prefork
>
> instead ...
>

I did rename the symlinks in /usr/include/apache2 to mpm.h.xxx and
mpm_default.h.xxx

:/usr/local/src/mod_fcgid-2.3.1 # make clean
Making clean in modules/fcgid
make[1]: Entering directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
make[2]: Entering directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
rm -f *.o *.lo *.slo *.obj *.a *.la *.loT
rm -rf .libs
make[2]: Leaving directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
make[1]: Leaving directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
make[1]: Entering directory `/usr/local/src/mod_fcgid-2.3.1'
rm -f *.o *.lo *.slo *.obj *.a *.la
rm -rf .libs
make[1]: Leaving directory `/usr/local/src/mod_fcgid-2.3.1'

:/usr/local/src/mod_fcgid-2.3.1 # APXS=/usr/sbin/apxs2-prefork
./configure.apxs
Configuring mod_fcgid for APXS in /usr/sbin/apxs2-prefork
Detecting features

Finished, run 'make' to compile mod_fcgid

Run 'make install' to install mod_fcgid

:/usr/local/src/mod_fcgid-2.3.1 # make
Making all in modules/fcgid
make[1]: Entering directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
/usr/lib64/apr-1/build/libtool --silent --mode=compile
cc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000
-DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
-I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include
-I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c mod_fcgid.c
&& touch mod_fcgid.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile
cc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000
-DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
-I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include
-I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c
fcgid_bridge.c && touch fcgid_bridge.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile
cc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000
-DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
-I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include
-I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c fcgid_conf.c
&& touch fcgid_conf.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile
cc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000
-DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
-I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include
-I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c
fcgid_pm_main.c && touch fcgid_pm_main.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile
cc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000
-DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
-I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include
-I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c
fcgid_protocol.c && touch fcgid_protocol.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile
cc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000
-DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
-I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include
-I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c
fcgid_spawn_ctl.c && touch fcgid_spawn_ctl.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile
cc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000
-DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
-I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include
-I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c
fcgid_proctbl_unix.c && touch fcgid_proctbl_unix.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile
cc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000
-DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
-I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include
-I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c
fcgid_pm_unix.c && touch fcgid_pm_unix.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile
cc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000
-DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
-I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include
-I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c
fcgid_proc_unix.c && touch fcgid_proc_unix.slo
In file included from fcgid_proc_unix.c:33:
/usr/include/apache2/mpm_common.h:46:17: error: mpm.h: No such file or
directory
make[1]: *** [fcgid_proc_unix.slo] Error 1
make[1]: Leaving directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
make: *** [all-recursive] Error 1


trawick at gmail

Sep 25, 2009, 12:36 PM

Post #7 of 16 (794 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

On Fri, Sep 25, 2009 at 3:24 PM, Marcus Merz <mmerz [at] gmx> wrote:

>
> "William A. Rowe, Jr." <wrowe [at] rowe-clan> schrieb im Newsbeitrag
> news:4ABD158F.1000904 [at] rowe-clan
> > Marcus Merz wrote:
> >
> > Then try with
> > # apxs2-prefork -c mod_foo.c
> >
> > and report the results in a SUSE incident. We can't help you here with
> > troubles
> > in a specific distribution :( Sorry.
> >
> > Bill
> >
>
> :/usr/local/src/mod_fcgid-2.3.1/modules/fcgid # apxs2-prefork -c mod_foo.c
> /usr/lib64/apr-1/build/libtool --silent --mode=compile
> gcc -prefer-pic -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2
> -fstack-protector
> -O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DLINUX=2
> -D_REENTRANT
> -D_GNU_SOURCE -pthread -I/usr/include/apache2-prefork
> -I/usr/include/apr-1
> -I/usr/include/apr-1 -c -o mod_foo.lo mod_foo.c && touch mod_foo.slo
> /usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o
> od_foo.la -rpath /usr/lib64/apache2-prefork -module -avoid-version
> mod_foo.lo
>
> So that does work. Nevertheless, when using
>
> :/usr/local/src/mod_fcgid-2.3.1 # APXS=/usr/sbin/apxs2-prefork
> ./configure.apxs the following 'make' fails as in my answer to PGNet Dev.
>
> btw.: I am not 'complaining'. I am not an expert and therefore i do not
> know
> whether this was my fault, mod-fcgid's Makefile fault, a flaw in OpenSuSE
> or
> <you-name-it> and quite frankly i do not care who's/which fault.
>
> I just wanted to make "you" (developers) aware of it, in case it was a flaw
> in mod_fcgid's Makefile. I know how to find a workaround as stated in my
> original post.
>

Please note that we're not treating your comments as complaining or worrying
whose fault it is, beyond trying to find the best venue to address the
issue.

Just one more thing, as I'm still a tiny bit hopeful about the
"APXS=/usr/sbin/apxs2-prefork" trick:

Can you try "make distclean" then do the "APXS=... ./configure.apxs"
followed by make, instead of just "make clean"?


fuankg at apache

Sep 25, 2009, 12:52 PM

Post #8 of 16 (796 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

Bill,
William A. Rowe, Jr. schrieb:
> Marcus Merz wrote:
>> Umm, I am no expert so please bear with me... ;-)
>>
>> I did create mod_foo.c in :/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
>> with vim and only one line
>> ---
>> #include "mpm_common.h"
>> ---
>>
>> and afterwards
>>
>> :/usr/local/src/mod_fcgid-2.3.1/modules/fcgid # apxs2 -c mod_foo.c
>
> Then try with
> # apxs2-prefork -c mod_foo.c
# make
/usr/lib/apr-1/build/libtool --silent --mode=compile gcc -pthread
-march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2
-fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing
-DLDAP_DEPRECATED -DFCGID_APXS_BUILD -DLINUX=2 -D_REENTRANT
-D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DSSL_EXPERIMENTAL_ENGINE
-DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096
-I/temp/devel/mod_fcgid/modules/fcgid
-I/temp/devel/mod_fcgid/modules/fcgid -I/temp/devel/mod_fcgid/include
-I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c
fcgid_proc_unix.c && touch fcgid_proc_unix.slo
In file included from fcgid_proc_unix.c:33:
/usr/include/apache2/mpm_common.h:46:17: error: mpm.h: Datei oder
Verzeichnis nicht gefunden
make: *** [fcgid_proc_unix.slo] Fehler 1
# apxs2-prefork -c fcgid_proc_unix.c
/usr/lib/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic
-march=i586 -mtune=i686 -fmessage-length=0 -Wall-D_FORTIFY_SOURCE=2
-fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing
-DLDAP_DEPRECATED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
-D_LARGEFILE64_SOURCE -pthread -I/usr/include/apache2-prefork
-I/usr/include/apr-1 -I/usr/include/apr-1 -c -o fcgid_proc_unix.lo
fcgid_proc_unix.c && touch fcgid_proc_unix.slo
fcgid_proc_unix.c: In function ‘proc_read_ipc’:
fcgid_proc_unix.c:592: warning: passing argument 2 of ‘read’ discards
qualifiers from pointer target type
fcgid_proc_unix.c:625: warning: passing argument 2 of ‘read’ discards
qualifiers from pointer target type
/usr/lib/apr-1/build/libtool --silent --mode=link gcc -o
fcgid_proc_unix.la -rpath /usr/lib/apache2-prefork -module
-avoid-version fcgid_proc_unix.lo
svwe20:/temp/devel/mod_fcgid/modules/fcgid #

This is on my SuSE 10.3-32bit box; so everything is in place, and a
manual compile with 'apxs2-prefork -c fcgid_proc_unix.c' works ...
once fcgid_proc_unix.c is build I can continue with make for the rest ...

Gün.


trawick at gmail

Sep 25, 2009, 12:54 PM

Post #9 of 16 (794 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

On Fri, Sep 25, 2009 at 3:46 PM, Marcus Merz <mmerz [at] gmx> wrote:

>
>
> "Jeff Trawick" <trawick [at] gmail> schrieb im Newsbeitrag
> news:cc67648e0909251236s31f11ac0q7c072320609fb3b7 [at] mail
> On Fri, Sep 25, 2009 at 3:24 PM, Marcus Merz <mmerz [at] gmx> wrote:
>
>>
>>
>> Please note that we're not treating your comments as complaining or
>> worrying whose fault it is, beyond trying to find the best venue to address
>> the issue.
>>
>> Just one more thing, as I'm still a tiny bit hopeful about the
>> "APXS=/usr/sbin/apxs2-prefork" trick:
>>
>> Can you try "make distclean" then do the "APXS=... ./configure.apxs"
>> followed by make, instead of just "make clean"?
>>
> Sure.
>
> :/usr/local/src/mod_fcgid-2.3.1 # make distclean
> Making distclean in modules/fcgid
> make[1]: Entering directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
> make[2]: Entering directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
> rm -f *.o *.lo *.slo *.obj *.a *.la *.loT
> rm -rf .libs
> rm -f .deps Makefile modules.mk
> make[2]: Leaving directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
> make[1]: Leaving directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
> make[1]: Entering directory `/usr/local/src/mod_fcgid-2.3.1'
> rm -f *.o *.lo *.slo *.obj *.a *.la
> rm -rf .libs
> rm -f .deps Makefile config.apxs.log modules/fcgid/fcgid_config.h
> make[1]: Leaving directory `/usr/local/src/mod_fcgid-2.3.1'
>
> :/usr/local/src/mod_fcgid-2.3.1 # APXS=/usr/sbin/apxs2-prefork
> ./configure.apxs
> Configuring mod_fcgid for APXS in /usr/sbin/apxs2-prefork
> Detecting features
>

...

>
> /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread
> -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2 -g -fPIC
> -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD -DLINUX=2
> -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE
> -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096
> -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
> -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
> -I/usr/local/src/mod_fcgid-2.3.1/include -I/usr/include/apache2 -I.
> -I/usr/include/apr-1 -prefer-pic -c fcgid_proc_unix.c && touch
> fcgid_proc_unix.slo
> In file included from fcgid_proc_unix.c:33:
> /usr/include/apache2/mpm_common.h:46:17: error: mpm.h: No such file or
> directory
> make[1]: *** [fcgid_proc_unix.slo] Error 1
> make[1]: Leaving directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
> make: *** [all-recursive] Error 1
>
>
Ouch. I thought that "make clean" wouldn't get rid of enough files to
completely forget about the original apxs.


trawick at gmail

Sep 25, 2009, 12:57 PM

Post #10 of 16 (805 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

On Fri, Sep 25, 2009 at 3:52 PM, Guenter Knauf <fuankg [at] apache> wrote:

> Bill,
> William A. Rowe, Jr. schrieb:
> > Marcus Merz wrote:
> >> Umm, I am no expert so please bear with me... ;-)
> >>
> >> I did create mod_foo.c in :/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
> >> with vim and only one line
> >> ---
> >> #include "mpm_common.h"
> >> ---
> >>
> >> and afterwards
> >>
> >> :/usr/local/src/mod_fcgid-2.3.1/modules/fcgid # apxs2 -c mod_foo.c
> >
> > Then try with
> > # apxs2-prefork -c mod_foo.c
> # make
> /usr/lib/apr-1/build/libtool --silent --mode=compile gcc -pthread
> -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2
> -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing
> -DLDAP_DEPRECATED -DFCGID_APXS_BUILD -DLINUX=2 -D_REENTRANT
> -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DSSL_EXPERIMENTAL_ENGINE
> -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096
> -I/temp/devel/mod_fcgid/modules/fcgid
> -I/temp/devel/mod_fcgid/modules/fcgid -I/temp/devel/mod_fcgid/include
> -I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c
> fcgid_proc_unix.c && touch fcgid_proc_unix.slo
> In file included from fcgid_proc_unix.c:33:
> /usr/include/apache2/mpm_common.h:46:17: error: mpm.h: Datei oder
> Verzeichnis nicht gefunden
> make: *** [fcgid_proc_unix.slo] Fehler 1
> # apxs2-prefork -c fcgid_proc_unix.c
> /usr/lib/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic
> -march=i586 -mtune=i686 -fmessage-length=0 -Wall-D_FORTIFY_SOURCE=2
> -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing
> -DLDAP_DEPRECATED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
> -D_LARGEFILE64_SOURCE -pthread -I/usr/include/apache2-prefork
> -I/usr/include/apr-1 -I/usr/include/apr-1 -c -o fcgid_proc_unix.lo
> fcgid_proc_unix.c && touch fcgid_proc_unix.slo
> fcgid_proc_unix.c: In function ‘proc_read_ipc’:
> fcgid_proc_unix.c:592: warning: passing argument 2 of ‘read’ discards
> qualifiers from pointer target type
> fcgid_proc_unix.c:625: warning: passing argument 2 of ‘read’ discards
> qualifiers from pointer target type
> /usr/lib/apr-1/build/libtool --silent --mode=link gcc -o
> fcgid_proc_unix.la -rpath /usr/lib/apache2-prefork -module
> -avoid-version fcgid_proc_unix.lo
> svwe20:/temp/devel/mod_fcgid/modules/fcgid #
>
> This is on my SuSE 10.3-32bit box; so everything is in place, and a
> manual compile with 'apxs2-prefork -c fcgid_proc_unix.c' works ...
> once fcgid_proc_unix.c is build I can continue with make for the rest ...
>
> I think this may be related to config_vars.mk. The mod_fcgid build uses
apxs to query where config_vars is located. Maybe both apxs scripts point
to the same config_vars.mk, and it (or something it includes) doesn't
include the path to the MPM-specific include files?


mmerz at gmx

Sep 25, 2009, 2:20 PM

Post #11 of 16 (793 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

"William A. Rowe, Jr." <wrowe [at] rowe-clan> schrieb im Newsbeitrag
news:4ABD158F.1000904 [at] rowe-clan
> Marcus Merz wrote:
>
> Then try with
> # apxs2-prefork -c mod_foo.c
>
> and report the results in a SUSE incident. We can't help you here with
> troubles
> in a specific distribution :( Sorry.
>
> Bill
>

:/usr/local/src/mod_fcgid-2.3.1/modules/fcgid # apxs2-prefork -c mod_foo.c
/usr/lib64/apr-1/build/libtool --silent --mode=compile
gcc -prefer-pic -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DLINUX=2 -D_REENTRANT
-D_GNU_SOURCE -pthread -I/usr/include/apache2-prefork -I/usr/include/apr-1
-I/usr/include/apr-1 -c -o mod_foo.lo mod_foo.c && touch mod_foo.slo
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o
od_foo.la -rpath /usr/lib64/apache2-prefork -module -avoid-version
mod_foo.lo

So that does work. Nevertheless, when using

:/usr/local/src/mod_fcgid-2.3.1 # APXS=/usr/sbin/apxs2-prefork
./configure.apxs the following 'make' fails as in my answer to PGNet Dev.

btw.: I am not 'complaining'. I am not an expert and therefore i do not know
whether this was my fault, mod-fcgid's Makefile fault, a flaw in OpenSuSE or
<you-name-it> and quite frankly i do not care who's/which fault.

I just wanted to make "you" (developers) aware of it, in case it was a flaw
in mod_fcgid's Makefile. I know how to find a workaround as stated in my
original post.

Rgds,
Marcus


mmerz at gmx

Sep 25, 2009, 2:20 PM

Post #12 of 16 (799 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

"Jeff Trawick" <trawick [at] gmail> schrieb im Newsbeitrag news:cc67648e0909251236s31f11ac0q7c072320609fb3b7 [at] mail
On Fri, Sep 25, 2009 at 3:24 PM, Marcus Merz <mmerz [at] gmx> wrote:



Please note that we're not treating your comments as complaining or worrying whose fault it is, beyond trying to find the best venue to address the issue.

Just one more thing, as I'm still a tiny bit hopeful about the "APXS=/usr/sbin/apxs2-prefork" trick:

Can you try "make distclean" then do the "APXS=... ./configure.apxs" followed by make, instead of just "make clean"?

Sure.

:/usr/local/src/mod_fcgid-2.3.1 # make distclean
Making distclean in modules/fcgid
make[1]: Entering directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
make[2]: Entering directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
rm -f *.o *.lo *.slo *.obj *.a *.la *.loT
rm -rf .libs
rm -f .deps Makefile modules.mk
make[2]: Leaving directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
make[1]: Leaving directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
make[1]: Entering directory `/usr/local/src/mod_fcgid-2.3.1'
rm -f *.o *.lo *.slo *.obj *.a *.la
rm -rf .libs
rm -f .deps Makefile config.apxs.log modules/fcgid/fcgid_config.h
make[1]: Leaving directory `/usr/local/src/mod_fcgid-2.3.1'

:/usr/local/src/mod_fcgid-2.3.1 # APXS=/usr/sbin/apxs2-prefork ./configure.apxs
Configuring mod_fcgid for APXS in /usr/sbin/apxs2-prefork
Detecting features

Finished, run 'make' to compile mod_fcgid

Run 'make install' to install mod_fcgid

:/usr/local/src/mod_fcgid-2.3.1 # make
Making all in modules/fcgid
make[1]: Entering directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include -I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c mod_fcgid.c && touch mod_fcgid.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include -I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c fcgid_bridge.c && touch fcgid_bridge.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include -I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c fcgid_conf.c && touch fcgid_conf.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include -I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c fcgid_pm_main.c && touch fcgid_pm_main.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include -I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c fcgid_protocol.c && touch fcgid_protocol.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include -I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c fcgid_spawn_ctl.c && touch fcgid_spawn_ctl.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include -I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c fcgid_proctbl_unix.c && touch fcgid_proctbl_unix.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include -I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c fcgid_pm_unix.c && touch fcgid_pm_unix.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -DFCGID_APXS_BUILD -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096 -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/modules/fcgid -I/usr/local/src/mod_fcgid-2.3.1/include -I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c fcgid_proc_unix.c && touch fcgid_proc_unix.slo
In file included from fcgid_proc_unix.c:33:
/usr/include/apache2/mpm_common.h:46:17: error: mpm.h: No such file or directory
make[1]: *** [fcgid_proc_unix.slo] Error 1
make[1]: Leaving directory `/usr/local/src/mod_fcgid-2.3.1/modules/fcgid'
make: *** [all-recursive] Error 1

and

:/usr/local/src/mod_fcgid-2.3.1 # find / -type f -name 'mpm.h'
/usr/include/apache2-event/mpm.h
/usr/include/apache2-itk/mpm.h
/usr/include/apache2-prefork/mpm.h
/usr/include/apache2-worker/mpm.h


Line 28-51 (#include "mpm.h" obv. is line 46) from /usr/include/apache2/mpm_common.h:
---
/**
* @file mpm_common.h
* @brief Multi-Processing Modules functions
*
* @defgroup APACHE_MPM Multi-Processing Modules
* @ingroup APACHE
* @{
*/

#ifndef APACHE_MPM_COMMON_H
#define APACHE_MPM_COMMON_H

#include "ap_config.h"

#if APR_HAVE_NETINET_TCP_H
#include <netinet/tcp.h> /* for TCP_NODELAY */
#endif

#include "mpm.h"

#ifdef __cplusplus
extern "C" {
#endif

---

HTH


rpluem at apache

Sep 25, 2009, 2:50 PM

Post #13 of 16 (791 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

On 09/25/2009 09:57 PM, Jeff Trawick wrote:
> On Fri, Sep 25, 2009 at 3:52 PM, Guenter Knauf <fuankg [at] apache> wrote:
>
>> Bill,
>> William A. Rowe, Jr. schrieb:
>>> Marcus Merz wrote:
>>>> Umm, I am no expert so please bear with me... ;-)
>>>>
>>>> I did create mod_foo.c in :/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
>>>> with vim and only one line
>>>> ---
>>>> #include "mpm_common.h"
>>>> ---
>>>>
>>>> and afterwards
>>>>
>>>> :/usr/local/src/mod_fcgid-2.3.1/modules/fcgid # apxs2 -c mod_foo.c
>>> Then try with
>>> # apxs2-prefork -c mod_foo.c
>> # make
>> /usr/lib/apr-1/build/libtool --silent --mode=compile gcc -pthread
>> -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2
>> -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing
>> -DLDAP_DEPRECATED -DFCGID_APXS_BUILD -DLINUX=2 -D_REENTRANT
>> -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DSSL_EXPERIMENTAL_ENGINE
>> -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096
>> -I/temp/devel/mod_fcgid/modules/fcgid
>> -I/temp/devel/mod_fcgid/modules/fcgid -I/temp/devel/mod_fcgid/include
>> -I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c

The above include option is wrong: -I/usr/include/apache2

>> fcgid_proc_unix.c && touch fcgid_proc_unix.slo
>> In file included from fcgid_proc_unix.c:33:
>> /usr/include/apache2/mpm_common.h:46:17: error: mpm.h: Datei oder
>> Verzeichnis nicht gefunden
>> make: *** [fcgid_proc_unix.slo] Fehler 1
>> # apxs2-prefork -c fcgid_proc_unix.c
>> /usr/lib/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic
>> -march=i586 -mtune=i686 -fmessage-length=0 -Wall-D_FORTIFY_SOURCE=2
>> -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing
>> -DLDAP_DEPRECATED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
>> -D_LARGEFILE64_SOURCE -pthread -I/usr/include/apache2-prefork

Here it sets the correct one: -I/usr/include/apache2-prefork

No idea why. Just an observation.

Regards

Rüdiger


wrowe at rowe-clan

Sep 25, 2009, 5:04 PM

Post #14 of 16 (784 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

Ruediger Pluem wrote:
>
> On 09/25/2009 09:57 PM, Jeff Trawick wrote:
>> On Fri, Sep 25, 2009 at 3:52 PM, Guenter Knauf <fuankg [at] apache> wrote:
>>
>>> Bill,
>>> William A. Rowe, Jr. schrieb:
>>>> Marcus Merz wrote:
>>>>> Umm, I am no expert so please bear with me... ;-)
>>>>>
>>>>> I did create mod_foo.c in :/usr/local/src/mod_fcgid-2.3.1/modules/fcgid
>>>>> with vim and only one line
>>>>> ---
>>>>> #include "mpm_common.h"
>>>>> ---
>>>>>
>>>>> and afterwards
>>>>>
>>>>> :/usr/local/src/mod_fcgid-2.3.1/modules/fcgid # apxs2 -c mod_foo.c
>>>> Then try with
>>>> # apxs2-prefork -c mod_foo.c
>>> # make
>>> /usr/lib/apr-1/build/libtool --silent --mode=compile gcc -pthread
>>> -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2
>>> -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing
>>> -DLDAP_DEPRECATED -DFCGID_APXS_BUILD -DLINUX=2 -D_REENTRANT
>>> -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DSSL_EXPERIMENTAL_ENGINE
>>> -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096
>>> -I/temp/devel/mod_fcgid/modules/fcgid
>>> -I/temp/devel/mod_fcgid/modules/fcgid -I/temp/devel/mod_fcgid/include
>>> -I/usr/include/apache2 -I. -I/usr/include/apr-1 -prefer-pic -c
>
> The above include option is wrong: -I/usr/include/apache2
>
>>> fcgid_proc_unix.c && touch fcgid_proc_unix.slo
>>> In file included from fcgid_proc_unix.c:33:
>>> /usr/include/apache2/mpm_common.h:46:17: error: mpm.h: Datei oder
>>> Verzeichnis nicht gefunden
>>> make: *** [fcgid_proc_unix.slo] Fehler 1
>>> # apxs2-prefork -c fcgid_proc_unix.c
>>> /usr/lib/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic
>>> -march=i586 -mtune=i686 -fmessage-length=0 -Wall-D_FORTIFY_SOURCE=2
>>> -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing
>>> -DLDAP_DEPRECATED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
>>> -D_LARGEFILE64_SOURCE -pthread -I/usr/include/apache2-prefork
>
> Here it sets the correct one: -I/usr/include/apache2-prefork
>
> No idea why. Just an observation.

A diff between httpd stock apxs.in and apxs-prefork shipped by suse might explain a lot.

Guessing they have hacked apxs rather than hacking config_vars.mk (a mistake on their
part).


mmerz at gmx

Sep 26, 2009, 12:20 AM

Post #15 of 16 (776 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

I have attached the unified diff for readability.

"Marcus Merz" <mmerz [at] gmx> schrieb im Newsbeitrag
news:h9kckd$atv$1 [at] ger
> Bill,
>
> :/usr/local/src # diff -u apxs.in apxs2-prefork
...

Regards,
Marcus


begin 666 apxs.in.apxs2-prefork.diff
M+2TM(&%P>',N:6X),C P-RTP-2TR,R Q-3HS,SHP-"XP,# P,# P,# @*S R
M,# **RLK(&%P>',R+7!R969O<FL),C P.2TP.2TR-B P.#HR-3HP,BXP,# P
M,# P,# @*S R,# *0$ @+3$L-" K,2PT($! "BTC(4!P97)L8FEN0" M=PHK
M(R$O=7-R+V)I;B]P97)L("UW"B C"B C($QI8V5N<V5D('1O('1H92!!<&%C
M:&4 [at] 4]F='=A<F4 [at] 1]U;F1A=&EO;B H05-&*2!U;F1E<B!O;F4@;W(@;6]R
M90H@(R!C;VYT<FEB=71O<B!L:6-E;G-E(&%G<F5E;65N=',N("!3964@=&AE
M($Y/5$E#12!F:6QE(&1I<W1R:6)U=&5D('=I=&@*0$ @+3(U+#@@*S(U+#D@
M0$ *( H@;7D@)6-O;F9I9U]V87)S(#T@*"D["B *+6UY("1I;G-T86QL8G5I
M;&1D:7(@/2 B0&5X<%]I;G-T86QL8G5I;&1D:7) (CL*+6=E=%]C;VYF:6=?
M=F%R<R@B)&EN<W1A;&QB=6EL9&1I<B]C;VYF:6=?=F%R<RYM:R(L7"5C;VYF
M:6=?=F%R<RD["BMM>2 D;7!M7W-U9F9I>" ]("(M<')E9F]R:R(["BMM>2 D
M:6YS=&%L;&)U:6QD9&ER(#T@(B]U<W(O<VAA<F4O87!A8VAE,B]B=6EL9"([
M"BMG971?8V]N9FEG7W9A<G,H(B1I;G-T86QL8G5I;&1D:7(O8V]N9FEG7W9A
M<G,N;6LD;7!M7W-U9F9I>"(L7"5C;VYF:6=?=F%R<RD["B *(",@<F5A9"!T
M:&4 [at] 8]N9FEG=7)A=&EO;B!V87)I86)L97,@;VYC90H@"D! ("TU,C<L,3 U
M("LU,C@L,30@0$ *( H@(" @(",@("!A8W1I=F%T92!M;V1U;&4@=FEA($QO
M861-;V1U;&4O061D36]D=6QE(&1I<F5C=&EV90H@(" @(&EF("@D;W!T7V$@
M;W(@)&]P=%]!*2!["BT@(" @(" @(&EF("AN;W0@+68@(B1#1D=?4UE30T].
M1D1)4B\D0T9'7U1!4D=%5"YC;VYF(BD@>PHM(" @(" @(" @(" @97)R;W(H
M(D-O;F9I9R!F:6QE("1#1D=?4UE30T].1D1)4B\D0T9'7U1!4D=%5"YC;VYF
M(&YO="!F;W5N9"(I.PHM(" @(" @(" @(" @97AI="@Q*3L*+2 @(" @(" @
M?0HM"BT@(" @(" @(&]P96XH1E L("(\)$-&1U]365-#3TY&1$E2+R1#1D=?
M5$%21T54+F-O;F8B*2!\?"!D:64["BT@(" @(" @(&UY("1C;VYT96YT(#T@
M:F]I;B@G)RP@/$90/BD["BT@(" @(" @(&-L;W-E*$90*3L*+0HM(" @(" @
M("!I9B H)&-O;G1E;G0@(7X@;7Q<;B,_7',J3&]A9$UO9'5L95QS*WPI('L*
M+2 @(" @(" @(" @(&5R<F]R*")!8W1I=F%T:6]N(&9A:6QE9"!F;W(@8W5S
M=&]M("1#1D=?4UE30T].1D1)4B\D0T9'7U1!4D=%5"YC;VYF(&9I;&4N(BD[
M"BT@(" @(" @(" @("!E<G)O<B [at] B07@;&5A<W0@;VYE(&!,;V%D36]D=6QE
M)R!D:7)E8W1I=F4 [at] 86QR9%D>2!H87,@=&\@97AI<W0N(BD["BT@(" @(" @
M(" @("!E>&ET*#$I.PHM(" @(" @("!]"B *(" @(" @(" @;7D@)&QM9#L*
M(" @(" @(" @;7D@)&,@/2 G)SL*(" @(" @(" @)&,@/2 G(R<@:68@*"1O
M<'1?02D[."B @(" @(" @(&9O<F5A8V@@)&QM9" H0&QM9"D@>PHM(" @(" @
M(" @(" @;7D@)'=H870@/2 D;W!T7T$@/R B<')E<&%R:6YG(B Z(")A8W1I
M=F%T:6YG(CL*+2 @(" @(" @(" @(&EF("@D8V]N=&5N=" A?B!M?%QN(S]<
M<RHD;&UD?"D@>PHM(" @(" @(" @(" @(" @(",@8VAE8VL [at] 9]R(&]P96X@
M/&-O;G1A:6YE<G,^+"!S;R!T:&%T('1H92!N97<@3&]A9$UO9'5L90HM(" @
M(" @(" @(" @(" @(",@9&ER96-T:79E(&%L=V%Y<R!A<'!E87)S("IO=71S
M:61E*B!O9B!A;B \8V]N=&%I;F5R/BX*+0HM(" @(" @(" @(" @(" @(&UY
M("1B969O<F4@/2 H)&-O;G1E;G0@/7X@;7Q>*"XJ7&XI(S]<<RI,;V%D36]D
M=6QE7',K6UY<;ETK7&Y\<RE;,%T["BT*+2 @(" @(" @(" @(" @(" C('1H
M92 G*"D])R!T<FEC:R!F;W)C97,@;&ES="!C;VYT97AT(&%N9"!T:&4@<V-A
M;&%R"BT@(" @(" @(" @(" @(" @(R!A<W-I9VYM96YT(&-O=6YT<R!T:&4@
M;G5M8F5R(&]F(&QI<W0@;65M8F5R<R H86MA(&YU;6)E<@HM(" @(" @(" @
M(" @(" @(",@;V8@;6%T8VAE<RD@=&AE;@HM(" @(" @(" @(" @(" @(&UY
M("1C;G1O<&5N(#T@*"D@/2 H)&)E9F]R92 ]?B!M?%Y<<RH\6UXO72XJ)'QM
M9RD["BT@(" @(" @(" @(" @(" @;7D@)&-N=&-L;W-E(#T@*"D@/2 H)&)E
M9F]R92 ]?B!M?%Y<<RH\+RXJ)'QM9RD["BT*+2 @(" @(" @(" @(" @("!I
M9B H)&-N=&]P96X@/3T@)&-N=&-L;W-E*2!["BT@(" @(" @(" @(" @(" @
M(" @(",@9FEN92X@3&%S="!,;V%D36]D=6QE(&ES(&-O;G1E>'1L97-S+@HM
M(" @(" @(" @(" @(" @(" @(" D8V]N=&5N=" ]?B!S?%XH+BI<;B,_7',J
M3&]A9$UO9'5L95QS*UM>7&Y=*UQN*7PD,21C)&QM9%QN?',[."BT@(" @(" @
M(" @(" @(" @?0HM(" @(" @(" @(" @(" @(&5L<VEF("@D8VYT;W!E;B \
M("1C;G1C;&]S92D@>PHM(" @(" @(" @(" @(" @(" @("!E<G)O<B [at] G0]N
M9FEG=7)A=&EO;B!F:6QE(&ES(&YO="!V86QI9"X@5&AE<F4 [at] 8)E('-E8W1I
M;VYS)PHM(" @(" @(" @(" @(" @(" @(" @(" @(" N("<@8VQO<V5D(&)E
M9F]R92!O<&5N960N)RD[."BT@(" @(" @(" @(" @(" @(" @(&5X:70H,2D[.
M"BT@(" @(" @(" @(" @(" @?0HM(" @(" @(" @(" @(" @(&5L<V4@>PHM
M(" @(" @(" @(" @(" @(" @(" C('!U="!O=7(@8VUD(&%F=&5R('1H92!S
M96-T:6]N(&-O;G1A:6YI;F<@=&AE(&QA<W0*+2 @(" @(" @(" @(" @(" @
M(" @(R!,;V%D36]D=6QE+@HM(" @(" @(" @(" @(" @(" @("!M>2 D9F]U
M;F0@/0HM(" @(" @(" @(" @(" @(" @(" D8V]N=&5N=" ]?B!S(5Q!("@@
M(" @(" @(" @(" @(" C('-T<FEN9R!A;F0 [at] 8%P='5R92!S=&%R= HM(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @("@_.B [at] _@HM(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @7EQS*B @(" @(" @(" @
M(" C('-T87)T(&]F(&-O;F8@;&EN92!W:71H(&$*+2 @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @("@_.EM>/%U\/%M>+UTI(" @(R!D:7)E
M8W1I=F4@=VAI8V@@9&]E<R!N;W0*+2 @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(R!S=&%R="!W:71H("<\
M+R<*+0HM(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @+BHH
M/SHD*5QN(" @(" @(" C(')E<W0@;V8@=&AE(&QI;F4N"BT@(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(",@
M=&AE("<D)R!I<R!I;B!P87)E;G1H97-E<PHM(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" C('1O(&%V;VED
M(&UI<VEN=&5R<')E=&EN9PHM(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" C('1H92!S=')I;F<@(B1<(B!A
M<PHM(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" C('!E<FP@=F%R:6%B;&4N"BT*+2 @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @("DJ(" @(" @(" @(" @(" @(R!C871C
M:"!A<R!M=6-H(&%S('!O<W-I8FQE"BT@(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(",@;V8@<W5C:"!L:6YE
M<RX@*&EN8VQU9&EN9PHM(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" C('IE<F\I"BT*+2 @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(%Y<<RH\+RXJ*#\Z)"E<;C\@(R!A
M9G1E<B!T:&4 [at] 8)O=F4L('=E"BT@(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(",@97AP96-T(&$@8V]N9FEG
M(&QI;F4@=VET: HM(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" C(&$@8VQO<VEN9R!C;VYT86EN97(@*#PO
M*0HM"BT@(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @*2![)&-N
M=&]P96Y](" @(" @(",@=&AE('=H;VQE('!A='1E<FX@*&)U;F-H"BT@(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(",@;V8@;&EN97,@=&AA="!E;F0@=7 @=VET: HM(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" C(&$@
M8VQO<VEN9R!D:7)E8W1I=F4I(&UU<W0*+2 @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(R!B92!R97!E871E
M9" D8VYT;W!E;@HM(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" C('1I;65S+B!4:&%T)W,@:70N"BT@(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(",@4VEM<&QE+"!E:#\@.RTI"BT*+2 @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" I(" @(" @(" @(" @(" @(" @(R!C87!T=7)E(&5N
M9 HM(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(20Q)&,D;&UD
M7&XA;7@["BT*+2 @(" @(" @(" @(" @(" @(" @=6YL97-S("@D9F]U;F0I
M('L*+2 @(" @(" @(" @(" @(" @(" @(" @(&5R<F]R*"=#;VYF:6=U<F%T
M:6]N(&9I;&4@:7,@;F]T('9A;&ED+B!4:&5R92!A<F4@)PHM(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @+B G<V5C=&EO;G,@;W!E;F5D(&%N9"!N
M;W0 [at] 8VQ<V5D+B<I.PHM(" @(" @(" @(" @(" @(" @(" @(" @97AI="@Q
M*3L*+2 @(" @(" @(" @(" @(" @(" @?0HM(" @(" @(" @(" @(" @('T*
M+2 @(" @(" @(" @('T [at] 96QS9!["BT@(" @(" @(" @(" @(" @(R!R97!L
M86-E(&%L<F5A9'D [at] 97A<W1I;F<@3&]A9$UO9'5L92!L:6YE"BT@(" @(" @
M(" @(" @(" @)&-O;G1E;G0@/7X@<WQ>*"XJ7&XI(S]<<RHD;&UD6UY<;ETJ
M7&Y\)#$D8R1L;61<;GQS.PHM(" @(" @(" @(" @?0HM(" @(" @(" @(" @
M)&QM9" ]?B!M?$QO861-;V1U;&5<<RLH+BL_*5]M;V1U;&4N*GP["BT@(" @
M(" @(" @("!N;W1I8V4H(ELD=VAA="!M;V1U;&4@8"0Q)R!I;B D0T9'7U-9
M4T-/3D9$25(O)$-&1U]405)'150N8V]N9ETB*3L**R )(" @('!R:6YT(")A
M8W1I=F%T:6YG("(@+B D;F%M92 N(")<;B([."BL@"2 @("!S>7-T96TH(F$R
M96YM;V0@(B N("1N86UE*3L*(" @(" @(" @?0HM(" @(" @("!I9B H0&QM
M9"D@>PHM(" @(" @(" @(" @:68@*&]P96XH1E L("(^)$-&1U]365-#3TY&
M1$E2+R1#1D=?5$%21T54+F-O;F8N;F5W(BDI('L*+2 @(" @(" @(" @(" @
M("!P<FEN="!&4" D8V]N=&5N=#L*+2 @(" @(" @(" @(" @("!C;&]S92A&
M4"D["BT@(" @(" @(" @(" @(" @<WES=&5M*")C<" D0T9'7U-94T-/3D9$
M25(O)$-&1U]405)'150N8V]N9B D0T9'7U-94T-/3D9$25(O)$-&1U]405)'
M150N8V]N9BYB86L@)B8@(B N"BT@(" @(" @(" @(" @(" @(" @(" @(")C
M<" D0T9'7U-94T-/3D9$25(O)$-&1U]405)'150N8V]N9BYN97<@)$-&1U]3
M65-#3TY&1$E2+R1#1D=?5$%21T54+F-O;F8@)B8@(B N"BT@(" @(" @(" @
M(" @(" @(" @(" @(")R;2 D0T9'7U-94T-/3D9$25(O)$-&1U]405)'150N
M8V]N9BYN97<B*3L*+2 @(" @(" @(" @('T [at] 96QS9!["BT@(" @(" @(" @
M(" @(" @;F]T:6-E*")U;F%B;&4@=&\@;W!E;B!C;VYF:6=U<F%T:6]N(&9I
E;&4B*3L*+2 @(" @(" @(" @('T*+0E]"B @(" @?0H@?0H@"@``
`
end


mmerz at gmx

Sep 26, 2009, 12:20 AM

Post #16 of 16 (788 views)
Permalink
Re: [mod_fcgid] Problems installing 2.3.1 on SuSE 10.3 64bit due to missing mpm.h and mpm_default.h [In reply to]

Bill,

"William A. Rowe, Jr." <wrowe [at] rowe-clan> schrieb im Newsbeitrag
news:4ABD5A7A.90601 [at] rowe-clan
> Ruediger Pluem wrote:
>>
...

>>>> # apxs2-prefork -c fcgid_proc_unix.c
>>>> /usr/lib/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic
>>>> -march=i586 -mtune=i686 -fmessage-length=0 -Wall-D_FORTIFY_SOURCE=2
>>>> -fstack-protector -O2 -g -fPIC -Wall -fno-strict-aliasing
>>>> -DLDAP_DEPRECATED -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
>>>> -D_LARGEFILE64_SOURCE -pthread -I/usr/include/apache2-prefork
>>
>> Here it sets the correct one: -I/usr/include/apache2-prefork
>>
>> No idea why. Just an observation.
>
> A diff between httpd stock apxs.in and apxs-prefork shipped by suse might
> explain a lot.
>
> Guessing they have hacked apxs rather than hacking config_vars.mk (a
> mistake on their
> part).
>
>

I just did a ':/usr/local/src # wget
http://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x/support/apxs.in '
and compared it against my /usr/sbin/apxs2-prefork (which i copied to
/usr/local/src):

:/usr/local/src # diff -u apxs.in apxs2-prefork
--- apxs.in 2007-05-23 15:33:04.000000000 +0200
+++ apxs2-prefork 2009-09-26 08:25:02.000000000 +0200
@@ -1,4 +1,4 @@
-#!@perlbin@ -w
+#!/usr/bin/perl -w
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -25,8 +25,9 @@

my %config_vars = ();

-my $installbuilddir = "@exp_installbuilddir@";
-get_config_vars("$installbuilddir/config_vars.mk",\%config_vars);
+my $mpm_suffix = "-prefork";
+my $installbuilddir = "/usr/share/apache2/build";
+get_config_vars("$installbuilddir/config_vars.mk$mpm_suffix",\%config_vars);

# read the configuration variables once

@@ -527,105 +528,14 @@

# activate module via LoadModule/AddModule directive
if ($opt_a or $opt_A) {
- if (not -f "$CFG_SYSCONFDIR/$CFG_TARGET.conf") {
- error("Config file $CFG_SYSCONFDIR/$CFG_TARGET.conf not
found");
- exit(1);
- }
-
- open(FP, "<$CFG_SYSCONFDIR/$CFG_TARGET.conf") || die;
- my $content = join('', <FP>);
- close(FP);
-
- if ($content !~ m|\n#?\s*LoadModule\s+|) {
- error("Activation failed for custom
$CFG_SYSCONFDIR/$CFG_TARGET.conf file.");
- error("At least one `LoadModule' directive already has to
exist.");
- exit(1);
- }

my $lmd;
my $c = '';
$c = '#' if ($opt_A);
foreach $lmd (@lmd) {
- my $what = $opt_A ? "preparing" : "activating";
- if ($content !~ m|\n#?\s*$lmd|) {
- # check for open <containers>, so that the new LoadModule
- # directive always appears *outside* of an <container>.
-
- my $before = ($content =~
m|^(.*\n)#?\s*LoadModule\s+[^\n]+\n|s)[0];
-
- # the '()=' trick forces list context and the scalar
- # assignment counts the number of list members (aka number
- # of matches) then
- my $cntopen = () = ($before =~ m|^\s*<[^/].*$|mg);
- my $cntclose = () = ($before =~ m|^\s*</.*$|mg);
-
- if ($cntopen == $cntclose) {
- # fine. Last LoadModule is contextless.
- $content =~
s|^(.*\n#?\s*LoadModule\s+[^\n]+\n)|$1$c$lmd\n|s;
- }
- elsif ($cntopen < $cntclose) {
- error('Configuration file is not valid. There are
sections'
- . ' closed before opened.');
- exit(1);
- }
- else {
- # put our cmd after the section containing the last
- # LoadModule.
- my $found =
- $content =~ s!\A ( # string and capture
start
- (?:(?:
- ^\s* # start of conf line
with a
- (?:[^<]|<[^/]) # directive which does
not
- # start with '</'
-
- .*(?:$)\n # rest of the line.
- # the '$' is in
parentheses
- # to avoid
misinterpreting
- # the string "$\" as
- # perl variable.
-
- )* # catch as much as
possible
- # of such lines.
(including
- # zero)
-
- ^\s*</.*(?:$)\n? # after the above, we
- # expect a config line
with
- # a closing container
(</)
-
- ) {$cntopen} # the whole pattern
(bunch
- # of lines that end up
with
- # a closing directive)
must
- # be repeated $cntopen
- # times. That's it.
- # Simple, eh? ;-)
-
- ) # capture end
- !$1$c$lmd\n!mx;
-
- unless ($found) {
- error('Configuration file is not valid. There are '
- . 'sections opened and not closed.');
- exit(1);
- }
- }
- } else {
- # replace already existing LoadModule line
- $content =~ s|^(.*\n)#?\s*$lmd[^\n]*\n|$1$c$lmd\n|s;
- }
- $lmd =~ m|LoadModule\s+(.+?)_module.*|;
- notice("[$what module `$1' in
$CFG_SYSCONFDIR/$CFG_TARGET.conf]");
+ print "activating " . $name . "\n";
+ system("a2enmod " . $name);
}
- if (@lmd) {
- if (open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) {
- print FP $content;
- close(FP);
- system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf
$CFG_SYSCONFDIR/$CFG_TARGET.conf.bak && " .
- "cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new
$CFG_SYSCONFDIR/$CFG_TARGET.conf && " .
- "rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new");
- } else {
- notice("unable to open configuration file");
- }
- }
}
}

Apache dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.