Problems getting statically-compiled mod_perl 2.0

Problems getting statically-compiled mod_perl 2.0

Post by cbd.. » Fri, 04 Jul 2003 01:34:55



It seems that the "getting your feet wet" procedure for building mod
perl version 1 produces a static apache/mod_perl httpd. And static
linking seems to be the prefered method as it loads faster.

However, following the "getting you feet wet" procedure for mod_perl
version 2 does NOT produce a static httpd. And the procedure tells you
to insert a LoadModule command in your httpd.conf file in order to
(dynamically) load the mod_perl module.

The problem is that I can not seem to build a static mod_perl/httpd
for Apache 2 and mod_perl 2. How is this done?

I have hunted around in the documentation for options which relate to
static building, but all I can find is the mod_perl MP_USE_STATIC=1,
and when I use it the "make install" fails because it tries to copy
mod_perl.so !!

I am still following the procedure on the "getting you feet wet" page,
where you "configure", "make" and "make install" apache; then
"configure", "make" and "make install" mod_perl into the same
directory that apache had installed into.  Do I need to follow a
different procedure to get a statically compiled mod_perl 2 ?

Thanks

Colin

 
 
 

Problems getting statically-compiled mod_perl 2.0

Post by Greg Schmid » Fri, 04 Jul 2003 11:56:04



Quote:>The problem is that I can not seem to build a static mod_perl/httpd
>for Apache 2 and mod_perl 2. How is this done?

When I looked into it a couple of months ago, it was not possible.  I
seem to recall that there were docs that described how to do it, but it
was more of a theoretical "this is how to do it once we support it" kind
of thing.  I don't remember where I saw the definitive statement that
static building was not yet supported, but I do know that I saw it
somewhere; might have been in the docs, might have been on the mod_perl
mailing list, might have been scrawled on the wall of the toilet stall
at the local pub.  Grain of salt: this info is getting dated, and may be
partly or completely wrong by now.

I'd complain that the mod_perl2 docs need work, but seeing as how people
are doing this out of the goodness of their hearts, and since I'd rather
they work on the code and get static linking supported, and considering
that any complaints would probably (quite rightly) be met with "well why
don't YOU do it?", I'll just shut up about it.

--

  Trawna Publications (http://www.trawna.com/)

 
 
 

Problems getting statically-compiled mod_perl 2.0

Post by cbd.. » Fri, 04 Jul 2003 16:52:13




> >The problem is that I can not seem to build a static mod_perl/httpd
> >for Apache 2 and mod_perl 2. How is this done?

> When I looked into it a couple of months ago, it was not possible.  I
> seem to recall that there were docs that described how to do it, but it
> was more of a theoretical "this is how to do it once we support it" kind
> of thing.  I don't remember where I saw the definitive statement that
> static building was not yet supported, but I do know that I saw it
> somewhere; might have been in the docs, might have been on the mod_perl
> mailing list, might have been scrawled on the wall of the toilet stall
> at the local pub.  Grain of salt: this info is getting dated, and may be
> partly or completely wrong by now.

Thanks Greg. After a lot of twawling the only other mention of this I
could find was

http://www.gossamer-threads.com/archive/mod_perl_C1/modperl_F7/Fw:_%5...

and mirrors of the same thread at a couple of other addresses. It also
suggests that (as of Feb 2003) static-linking was not yet supported in
mod_perl 2.

I guess I'll just have to build it dynamically for now and keep
checking back with the mod_perl site until static linking appears.

Can anyone confirm if static linking is always likely to produce a
faster loading and executing mod_perl httpd?

 
 
 

1. Statically compiled libc 2.2 using gethostbyname doesn't work on libc 2.0

Howdy everyone, got a bit of an interesting problem that I hope someone
can help me with.

I'm doing work on a linux based embedded device, which requires (due to
disk space) me to use libc 2.0 (2.0.7 to be exact).  However one of the
3rd party libraries that I'm using in the app I'm writing requires the
full pthreads implementation in libc 2.2.  To get around this I simply
statically compiled the app, and it *mostly* worked, except for the
gethostbyname() call(s).

I am debugging this with a simple test program that grabs the machine's IP
using gethostbyname().  It appears that while the gethostbyname() call
returns NULL for the hostent struct.  Compiling the test program on my
libc2.2 workstation (debian unstable) using the -static flag for gcc
(2.95.4 or 3.0.x) resulted in the program working properly on the
workstation, but not working properly (gethostbyname() returning NULL) on
the libc 2.0 system.

I've found reference to this from a while back at:
http://groups.google.com/groups?th=f0a07536f933ac3c&seekm=387C2ECA.AD...

(or search groups.google.com for "BUG with gethostbyname()+dlopen()+static
linking"

Basically I'm stuck with using 2.0 on the device, and I'm also stuck using
the libraries that require libc 2.2 (unless someone knows of a libc
independent pthreads library that could be used under libc2.0?) :(  Can
anyone point me in the direction of a fix?   I don't have access to the
client source code, so I can't just rewrite the need for pthreads, or
rewrite the resolver code with my own.

TIA!

Regards,

Alan

2. Monitoring temperature inside an old P-150

3. Sparc IPX and no audio in

4. mod_perl wont compile for SWS 2.0 & RH 6.0,

5. ppp sharing via NAT

6. Installing mod_perl statically

7. *Need help with serial port speeds*

8. Problems getting executables to statically link under 2.5.1

9. Q: Problems when compiling tcsh 'statically'.

10. mod_perl 1.15 and apache 1.3.2 compile/installation problems

11. Problems compiling Apache with Openssl, mod_ssl, mod_perl

12. Problem compiling mod_perl for apache 1.3