Bug 2808 - Makefile.PL problems block make under Win32
Summary: Makefile.PL problems block make under Win32
Status: RESOLVED DUPLICATE of bug 2862
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Building & Packaging (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: PC Windows XP
: P5 normal
Target Milestone: 2.70
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
: 2854 2955 (view as bug list)
Depends on:
Blocks: 2785
  Show dependency tree
 
Reported: 2003-12-04 05:36 UTC by Sidney Markowitz
Modified: 2004-03-11 05:38 UTC (History)
3 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status
*OBSOLETE* patch against CVS Makefile.PL to define variables earlier patch None Sidney Markowitz [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Sidney Markowitz 2003-12-04 05:36:53 UTC
SA does not make under Win32 using MakeMaker 6.05 or later with ActivePerl 5.6.1
or 5.8.1 and nmake, with a whole slew of errors all starting from the -DPREFIX=
in the expansion of PM_FILTER being messed up.

Note that if you use the MakeMaker 5.45 that comes with ActivePerl 5.6.1 you
don't get all the errors from nmake, but looking at the result shows that 5.45
never defines PM_FILTER so the reference to it produces no error message but
also has no effect.

The bug results from PREPROCESS and I_PREFIX being defined in the postamble,
which  appears in the generated Makefile after the first use of PM_FILTER, which
uses those two variables in its definition.

I am attaching a patch that moves the definition of PREPROCESS and the set of
variables that includes I_PREFIX to the constants section so they are defined by
the time PM_FILTER is first used.

This should be looked over by someone who better understands all the Makefile.PL
complications. I am concerned that I can't explain why the existing Makefile.PL
seems to work ok on other platforms that use GNU make even though it seems that
PREPROCESS and I_PREFIX are being used in PM_FILTER before they are defined.
Comment 1 Sidney Markowitz 2003-12-04 05:38:53 UTC
Created attachment 1605 [details]
*OBSOLETE* patch against CVS Makefile.PL to define variables earlier
Comment 2 Sidney Markowitz 2003-12-04 12:34:19 UTC
Here's why Makefile.PL works with GNU make and not with Windows nmake:

Create a test Makefile containing

testtarg:
        @echo foo1 $(FOO1) foo1

FOO1 = "This is foo1 text"

Using GNU make, make testtarg outputs
foo1 This is foo1 text foo1

Using nmake, nmake testtarg outputs
foo1 foo1

To be portable to nmake, the definition of a variable has to come earlier in the
makefile than the first target that refers to it.
Comment 3 Sidney Markowitz 2003-12-04 14:59:47 UTC
The problem with building under ActivePerl 5.6.1 is the following: Support for
older versions of MakeMaker that do not define PM_FILTER was dropped from
Makefile.PL in the revision 1.118 checkin. That had been documented as being
MakeMaker versions less than 5.45, and the MakeMaker version 5.45 that was
included with perl 5.6.0. The doc had said that MakeMaker 5.45 shipped with perl
5.6.1 did support PM_FILTER.

The doc missed another version that does not have PM_FILTER: MakeMaker 5.45 that
comes with perl 5.6.1, or at least ActivePerl 5.6.1 which is the only 5.6.1 I
have handy, only supports PM_FILTER on Unix, not in the Win32 portion of the code.

So Makefile.PL revision 1.118 by removing support for non-PM_FILTER versions of
MakeMaker broke building under the as-shipped version 5.6.1 of ActivePerl. The
workaround is installing a newer ExtUtils::MakeMaker plus implementing the patch
for this bug report.
Comment 4 Malte S. Stretz 2003-12-08 00:50:00 UTC
I'll look at that stuff. (God, I *hate* EU::MM and Makefile-compatibility in 
general). 
Comment 5 Duncan Findlay 2003-12-18 08:30:04 UTC
*** Bug 2854 has been marked as a duplicate of this bug. ***
Comment 6 Justin Mason 2003-12-18 11:21:07 UTC
Looks good to me. +1

Malte, any feedback?
Comment 7 Sidney Markowitz 2003-12-26 16:10:35 UTC
Comment on attachment 1605 [details]
*OBSOLETE* patch against CVS Makefile.PL to define variables earlier

This patch is obsoleted by the patch I submitted for bug #2862
Comment 8 Malte S. Stretz 2004-01-04 06:23:47 UTC

*** This bug has been marked as a duplicate of 2862 ***
Comment 9 Justin Mason 2004-01-22 13:07:17 UTC
*** Bug 2955 has been marked as a duplicate of this bug. ***