Mailing List Archive

Win32 build with VC++
Hi,
I've attached a draft diff to the cvs mod_perl
top-level Makefile.PL for building mod_perl on
Win32 using VC++. There's two aspects to this.
The first is the actual building; this diff enables
'perl Makefile.PL' to accept 3 arguments:

APACHE_SRC=../../wherever/apache_1.3.12
which is the location of the apache sources,
and must be found to continue (the user is
prompted for this directory if it's not given or found),
DEBUG=1
which builds a Debug version (the default is
to build a Release version),
INSTALL_DLL=/wherever/Apache/modules
which specifies the location of where to copy
ApacheModulePerl.dll to when installing things.
No default is assumed - if this is not specified,
the dll must be copied manually.

Upon verifying that the specified directories and
needed Apache library exists, ApacheModulePerl.dsp
is edited to include the needed header and lib
directories. With the indicated additions to the
Makefile targets, ApacheModulePerl.dll is then
built using 'msdev', which is a command-line tool,
so that everything can be built just by 'nmake'
within a DOS window (ie, no need to call up
Visual Studio to build ApacheModulePerl.dll).

The second aspect to this diff is that the apache and
mod_perl inc and lib directories are recorded in
Apache::MyConfig. This would enable packages like
libapreq, Embperl, and AxKit to get these needed
directories via

require Apache::MyConfig;
$ap_lib = $Apache::MyConfig::Setup{APACHE_LIB};
$ap_inc = $Apache::MyConfig::Setup{APACHE_INC};
$mp_lib = $Apache::MyConfig::Setup{MODPERL_LIB};
$mp_inc = $Apache::MyConfig::Setup{MODPERL_INC};

This requires the user to keep these build directories
around (with the libs), but it should make configuring
these packages for Win32 easier.

I've tested this on ActivePerl 618 and also with
a non-ActiveState perl-5.005_03, both with VC++ 6.
However, I don't have VC++ 5, so am not sure how
it would fare there, especially the use of 'msdev'
to build ApacheModulePerl.dll.

Parts of this diff could be better integrated within
the present code of Makefile.PL, but I wanted to
make clear the changes involved for Win32.

best regards,
randy kobes
RE: Win32 build with VC++ [ In reply to ]
> -----Original Message-----
> From: Randy Kobes [mailto:randy@theoryx5.uwinnipeg.ca]
> Sent: Tuesday, October 10, 2000 1:01 AM
> To: dev@perl.apache.org
> Subject: Win32 build with VC++
>
>
[snip]

> The second aspect to this diff is that the apache and
> mod_perl inc and lib directories are recorded in
> Apache::MyConfig. This would enable packages like
> libapreq, Embperl, and AxKit to get these needed
> directories via
>
> require Apache::MyConfig;
> $ap_lib = $Apache::MyConfig::Setup{APACHE_LIB};
> $ap_inc = $Apache::MyConfig::Setup{APACHE_INC};
> $mp_lib = $Apache::MyConfig::Setup{MODPERL_LIB};
> $mp_inc = $Apache::MyConfig::Setup{MODPERL_INC};
>

I wasn't aware of Apache::MyConfig... we've talked before about being able
to determine compiled in hooks without having to start a live server - are
similar package variables a possible/good place to put stuff like this?

--Geoff
Re: Win32 build with VC++ [ In reply to ]
On Tue, 10 Oct 2000, Randy Kobes wrote:

> Hi,
> I've attached a draft diff to the cvs mod_perl
> top-level Makefile.PL for building mod_perl on
> Win32 using VC++. There's two aspects to this.

Randy,

You might want to play with the apache 1.3.14 release candidate
as well. Find a build copy at http://www.apache.org/~ridruejo/win32/

There have been a lot of changes especially in the Win32 world. You
might want to see what your findings are with this new rev.

Cheers,

--
Sander van Zoest [sander@covalent.net]
Covalent Technologies, Inc. http://www.covalent.net/
(415) 536-5218 http://www.vanzoest.com/sander/
Re: Win32 build with VC++ [ In reply to ]
On Tue, 10 Oct 2000, Sander van Zoest wrote:

>
> You might want to play with the apache 1.3.14 release candidate
> as well. Find a build copy at http://www.apache.org/~ridruejo/win32/
>
> There have been a lot of changes especially in the Win32 world. You
> might want to see what your findings are with this new rev.
>

Thanks for the link - with the apache 1.3.14 sources,
mod_perl built fine and passed all the tests (with
ActivePerl 618 on Win32).

I did find one change needed in the Makefile.PL diff
I sent earlier for Win32/VC++ - if the location to
install ApacheModulePerl.dll contains spaces :(, the Makefile
amp_install target (set in MY::top_targets) needs quotes
around the destination.

best regards,
randy
Re: Win32 build with VC++ [ In reply to ]
On Tue, 10 Oct 2000, Sander van Zoest wrote:

> On Tue, 10 Oct 2000, Randy Kobes wrote:
>
> > Hi,
> > I've attached a draft diff to the cvs mod_perl
> > top-level Makefile.PL for building mod_perl on
> > Win32 using VC++. There's two aspects to this.
>
> Randy,
>
> You might want to play with the apache 1.3.14 release candidate
> as well. Find a build copy at http://www.apache.org/~ridruejo/win32/
>
> There have been a lot of changes especially in the Win32 world. You
> might want to see what your findings are with this new rev.

Hmm, any idea if greg stein has switched to the DSO expat from
expat.sourceforge.net yet? If not, its going to be a very disappointing
release for me.

--
<Matt/>

/|| ** Director and CTO **
//|| ** AxKit.com Ltd ** ** XML Application Serving **
// || ** http://axkit.org ** ** XSLT, XPathScript, XSP **
// \\| // ** Personal Web Site: http://sergeant.org/ **
\\//
//\\
// \\
Re: Win32 build with VC++ [ In reply to ]
On Oct 11, Matt Sergeant wrote:
> Hmm, any idea if greg stein has switched to the DSO expat from
> expat.sourceforge.net yet? If not, its going to be a very disappointing
> release for me.

i am pretty sure the expat situation hasn't changed yet. considering
the expat.sourceforge.net release is marked "development/beta
release" and the apache 1.3 series is stable, it would seem premature
to have made that change. (there were more important security-related
fixes that needed to get out.)

jim
Re: Win32 build with VC++ [ In reply to ]
On Wed, 11 Oct 2000, Jim Winstead wrote:

> On Oct 11, Matt Sergeant wrote:
> > Hmm, any idea if greg stein has switched to the DSO expat from
> > expat.sourceforge.net yet? If not, its going to be a very disappointing
> > release for me.
>
> i am pretty sure the expat situation hasn't changed yet. considering
> the expat.sourceforge.net release is marked "development/beta
> release" and the apache 1.3 series is stable, it would seem premature
> to have made that change. (there were more important security-related
> fixes that needed to get out.)

Of course that didn't stop the Apache crew from adding expat (and a -test
version to boot, IIRC) to the 1.3 series in the first place... *sigh*

--
<Matt/>

/|| ** Director and CTO **
//|| ** AxKit.com Ltd ** ** XML Application Serving **
// || ** http://axkit.org ** ** XSLT, XPathScript, XSP **
// \\| // ** Personal Web Site: http://sergeant.org/ **
\\//
//\\
// \\
Re: Win32 build with VC++ [ In reply to ]
On Wed, 11 Oct 2000, Matt Sergeant wrote:

> On Tue, 10 Oct 2000, Sander van Zoest wrote:
>
> > On Tue, 10 Oct 2000, Randy Kobes wrote:
> > > Hi,
> > > I've attached a draft diff to the cvs mod_perl
> > > top-level Makefile.PL for building mod_perl on
> > > Win32 using VC++. There's two aspects to this.
> > There have been a lot of changes especially in the Win32 world. You
> > might want to see what your findings are with this new rev.
> Hmm, any idea if greg stein has switched to the DSO expat from
> expat.sourceforge.net yet? If not, its going to be a very disappointing
> release for me.

I don't think this change got implemented yet, because of stability
issues. I really do not see why you would consider a new release
disappointing. There can always be another. ;-)

--
Sander van Zoest [sander@covalent.net]
Covalent Technologies, Inc. http://www.covalent.net/
(415) 536-5218 http://www.vanzoest.com/sander/
Re: Win32 build with VC++ [ In reply to ]
----- Original Message -----
From: "Randy Kobes" <randy@theoryx5.uwinnipeg.ca>
To: <dev@perl.apache.org>
Sent: Tuesday, October 10, 2000 12:01 AM
Subject: Win32 build with VC++

> I've attached a draft diff to the cvs mod_perl
> top-level Makefile.PL for building mod_perl on
> Win32 using VC++.
[ ... ]

Hi,
Regarding this diff, there could be arguments
against changing the default build procedure
on Win32. I've attached another version of this diff
(against the cvs mod_perl Makefile.PL) which
addresses this - in this, all the changes to the
Makefile targets are triggered by the presence
of an APACHE_SRC=... argument to Makefile.PL.
If APACHE_SRC is not given (which is what is done
now), then the usual build procedure is followed,
including calling up Visual Studio for the dll.

This version also adds acceptance of an EAPI=1
argument to Makefile.PL, which would define EAPI
when building ApacheModulePerl.dll (the default is to
have EAPI undefined). This is useful when building
mod_perl with mod_ssl altered apache sources; if
EAPI isn't defined here, a warning message about
possible crashes occurs.

Finally, in copying ApacheModulePerl.dll to the
Apache\modules directory (if INSTALL_DLL is
defined), quotes are needed for the directories
in the Makefile if they contain spaces. This diff
adds those quotes.

best regards,
randy kobes
Re: Win32 build with VC++ [ In reply to ]
Thats great --

for what its worth i tested this all out (eapi, spaces, apache_src) and it
built and ran for me no problem building against an eapi apache with
spaces in the path.

sterling

On Sat, 28 Oct 2000, Randy Kobes wrote:

> ----- Original Message -----
> From: "Randy Kobes" <randy@theoryx5.uwinnipeg.ca>
> To: <dev@perl.apache.org>
> Sent: Tuesday, October 10, 2000 12:01 AM
> Subject: Win32 build with VC++
>
> > I've attached a draft diff to the cvs mod_perl
> > top-level Makefile.PL for building mod_perl on
> > Win32 using VC++.
> [ ... ]
>
> Hi,
> Regarding this diff, there could be arguments
> against changing the default build procedure
> on Win32. I've attached another version of this diff
> (against the cvs mod_perl Makefile.PL) which
> addresses this - in this, all the changes to the
> Makefile targets are triggered by the presence
> of an APACHE_SRC=... argument to Makefile.PL.
> If APACHE_SRC is not given (which is what is done
> now), then the usual build procedure is followed,
> including calling up Visual Studio for the dll.
>
> This version also adds acceptance of an EAPI=1
> argument to Makefile.PL, which would define EAPI
> when building ApacheModulePerl.dll (the default is to
> have EAPI undefined). This is useful when building
> mod_perl with mod_ssl altered apache sources; if
> EAPI isn't defined here, a warning message about
> possible crashes occurs.
>
> Finally, in copying ApacheModulePerl.dll to the
> Apache\modules directory (if INSTALL_DLL is
> defined), quotes are needed for the directories
> in the Makefile if they contain spaces. This diff
> adds those quotes.
>
> best regards,
> randy kobes
>
>
Re: Win32 build with VC++ [ In reply to ]
On Sat, 28 Oct 2000, Randy Kobes wrote:

> > I've attached a draft diff to the cvs mod_perl
> > top-level Makefile.PL for building mod_perl on
> > Win32 using VC++.
> [ ... ]

wow randy, that looks like it was painful to get right, great work!
and thanks to sterling for testing, i think you made his day with this
patch, was it really almost 2 months ago!?!
Re: Win32 build with VC++ [ In reply to ]
Hi,
I tested out the mod_perl cvs version (against
apache_1.3.15-dev) which had these Makefile.PL
patches, and all tests pass .... And Geoff's patch
to Apache::MyConfig looks good on Windows, too.
I've attached a diff to INSTALL.win32 (against the
cvs version) to reflect some of these changes - this also
fixes a couple of typos, and mentions that mod_perl can
now build with ActivePerl. Also, perhaps it might be an
idea to remove INSTALL.activeperl, since that doesn't
apply to the current ActivePerl builds 6xx?

best regards,
randy
Re: Win32 build with VC++ [ In reply to ]
On Thu, 21 Dec 2000, Randy Kobes wrote:

> Hi,
> I tested out the mod_perl cvs version (against
> apache_1.3.15-dev) which had these Makefile.PL
> patches, and all tests pass .... And Geoff's patch
> to Apache::MyConfig looks good on Windows, too.
> I've attached a diff to INSTALL.win32 (against the
> cvs version) to reflect some of these changes - this also
> fixes a couple of typos, and mentions that mod_perl can
> now build with ActivePerl. Also, perhaps it might be an
> idea to remove INSTALL.activeperl, since that doesn't
> apply to the current ActivePerl builds 6xx?

Along with this patch we should also update perl.apache.org to reflect the
PPD/PPM Win32 version availability.

--
<Matt/>

/|| ** Director and CTO **
//|| ** AxKit.com Ltd ** ** XML Application Serving **
// || ** http://axkit.org ** ** XSLT, XPathScript, XSP **
// \\| // ** Personal Web Site: http://sergeant.org/ **
\\//
//\\
// \\
Re: Win32 build with VC++ [ In reply to ]
applied, and INSTALL.activeperl removed, thanks randy!