error compiling apache-1.3.33 with mod_perl and perl-5.8.7-1

Harald Joerg harald.joerg@fujitsu-siemens.com
Wed Aug 3 14:39:00 GMT 2005


(Sorry, maybe I can't get the references right since I'm replying to
the article found at
<http://sourceware.org/ml/cygwin/2005-07/msg00397.html>)

> Bruno Postle wrote:

>> I can't build apache-1.3.33 and mod_perl-1.29 with perl-5.8.7-1

>> (it builds ok if I downgrade cygwin to perl-5.8.6-4)

>> Steps to reproduce:

>>   tar -zxf apache_1.3.33.tar.gz
>>   tar -zxf mod_perl-1.0-current.tar.gz
>>   cd mod_perl-1.29/
>>   perl Makefile.PL DO_HTTPD=1 USE_APACI=1
>>   make

>> [...]
>> undefined reference to `_boot_'
> Info: resolving _optarg by linking to __imp__optarg (auto-import)
> collect2: ld returned 1 exit status 

> _boot_?  Boot what?  Win32CORE?  However, this was already included with
>  the 5.8.6 release.

> $ nm /usr/lib/perl5/5.8/cygwin/auto/DynaLoader/DynaLoader.a | grep boot
> 00000810 T _boot_DynaLoader

> $ nm /usr/lib/perl5/5.8/cygwin/auto/Win32CORE/Win32CORE.a  | grep boot
> 00004c70 T _boot_Win32CORE

> Something broken with generating the code for perlxsi?

That's what it seems to be - though it actually is a consequence of
something strange in the build process of Perl itself.

Looks like a patch in cygwin.sh is causing the troubles
(from p587w32core.patch):

===========================================================================
--- perl-5.8.6/hints/cygwin.sh.orig	2004-02-22 14:07:58.000000000 -0800
+++ perl-5.8.6/hints/cygwin.sh	2004-12-08 20:52:01.891572800 -0800
@@ -57,3 +57,4 @@
 ldflags="$ldflags -s"
 ccdlflags="$ccdlflags -s"
 lddlflags="$lddlflags -s"
+static_ext="$static_ext Win32CORE"

--- perl-5.8.7/cygwin/cygwin.c.orig	2005-04-22 12:54:18.000000000 +0200
===========================================================================

If $static_ext was empty, it is now " Win32CORE", with a leading space.
When building perlxsi.c, ExtUtils::Embed splits $static_ext, which
according to Perl's rules, creates two elements: '' and 'Win32CORE'.
The empty element creates a line in perlxsi.c which calls for 'boot_'.

Ouch.

I don't know enough about building perl - especially I've no idea
whether the sequence of static_ext is of any importance.  Maybe the
following is a simple solution:

===========================================================================
--- perl-5.8.6/hints/cygwin.sh.orig	2004-02-22 14:07:58.000000000 -0800
+++ perl-5.8.6/hints/cygwin.sh.haj	2004-12-08 20:52:01.891572800 -0800
@@ -57,3 +57,4 @@
 ldflags="$ldflags -s"
 ccdlflags="$ccdlflags -s"
 lddlflags="$lddlflags -s"
+static_ext="Win32CORE $static_ext"

--- perl-5.8.7/cygwin/cygwin.c.orig	2005-04-22 12:54:18.000000000 +0200
===========================================================================

I have just built perl this way with build.sh from the source package
with the following test results:

Failed 5 test scripts out of 916, 99.45% okay.
Failed 4/946 test scripts, 99.58% okay. 254/101134 subtests failed, 99.75% okay.

Maybe the failures are caused by my system's setup, or maybe they are
cygwin-intrinsic... I don't know.

mod_perl can be built with my perl 5.8.7, though I have not yet tested
any applications yet.

PS: Actually I haven't been intending to compile mod_perl when I found
the article quoted here.  I simply have been trying to compile another
extension (mod_auth_kerb), found that cygwin's vanilla Apache doesn't
have symbols to link against, and decided to start from scratch with
Google's help.  I have been looking for the configuration options
which have been used to build cygwin's Apache but failed - following
Bruno's recipe above creates a statically linked httpd.exe and no
libhttpd.dll.  Would mod_perl work with a mod_so setup as well?
-- 
Cheers,
haj

--
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