Skip Menu |
 

This queue is for tickets about the Template-Toolkit CPAN distribution.

Report information
The Basics
Id: 20291
Status: resolved
Priority: 0/
Queue: Template-Toolkit

People
Owner: Nobody in particular
Requestors: an205 [...] list.ru
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 2.15
Fixed in: (no value)



Subject: TT2 2.15 Compilation fails under VC++ 6.0 SP6
Download (untitled) / with headers
text/plain 858b
It seems to be VC++ can't get through this tricky macro definition with '...': #define debug(format, ...) so that nmake fails. Stash.c Stash.xs(51) : error C2010: '.' : unexpected in macro formal parameter list Stash.xs(51) : error C2010: '.' : unexpected in macro formal parameter list Stash.xs(51) : error C2010: '.' : unexpected in macro formal parameter list Stash.xs(51) : error C2010: ')' : unexpected in macro formal parameter list Stash.xs(197) : warning C4002: too many actual parameters for macro 'debug' Stash.xs(349) : warning C4013: 'snprintf' undefined; assuming extern returning int Stash.xs(468) : warning C4002: too many actual parameters for macro 'debug' NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\VC98\bin\NMAKE.EXE"' : return code '0x2' Stop.
From: Alexandr Ciornii <alexchorny [...] gmail.com>
Download (untitled) / with headers
text/plain 522b
Fixed several bugs, including this. Stash.xs.patch - variadic macro; snprintf is called _snprintf on MSVC and Borland C++ Makefile.PL.patch - print correct `make` name even in case of Vanilla Perl; license Stash.xs.patch includes RT #20506 patch. Attached is distribution also with RT #20488 patch. With all this, patched version compiles and passes tests under MSVC. Andy: It is ready for PAUSE upload after 'META.yml' regeneration, 'Changes' update and version increment. ------- Alexandr Ciornii, http://chorny.net
Download Template-Toolkit-2.15.tar.gz
application/x-gzip 759.3k

Message body not shown because it is not plain text.

Download Stash.xs.patch
text/x-diff 844b
--- Stash.xs.dist Mon Nov 6 13:47:48 2006 +++ Stash.xs Mon Nov 6 12:49:04 2006 @@ -45,12 +45,22 @@ } #endif +#if defined(__BORLANDC__) || defined(_MSC_VER) +#define snprintf _snprintf +#endif + #if 0 #define debug(format, ...) fprintf (stderr, format, ## __VA_ARGS__) #else + +#if defined(_MSC_VER) +#define debug() +#else #define debug(format, ...) #endif +#endif + #define TT_STASH_PKG "Template::Stash::XS" #define TT_LIST_OPS "Template::Stash::LIST_OPS" #define TT_HASH_OPS "Template::Stash::HASH_OPS" @@ -499,7 +509,7 @@ } /* drop-through if not an object or method not found */ - switch SvTYPE(SvRV(root)) { + switch (SvTYPE(SvRV(root))) { case SVt_PVHV: /* HASH */ roothv = (HV *) SvRV(root);
Download Makefile.PL.patch
text/x-diff 813b
--- Makefile.PL.dist Mon Nov 6 14:28:53 2006 +++ Makefile.PL Mon Nov 6 14:20:09 2006 @@ -22,19 +22,18 @@ # check O/S to set sensible defaults my ($WIN32, $FLAVOUR, $PREFIX, $IMAGES, $MAKE); +$MAKE=$Config{'make'}; if ($^O eq 'MSWin32') { # any others also? $WIN32 = 1; $FLAVOUR = 'Win32'; $PREFIX = 'C:/Program Files/Template Toolkit 2'; $IMAGES = '/tt2/images'; - $MAKE = 'nmake'; } else { $WIN32 = 0; $FLAVOUR = 'Unix'; $PREFIX = '/usr/local/tt2'; $IMAGES = '/tt2/images'; - $MAKE = 'make'; } @@ -266,6 +265,9 @@ $opts{ ABSTRACT } = 'comprehensive template processing system', } +if ($ExtUtils::MakeMaker::VERSION ge '6.30_00') { + $opts{'LICENSE' } = 'perl'; +} WriteMakefile( %opts );
From: orderthruchaos [...] gmail.com
Download (untitled) / with headers
text/plain 863b
Sun's C compiler had a similar issue, so you may want to change that to: #if defined(_MSC_VER) || defined(__SUNPRO_C) #define debug() #else Warnings are generated about argument mis-matches... but all tests that weren't skipped passed as before. On Mon Nov 06 08:47:50 2006, alexchorny@gmail.com wrote: Show quoted text
> Fixed several bugs, including this. > Stash.xs.patch - variadic macro; snprintf is called _snprintf on MSVC > and Borland C++ > Makefile.PL.patch - print correct `make` name even in case of Vanilla > Perl; license > > Stash.xs.patch includes RT #20506 patch. > > Attached is distribution also with RT #20488 patch. With all this, > patched version compiles and passes tests under MSVC. > > Andy: It is ready for PAUSE upload after 'META.yml' regeneration, > 'Changes' update and version increment. > > ------- > Alexandr Ciornii, http://chorny.net
From: SMPETERS [...] cpan.org
Download (untitled) / with headers
text/plain 892b
On Mon Nov 06 08:47:50 2006, alexchorny@gmail.com wrote: Show quoted text
> Fixed several bugs, including this. > Stash.xs.patch - variadic macro; snprintf is called _snprintf on MSVC > and Borland C++ > Makefile.PL.patch - print correct `make` name even in case of Vanilla > Perl; license > > Stash.xs.patch includes RT #20506 patch. > > Attached is distribution also with RT #20488 patch. With all this, > patched version compiles and passes tests under MSVC. > > Andy: It is ready for PAUSE upload after 'META.yml' regeneration, > 'Changes' update and version increment. > > ------- > Alexandr Ciornii, http://chorny.net
I don't belive that this patch is needed. The Perl core is smoke tested daily with both of the above compilers and snprintf() has replaced sprintf() throughout. Can you try again with an updated ppport.h and report the results here? Thanks, Steve Peters steve@fisharerojo.org
From: ISHIGAKI [...] cpan.org
Download (untitled) / with headers
text/plain 1.3k
On 木曜日 2月 08 21:02:08 2007, SMPETERS wrote: Show quoted text
> On Mon Nov 06 08:47:50 2006, alexchorny@gmail.com wrote:
> > Fixed several bugs, including this. > > Stash.xs.patch - variadic macro; snprintf is called _snprintf on
MSVC Show quoted text
> > and Borland C++ > > Makefile.PL.patch - print correct `make` name even in case of
Vanilla Show quoted text
> > Perl; license > > > > Stash.xs.patch includes RT #20506 patch. > > > > Attached is distribution also with RT #20488 patch. With all this, > > patched version compiles and passes tests under MSVC. > > > > Andy: It is ready for PAUSE upload after 'META.yml' regeneration, > > 'Changes' update and version increment. > > > > ------- > > Alexandr Ciornii, http://chorny.net
> > > I don't belive that this patch is needed. The Perl core is smoke
tested Show quoted text
> daily with both of the above compilers and snprintf() has replaced > sprintf() throughout. Can you try again with an updated ppport.h and > report the results here? > > Thanks, > > Steve Peters > steve@fisharerojo.org
With better Devel::PPPort, debug() macro failure remains (and thus Stash.c can't compile under VC6). And if you really want TT to have better ppport.h support, you need to add another prereq_pm, Devel::PPPort => 3.09, though I doubt you might want to do that, especially because it doesn't fix all of the problems. I'd like his previous patch to be applied.
Download (untitled) / with headers
text/plain 1.5k
On 火曜日 2月 13 01:21:47 2007, ISHIGAKI wrote: Show quoted text
> On 木曜日 2月 08 21:02:08 2007, SMPETERS wrote:
> > On Mon Nov 06 08:47:50 2006, alexchorny@gmail.com wrote:
> > > Fixed several bugs, including this. > > > Stash.xs.patch - variadic macro; snprintf is called _snprintf on
> MSVC
> > > and Borland C++ > > > Makefile.PL.patch - print correct `make` name even in case of
> Vanilla
> > > Perl; license > > > > > > Stash.xs.patch includes RT #20506 patch. > > > > > > Attached is distribution also with RT #20488 patch. With all this, > > > patched version compiles and passes tests under MSVC. > > > > > > Andy: It is ready for PAUSE upload after 'META.yml' regeneration, > > > 'Changes' update and version increment. > > > > > > ------- > > > Alexandr Ciornii, http://chorny.net
> > > > > > I don't belive that this patch is needed. The Perl core is smoke
> tested
> > daily with both of the above compilers and snprintf() has replaced > > sprintf() throughout. Can you try again with an updated ppport.h
and Show quoted text
> > report the results here? > > > > Thanks, > > > > Steve Peters > > steve@fisharerojo.org
> > With better Devel::PPPort, debug() macro failure remains (and thus > Stash.c can't compile under VC6). And if you really want TT to have > better ppport.h support, you need to add another prereq_pm, > Devel::PPPort => 3.09, though I doubt you might want to do that, > especially because it doesn't fix all of the problems. I'd like his > previous patch to be applied.
Self reply: sorry, forget about prereq_pm addition. replacing bundled ppport.h surely makes sense.
Download (untitled) / with headers
text/plain 146b
All patches applied. Some of these issues had been fixed in an earlier release, but hopefully this will clean everything up for v2.20. Cheers A


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.