error compiling mod_perl with apache-1.3.33-2 and perl-5.8.7-4 (was: Re: Apache with mod_perl up and running)
Nenad Antic
nenad.antic@ericsson.com
Thu Nov 3 16:00:00 GMT 2005
Could somebody help me out? I have tried following the suggestions from
this thread as well as other threads on this issue and also the
instructions that come with mod_perl and apache. I do manage to get
mod_perl compiled (following the receipe from Harald Joerg). But then
it doesn't work when trying to start apache httpd.
Attached are (in addition to cygcheck.out) the strace logs for a httpd
startup both with and without mod_perl (for comaprison).
The mod_perl INSTALL document has a note about how both Perl and
Apache+mod_perl must be built using the same compiler, and since gcc
seems to at some time have become something called "cygming special" (I
used to build most of the stuff from source before so I didn't notice
until now) I rebuilt perl from the cygwin source distribution to make
sure that it was not because of this compiler issue. But that didn't help.
From what I can see there seems to be some problem (at least) after the
fork is done. fixup_mmaps_after_fork doesn't seem to complete properly.
What to do about it?
Any suggestions?
Best regards,
/nenad
Harald Joerg wrote, on 8/4/2005 4:45 PM:
>OK, I've got it up and running now.
>
>There are a couple of gotchas, though, mainly with the mod_perl
>installation procedures. Be warned.
>
>1) In the mod_perl directory, start as documented for creating a DSO
> mod_perl:
>
> $ perl Makefile.PL USE_APXS=1 EVERYTHING=1 WITH_APXS=/usr/sbin/apxs
>
>2) Run make.
>
>3) Curse when trying to understand
>3a) why it fails to resolve against the apache core and
>3b) why the heck make is trying to create cygperl5_8.dll.
>
>ad 3a): I haven't found a solution. I guess one can set some
>environment variable or to add some parameter to perl Makefile.PL, but
>I haven't discovered *how*. My workaround was to manually enter the
>offending gcc command (wrapped for readability):
>
> gcc -shared -o cygperl5_8.dll -Wl,--out-implib=libperl.dll.a \
> -Wl,--export-all-symbols -Wl,--enable-auto-import \
> -Wl,--stack,8388608 -Wl,--enable-auto-image-base -s -L/usr/local/lib \
> mod_perl.lo perlxsi.lo perl_config.lo perl_util.lo perlio.lo \
> mod_perl_opmask.lo Apache.lo Constants.lo ModuleConfig.lo \
> Log.lo URI.lo Util.lo Connection.lo Server.lo File.lo Table.lo \
> -s -s -L/usr/local/lib \
> /usr/lib/perl5/5.8/cygwin/auto/DynaLoader/DynaLoader.a \
> /usr/lib/perl5/5.8/cygwin/auto/Win32CORE/Win32CORE.a \
> -L/usr/lib/perl5/5.8/cygwin/CORE -lperl -lcrypt -lgdbm_compat
>
>with two more parameters added:
>
> -L/usr/bin -lhttpd
>
>ad 3b): I had to find out that I couldn't simply resume make because
>it would again try to compile all the .lo files into cygperl5_8.dll.
>The simple reason:
>
> the target in the mod_perl makefile is 'libperl.so'. However, ld2
> as invoked by the makefile calls perlld, which insists on having
> libperl.* renamed to cygperl5_8.dll in the -o parameter for the gcc
> command.
>
> We already know that - for archeological reasons - mod_perl's DSO
> library happens to have the same file name as perl's, eh? Here's
> a place where this *really* bit me.
>
>I copied cygperl5_8.dll to libperl.so to get make into believing that
>the linking has been successful. Nevertheless the apxs step failed,
>telling me that libperl.so isn't a DSO library. How would apxs know?
>
> On cygwin (and only on cygwin), apxs insists on having a suffix of
> .dll for DSOs.
>
>So what I finally did was to manually copy cygperl5_8.dll to
>/usr/lib/apache/mod_perl.dll and changed /etc/apache/httpd.conf
>myself.
>
>I apologize for not going deeper into the subject and for not trying
>to create the necessary patches to the procedures and the
>documentation right now. As I already mentioned, compiling mod_perl
>was just a step aside during my attempts to add mod_auth_kerb to my
>cygwin apache.
>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20051103/c9661172/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mod_perl_err.log
URL: <http://cygwin.com/pipermail/cygwin/attachments/20051103/c9661172/attachment.log>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: httpd_good.log
URL: <http://cygwin.com/pipermail/cygwin/attachments/20051103/c9661172/attachment-0001.log>
-------------- next part --------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list