Re: Compling mod_perl as a static module....

2003-06-10 Thread Forrest Aldrich
The configure process goes through and shows that it's selected a DSO 
compilation, and that's not what I want so I just stopped it.

The configure process complains about PERL_SSI and says it cannot include 
that with a DSO, etc.  But again, I'm not trying to compile a DSO.

I wonder if some other flag might set the make process to assume DSO builds?



Forrest

At 07:51 PM 6/9/2003, Ged Haywood wrote:
Hello again,

On Mon, 9 Jun 2003, Forrest Aldrich wrote:

 Referring back to my original post, it with the options I specified, the
 compile process still insists on compiling mod_perl as a DSO.   Even if I
 explicitly set USE_DSO=0 -- I wonder if one of the other flags (like
 EVERYTHING=1) is triggering the DSO compile.
No, I often compile statically with EVERYTHING=1.  I don't think we're
dealing with a full deck here.  Are you quite sure that you're looking
at the right executable after you build it?  Check the timestamp.  Try
running it by giving the full pathname and the -l switch for example
/home/forrest/src/apache_1.3.27/src/httpd -l

or change to the directory that the exewcutable is in and say

./httpd -l

(you can do both without being root) and see if the output includes a line

mod_perl.c

which tells you that mod_perl is compiled in (i.e. compiled statically).

73,
Ged.



Re: Compling mod_perl as a static module....(shared=max)

2003-06-10 Thread Forrest Aldrich
This is what I found:


--enable-shared=max tells the script to include mod_so (needed for dynamic 
modules, or DSOs) and compile all the standard modules as dynamic modules


So I will need to find some way around this for the other things I rely 
upon.   but it seems that mod_perl's configuration should behave 
accordingly if you tell it NOT to use DSO.

Forrest



Re: Compling mod_perl as a static module....

2003-06-10 Thread Forrest Aldrich
At 02:55 PM 6/10/2003, Ged Haywood wrote:
[ ... ]

Try taking out

--enable-shared=max
[ ... ]

This caused the compilation process to bomb:

./libhttpd.so: warning: mktemp() possibly used unsafely; consider using 
mkstemp()
/usr/local/lib/perl5/5.8.0/mach/auto/DynaLoader/DynaLoader.a(DynaLoader.o): 
In function `SaveError':
DynaLoader.o(.text+0x60): undefined reference to `Perl_vmess'
DynaLoader.o(.text+0x8b): undefined reference to `Perl_sv_2pv_flags'
/usr/local/lib/perl5/5.8.0/mach/auto/DynaLoader/DynaLoader.a(DynaLoader.o): 
In function `XS_DynaLoader_dl_load_file':
DynaLoader.o(.text+0x128): undefined reference to `Perl_sv_2pv_nolen'
/usr/local/lib/perl5/5.8.0/mach/auto/DynaLoader/DynaLoader.a(DynaLoader.o): 
In function `XS_DynaLoader_dl_find_symbol':
DynaLoader.o(.text+0x38d): undefined reference to `Perl_sv_2pv_nolen'
/usr/local/lib/perl5/5.8.0/mach/auto/DynaLoader/DynaLoader.a(DynaLoader.o): 
In function `XS_DynaLoader_dl_install_xsub':
DynaLoader.o(.text+0x4b8): undefined reference to `Perl_sv_2pv_nolen'
DynaLoader.o(.text+0x521): undefined reference to `Perl_sv_2pv_nolen'
/usr/local/lib/perl5/5.8.0/mach/auto/DynaLoader/DynaLoader.a(DynaLoader.o): 
In function `boot_DynaLoader':
DynaLoader.o(.text+0x68d): undefined reference to `Perl_sv_2pv_flags'
DynaLoader.o(.text+0x6d2): undefined reference to `Perl_get_sv'
DynaLoader.o(.text+0x70e): undefined reference to `Perl_get_sv'
DynaLoader.o(.text+0x747): undefined reference to `Perl_sv_2pv_flags'
./libhttpd.so: undefined reference to `Perl_require_pv'
./libhttpd.so: undefined reference to `Perl_get_cv'
./libhttpd.so: undefined reference to `Perl_get_av'
./libhttpd.so: undefined reference to `Perl_call_pv'
./libhttpd.so: undefined reference to `Perl_sv_pvn_force_flags'
./libhttpd.so: undefined reference to `Perl_safesysfree'
./libhttpd.so: undefined reference to `Perl_sv_catpvn_flags'
./libhttpd.so: undefined reference to `Perl_eval_sv'
./libhttpd.so: undefined reference to `Perl_sv_catsv_flags'
./libhttpd.so: undefined reference to `Perl_sv_setsv_flags'
./libhttpd.so: undefined reference to `Perl_get_hv'
./libhttpd.so: undefined reference to `Perl_eval_pv'
./libhttpd.so: undefined reference to `Perl_call_sv'
./libhttpd.so: undefined reference to `Perl_call_method'
./libhttpd.so: undefined reference to `Perl_PerlIO_close'
./libhttpd.so: undefined reference to `PerlIO_findFILE'
./libhttpd.so: undefined reference to `Perl_save_destructor_x'
./libhttpd.so: undefined reference to `PerlIO_open'
./libhttpd.so: undefined reference to `Perl_safesysmalloc'
gmake[3]: *** [libhttpd.ep] Error 1
gmake[3]: Leaving directory `/usr/local/src/apache/apache_1.3.27/src'
gmake[2]: *** [build-std] Error 2
gmake[2]: Leaving directory `/usr/local/src/apache/apache_1.3.27'
gmake[1]: *** [build] Error 2
gmake[1]: Leaving directory `/usr/local/src/apache/apache_1.3.27'
gmake: *** [apaci_httpd] Error 2




Re: Compling mod_perl as a static module....

2003-06-10 Thread Forrest Aldrich
Okay, here's what I've done which seems to have worked with a 
statically-linked mod_perl.

o untar all distributions into a working directory

o ./configure apache with all the usual options I use (i have a script that 
has this):

./configure --with-perl=/usr/local/bin/perl --enable-module=rewrite 
--enable-module=include --enable-module=info --enable-module=usertrack 
--server-gid=nogroup --suexec-docroot=/usr/local/apache/htdocs 
--enable-module=most --enable-module=auth_db --enable-module=mmap_static 
--enable-shared=max --enable-module=ssl --enable-rule=SHARED_CORE 
--add-module=src/modules/dosevasive/mod_dosevasive.c 
--activate-module=src/modules/perl/libperl.a

o enter mod_ssl configure with apache

o enter mod_ssl directory and configure with these makepl options:

APACHE_PREFIX=/usr/local/apache
APACHE_SRC=../apache_1.3.27/src
DO_HTTPD=0
EVERYTHING=1
ALL_HOOKS=1
PERL_SSI=1
PERL_SECTIONS=1
o return to apache directory, re-run my configure script to activate the 
modules, build, and install.

Doing an httpd -l shows this now:

# /usr/apache/bin/httpd -l
Compiled-in modules:
  http_core.c
  mod_so.c
  mod_dosevasive.c
  mod_perl.c
suexec: disabled; invalid wrapper /usr/apache/bin/suexec  (weird, I did a 
fresh install)

So I'll be damned if building mod_perl is such a pain in the arse.   I hope 
Apache2 and MP2 will have an easier approach (I'm waiting on Apache2 for it 
to stabilize).

Ged, thoughts on this one?  I of course still need to test mod_perl with 
something - will try my go at installing RT or something simple (open to 
suggestions).



Forrest



Re: Compling mod_perl as a static module....

2003-06-10 Thread Ged Haywood
Hi Forrest,

On Tue, 10 Jun 2003, Forrest Aldrich wrote:

 seems to have worked
[snip]
 # /usr/apache/bin/httpd -l
 Compiled-in modules:
http_core.c
mod_so.c
mod_dosevasive.c
mod_perl.c
[snip]

:)

 building mod_perl is such a pain
[snip]
 thoughts on this one?

It isn't usually such a pain.  Without getting an account on the box
or looking at the entire build process it's difficult to see why
you've had such trouble.  You do seem to be putting a lot of stuff
in there, and I wonder if it wouldn't have been simpler to start with
a very cut-down configuration.  Well, no matter, you have a statically
linked mod_perl now.  Can I suggest that you create another account on
the box and rebuild httpd from scratch in exactly the same way to make
sure you have all the information you need to repeat it?

 I of course still need to test mod_perl with something -

Did you not run 'make test' ?

 will try my go at installing RT or something simple (open to suggestions).

Lynx?  Telnet?

What are you going to use mod_perl for?

73,
Ged.



Re: Compling mod_perl as a static module....

2003-06-10 Thread Ged Haywood
Hi there,

On Tue, 10 Jun 2003, Forrest Aldrich wrote:

 I wonder if this will affect anything else, especially other 
 things that require DSO support.  ?

Have you got the Eagle Book?  You need

--enable-module=so

in your configure arguments to put mod_so into Apache, mod_so allows
Apache to load shared objects.

 What does --enable-shared=max imply to Apache...

make as much as possible as shared objects, the idea being to make the
resulting binary smaller.  It won't save any memory if you run it with
tons of modules loaded, so it's probably more trouble than it's worth.
Which is my opinion of DSO generally.  I always build static if I can.

On your EXPAT question, I'm not sure what you found is relevant.  You
might want to check the List archives for discussions about EXPAT, not
so long ago it seemed to come up quite a lot.

73,
Ged.



Re: Compling mod_perl as a static module....

2003-06-09 Thread Ged Haywood
Hi there,

On Sun, 8 Jun 2003, Forrest Aldrich wrote:

 I want to try compiling mod_perl statically

What's the question?

73,
Ged.



Re: Compling mod_perl as a static module....

2003-06-09 Thread Forrest Aldrich
At 03:26 AM 6/9/2003, Ged Haywood wrote:
Hi there,

On Sun, 8 Jun 2003, Forrest Aldrich wrote:

 I want to try compiling mod_perl statically

What's the question?

73,
Ged.
[ ... ]

Referring back to my original post, it with the options I specified, the 
compile process still insists on compiling mod_perl as a DSO.   Even if I 
explicitly set USE_DSO=0 -- I wonder if one of the other flags (like 
EVERYTHING=1) is triggering the DSO compile.   This seems to be very tricky.

_F




Re: Compling mod_perl as a static module....

2003-06-09 Thread Forrest Aldrich
Ged,

This is what the make output shows... I've read the docs.  Perhaps I need 
to try compiling mod_perl with a different method (I recall a build option 
with apxs, outside of the apache src tree).

o perl_module uses ConfigStart/End
  + mod_perl build type: DSO
  + setting up mod_perl build environment
  + id: mod_perl/1.27
  + id: Perl/v5.8.0 (freebsd) [/usr/local/bin/perl]
Here are the makepl flags I have thus far:

USE_DSO=0
DYNAMIC=0
USE_APACI=1
APACHE_PREFIX=/usr/local/apache
APACHE_SRC=../apache_1.3.27/src
DO_HTTPD=1
EVERYTHING=1
ALL_HOOKS=1
PERL_SSI=1
PERL_SECTIONS=1
APACI_ARGS=--with-perl=/usr/local/bin/perl
APACI_ARGS=--enable-module=rewrite
APACI_ARGS=--enable-module=include
APACI_ARGS=--enable-module=info
APACI_ARGS=--enable-module=usertrack
APACI_ARGS=--server-gid=nogroup
APACI_ARGS=--suexec-docroot=/usr/local/apache/htdocs
APACI_ARGS=--enable-module=most
APACI_ARGS=--enable-module=auth_db
APACI_ARGS=--enable-module=mmap_static
APACI_ARGS=--enable-shared=max
APACI_ARGS=--enable-module=ssl
APACI_ARGS=--enable-rule=SHARED_CORE
APACI_ARGS=--activate-module=src/modules/dosevasive/libdosevasive.a



Re: Compling mod_perl as a static module....

2003-06-09 Thread Ged Haywood
Hello again,

On Mon, 9 Jun 2003, Forrest Aldrich wrote:

 Referring back to my original post, it with the options I specified, the 
 compile process still insists on compiling mod_perl as a DSO.   Even if I 
 explicitly set USE_DSO=0 -- I wonder if one of the other flags (like 
 EVERYTHING=1) is triggering the DSO compile.

No, I often compile statically with EVERYTHING=1.  I don't think we're
dealing with a full deck here.  Are you quite sure that you're looking
at the right executable after you build it?  Check the timestamp.  Try
running it by giving the full pathname and the -l switch for example

/home/forrest/src/apache_1.3.27/src/httpd -l

or change to the directory that the exewcutable is in and say

./httpd -l

(you can do both without being root) and see if the output includes a line

mod_perl.c

which tells you that mod_perl is compiled in (i.e. compiled statically).

73,
Ged.