Mailing List Archive

[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541





------- Additional Comments From spamassassin-contrib@msquadrat.de 2004-06-25 13:42 -------
cl.exe is the compiler used to build spamc.exe. It's probabyl shipped with
Visual Studio or something.

I guess the whole building of spamc.exe should be skipped on Windows if
there's no compiler available.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541





------- Additional Comments From tech2@i-is.com 2004-06-25 14:07 -------
Yes that is correct, someone with Visual Studio can compile without problems,
he has already offered to send me the file. I just need to get SA installed
for testing, I don't need spamc.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541





------- Additional Comments From jm@jmason.org 2004-06-25 14:13 -------
'I guess the whole building of spamc.exe should be skipped on Windows if
there's no compiler available. '

+1 on that. possibly, just require that the user select "build spamc"
explicitly either interactively or through a commandline switch a la "perl
Makefile.PL BUILD_SPAMC=yes".



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541





------- Additional Comments From tech2@i-is.com 2004-06-25 14:30 -------
I found an ugly hack for now :)

Just add (this was necessary for SA 2.4x as well)

CL.BAT containing
echo hello

and put it in the spamc subdir

it will now work.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541





------- Additional Comments From lwilton@earthlink.net 2004-06-25 21:22 -------
Subject: Re: 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe

> 'I guess the whole building of spamc.exe should be skipped on Windows if
> there's no compiler available. '
>
> +1 on that. possibly, just require that the user select "build spamc"
> explicitly either interactively or through a commandline switch a la "perl
> Makefile.PL BUILD_SPAMC=yes".

Unless there are compile-time options of importance in spamc, for Windows
systems a precompiled binary should just be part of the normal release. It
will be able to run just fine on all systems encountered.

This is not to say that there shouldn't be a spamc compile option. But it
should probably not be part of the install process, and perhaps be a
separate thing the user can run after installing if he really wants to.

Loren





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541





------- Additional Comments From sidney@sidney.com 2004-06-25 22:42 -------
I disagree about including spamc.exe with the distribution. It's a source
distribution. If we compile a binary, it _should_ work on any Windows system,
but I don't want to support it if it doesn't.

Since spamd doesn't run on native Windows, a Windows user needs either 1)
spamc.exe by itself to use with spamd on another machine; or 2) The full
SpamAssassin except for spamc to run on their own machine.

I propose 1) Have the build skip spamc if there is no compiler available; 2) Add
a mention (in readme? in doc? in the error message?) of Microsoft's free command
line compiler download at http://msdn.microsoft.com/visualc/vctoolkit2003/ 3)
Provide links at the spamassassin.org website to people who want to host binary
spamc.exe for download




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Re: [Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
> Since spamd doesn't run on native Windows, a Windows user needs either 1)
> spamc.exe by itself to use with spamd on another machine; or 2) The full
> SpamAssassin except for spamc to run on their own machine.

Seems like a good place for a spamc.pl ... if we had one.

--
Daniel Quinlan
http://www.pathname.com/~quinlan/
[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541





------- Additional Comments From quinlan@pathname.com 2004-06-25 23:25 -------
Subject: Re: 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe

> Since spamd doesn't run on native Windows, a Windows user needs either 1)
> spamc.exe by itself to use with spamd on another machine; or 2) The full
> SpamAssassin except for spamc to run on their own machine.

Seems like a good place for a spamc.pl ... if we had one.





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541





------- Additional Comments From spamassassin-contrib@msquadrat.de 2004-06-26 07:28 -------
ACK to Michael's suggestions.

Maybe we could even host binary releases ourselves; external builds always
have the disadvantage that you don't know if the hosting site is secure enough
-- especially in our case I can imagine some spammer infecting a spamc.exe
with a worm/virus which in the end might fall back on us. (Or am I just
paranoid?)



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541





------- Additional Comments From jm@jmason.org 2004-06-26 14:27 -------
'I propose 1) Have the build skip spamc if there is no compiler available;'

+1

'2) Add a mention (in readme? in doc? in the error message?) of Microsoft's free
command line compiler download at http://msdn.microsoft.com/visualc/vctoolkit2003/'

+1, but with (1) as the default

'3) Provide links at the spamassassin.org website to people who want to host
binary spamc.exe for download'

+0.5. they can do that through the wiki if they like.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541





------- Additional Comments From sidney@sidney.com 2004-06-27 04:54 -------
This might be a problem for our MakeMaker expert: I can easily ignore an error
in compiling and detect if there is no spamc.exe, but with spamc.exe included in
the list of executables, MakeMaker automatically generates a call to pl2bat.bat
for it which then fails if spamc.exe does not exist. What is the right MakeMaker
way to make that optional?




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541





------- Additional Comments From spamassassin-contrib@msquadrat.de 2004-06-27 10:11 -------
Removing spamc.exe from the Makefile if it didn't compile is not so easy. I
don't know where the call to pl2bat is inserted. But the spamc/spamc.exe is
created as a dependency of the target $(INST_SCRIPT)/spamc$(EXE_EXT) (ie.
blib/script/spamc.exe). So that target would have to be modified so its
skipped if spamc/spamc.exe doesn't exist. That's possible.

It would be easier though to add another query() question in the beginning of
Makefile.PL which is executed either always on Windows (trivial) or if the
cl.exe wasn't found in the path (trickier, but possible with FindBin). If the
file wasn't found or the user said he didn't want to build spamc.exe,
everything spamc-related is removed from the members of the %makefile hash and
the generated Makefile won't even know that there's something called spamc.exe
around.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541





------- Additional Comments From sidney@sidney.com 2004-06-27 12:17 -------
I was afraid that it would not be so easy. In that case I would go for adding
the query for spamc to be done only under Windows, and then allowing the build
to fail if an attempt to build spamc.exe is unsuccessful.

The build of spamc can fail for other reasons than just no cl.exe in the path.
As long as the question forces the person doing the installation to be explicit
about wanting to build it, failing with an error is acceptable behavior. The
only problem with what we have now is that it is reasonable to want to build
spamassassin in a Windows environment that is not capable of building spamc.

So given that it is difficult to gracefully complete the build when spamc.exe
fails to build, do people agree to adding a "build spamc?" query that is asked
only when building in Win32?




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541





------- Additional Comments From sidney@sidney.com 2004-06-27 15:33 -------
I am preparing a patch that

1. Adds a query to Makefile.PL that is asked only under Windows whether to build
spamc (default is yes).

2. Adds an option switch called BUILD_SPAMC to Makefile.PL which can be set to
yes or no. It only has an effect under Windows, the rationale being that there
is no reason to make building spamc optional in other environments.

3. If running under Windows and BUILD_SPAMC is no, spamc build and installation
will not appear in the generated makefile.

4. If running under Windows, if there is no spamc.exe in the spamc build
directory, all regression tests that use spamc are skipped.

5. I'm downloading over 200 megabytes of free junk from Microsoft right now just
to get the free Visual C++ 2003 command line compiler (in a 32 Mb download) and
the include files that contain winsock.h (the other 180Mb) so I can confirm that
it builds spamc ok. If it doesn't I'll make it work. Then I'll update
spamc/README.win to point people to the free compiler.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541





------- Additional Comments From sidney@sidney.com 2004-06-27 18:45 -------
Created an attachment (id=2074)
--> (http://bugzilla.spamassassin.org/attachment.cgi?id=2074&action=view)
proposed patch

This patch

1. Adds a BUILD_SPAMC option to Makefile.PL that takes values yes or no, and is
only used when building in native Windows

2. Adds a query about whether to build spamc when building in native Windows
and BUILD_SPAMC is not specified on the command line

3. Removes any attempt to build or install spamc.exe if BUILD_SPAMC is no

4. Modifies the regression tests to skip tests that use spamc if running in
native Windows and spamc.exe does not exist in its build directory

5. Documents BUILD_SPAMC and the new behavior in spamc/README.win, and provides
links to the free (as in beer) MS VC++ 2003 compiler that I have confirmed
works for building spamc

6. Adds a #pragma to suppress two warnings that spamc/replace/getopt.c
generates in the VC++ 2003 compiler.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3541] 3.0 PRE1 fails to build in pure Win32 - Due to missing cl.exe [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3541

sidney@sidney.com changed:

What |Removed |Added
----------------------------------------------------------------------------
Summary|[review] 3.0 PRE1 fails to |3.0 PRE1 fails to build in
|build in pure Win32 - Due to|pure Win32 - Due to missing
|missing cl.exe |cl.exe





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.