mod_perl won't compile under Cygwin without some tricks.

> The problem is then I run Makefile.PL under cygwin it does not start
> perl_mod.config.sh script and as result Makefile at src/module/perl
> created without any PERL_MOD vars, and created ERROR message on run "make"
> command. After I modified script it begun works and created makefile what
> looks good, but at run "make" it created a lot of lines with message about
> :undefined reference to '......, though I using APACI.

OK, here is what I've done to build apache+mod_perl under Cygwin.

1. Patch apaci/mod_perl.config.sh in mod_perl distro -- it doesn't
   have #!/bin/sh and Cygwin shell is unable to run it:

    --- orig/mod_perl.config.sh Fri Jul 06 22:41:03 2001
    +++ new/mod_perl.config.sh Sat Aug 11 23:44:01 2001
    @@ -1,3 +1,4 @@
    +#!/bin/sh
     ##
     ##  mod_perl.config.sh -- mod_perl configuration transformation script
     ##  Written by Ralf S. Engelschall <[EMAIL PROTECTED]>

2. make libperl.a symbolic link to libperl5_6_1.a:
    cd /usr/lib/perl5/5.6.1/cygwin/CORE
    ln -s libperl5_6_1.a libperl.a

3. build mod_perl with this command:
    perl Makefile.PL USE_APACI=1 EVERYTHING=1 PERL_EXTRA_CFLAGS=-DUSEIMPORTLIB 
DO_HTTPD=1
 (it won't link without PERL_EXTRA_CFLAGS=-DUSEIMPORTLIB)

4. make

However, I think that building mod_perl under Cygwin is a not a good
idea (yet). For example, you won't be able to build libapreq (Apache::Request):
it requires some symbols from apache and under win32 it's impossible
to link .dll to symbols in .exe which loads this .dll.
That's why win32 apache is split into Apache.exe and ApacheCore.dll --
it allows modules to link with ApacheCore.dll. Unfortunately,
Cygwin builds single httpd.exe binary and libapreq fails to link
to ap_table_add, ap_getword and many other symbols residing in apache
binary.

Alexander.
----- Original Message ----- 
From: "Stas Bekman" <[EMAIL PROTECTED]>
To: "mod_perl list" <[EMAIL PROTECTED]>
Cc: "Leonid Zalechansky" <[EMAIL PROTECTED]>
Sent: Tuesday, August 21, 2001 5:23 AM
Subject: modperl build problems under CYGWIN


> Does anybody working with cygwin can help Leonid to solve his problem?
> Thanks!
> 
> ---------- Forwarded message ----------
> Date: Mon, 20 Aug 2001 10:19:40 -0400
> From: Leonid Zalechansky <[EMAIL PROTECTED]>
> Subject: The problem
> 
> The problem is then I run Makefile.PL under cygwin it does not start
> perl_mod.config.sh script and as result Makefile at src/module/perl
> created without any PERL_MOD vars, and created ERROR message on run "make"
> command. After I modified script it begun works and created makefile what
> looks good, but at run "make" it created a lot of lines with message about
> :undefined reference to '......, though I using APACI.
> 
> May be it's still some problem in makefile? Could you give me a sample of
> correct one what should be created in module/perl dir?
> 
> Thank you.
> Leonid.
> 
> 

Reply via email to