mod_perl-1.2.6 for Cygwin 1.x (using apache_1.3.22, perl-5.6.1)
Stipe Tolj
tolj@wapme-systems.de
Tue Oct 16 04:25:00 GMT 2001
Hi,
I'm the maintainer of the Apache for Cygwin port, various apache
modules and the CAMP binary distribution. After releasing the latest
CAMP package which contains many popular modules (mod_php, mod_ssl,
mod_dav, etc) there have been requests from Apache for Cygwin users to
included mod_perl if possible.
There are two alternatives to use mod_perl:
1. Static apache module:
Please follow the instructions from Alexander Solovey at
http://www.mail-archive.com/modperl@apache.org/msg21136.html
Special thanks to Alexander Solovey for figuring this out!
2. DSO/DLL shared apache module:
This is possible for the apache_1.3.22-i686-whatever-cygwin.tar.gz
binary distribution found at http://apache.dev.wapme.net
step 1: follow the instructions for the static apache module
step 2: use the following Makefile construction instead:
$ perl Makefile.PL USE_APACI=1 EVERYTHING=1 \
PERL_EXTRA_CFLAGS=-DUSEIMPORTLIB DO_HTTPD=1 USE_DSO=1
step 3: patch src/modules/perl/Makefile as defined in the attached
Makefile.diff patch.
step 4: now run "make" within mod_perl-1.2.6.
The first run will claim about no "libhttpd.dll". Please
touch src/modules/perl/libperl.dll and re-run "make" after
libhttpd.dll has been build.
(see src/modules/standard/Makefile.Cygwin for more info)
step 5: place the libperl.dll into /usr/local/apache/libexec and
add the required directives to httpd.conf.
Unfortunatly the libperl.dll _breaks_ apache's httpd process if
configured ok. When trying to start httpd it troughts a
STATUS_ACCESS_VIOLATION exception.
Attached is the "error_log" file and a tailed output of "strace
httpd.exe".
If there is someone who can explain me how to use the information to
find the resulting error, I would be very thankfull.
BTW, a shared DLL version of mod_perl is working using "httpd -X",
apache's single process mode.
Stas, can we include necessary changes to mod_perl when we fix this,
so we have out-of-the-box support?
Stipe
tolj@wapme-systems.de
-------------------------------------------------------------------
Wapme Systems AG
Münsterstr. 248
40470 Düsseldorf
Tel: +49-211-74845-0
Fax: +49-211-74845-299
E-Mail: info@wapme-systems.de
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are
--- src/modules/perl/Makefile Tue Oct 16 10:57:46 2001
+++ src/modules/perl/Makefile.cygwin Tue Oct 16 10:56:40 2001
@@ -13,7 +13,7 @@
EXTRA_CFLAGS=-DUSEIMPORTLIB -DPERL_USE_SAFE_PUTENV -DHAS_SBRK_PROTO -fno-strict-aliasing `$(SRCDIR)/apaci`
EXTRA_LDFLAGS=
EXTRA_LIBS=
-EXTRA_INCLUDES=
+EXTRA_INCLUDES=-I/usr/lib/perl5/5.6.1/cygwin/CORE
EXTRA_DEPS=
CC=env LD_RUN_PATH=/usr/lib/perl5/5.6.1/cygwin/CORE gcc
LDFLAGS_SHLIB_EXPORT=-s
@@ -32,10 +32,10 @@
PERL_CCCDLFLAGS=
PERL_DEFS= -DMOD_PERL_VERSION=\"1.26\" -DMOD_PERL_STRING_VERSION=\"mod_perl/1.26\" -DNO_PERL_SSI=1
PERL_INC=/usr/lib/perl5/5.6.1/cygwin/CORE
-PERL_LD=ld2
-PERL_LDFLAGS= -s -L/usr/local/lib
-PERL_LDDLFLAGS= -s -L/usr/local/lib
-PERL_LIBS= -s -s -L/usr/local/lib /usr/lib/perl5/5.6.1/cygwin/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.6.1/cygwin/CORE -lperl -lcrypt
+PERL_LD=gcc
+PERL_LDFLAGS= --shared -L/usr/local/lib
+PERL_LDDLFLAGS= --shared -L/usr/local/lib
+PERL_LIBS= --shared -L/usr/local/lib /usr/lib/perl5/5.6.1/cygwin/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.6.1/cygwin/CORE -lperl -lcrypt ../../libhttpd.dll
PERL_XSINIT=perl -MExtUtils::Embed -e xsinit
PERL_XSUBPP=perl /usr/lib/perl5/5.6.1/ExtUtils/xsubpp -nolinenumbers -typemap /usr/lib/perl5/5.6.1/ExtUtils/typemap
PERL_AR=ar
@@ -140,6 +140,10 @@
$(MP_RANLIB) $@
libperl.so: $(MP_OBJS_PIC)
+ $(MP_RM) $@
+ $(MP_LD) $(MP_LDFLAGS_SHLIB) -o $@ $(MP_OBJS_PIC) $(MP_LIBS)
+
+libperl.dll: $(MP_OBJS_PIC)
$(MP_RM) $@
$(MP_LD) $(MP_LDFLAGS_SHLIB) -o $@ $(MP_OBJS_PIC) $(MP_LIBS)
More information about the Cygwin
mailing list