Skip Menu |

This queue is for tickets about the Math-Random-MT CPAN distribution.

Report information
The Basics
Id: 74984
Status: resolved
Priority: 0/
Queue: Math-Random-MT

People
Owner: Nobody in particular
Requestors: florent.angly [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.13
Fixed in: (no value)



Subject: Failed tests with nmake.exe on Windows platform
There is a fatal error during the test suite of Math::Random::MT version 1.13 on Windows platforms that use nmake.exe (MS visual studio 10): http://www.cpantesters.org/cpan/report/1b03bcc4-cb81-1016-8363-f0a105085451 http://www.cpantesters.org/cpan/report/615d17ac-dce9-1014-914e-989905085451 I think that line 4 of mt.h needs to be changed. It reads: #if defined(_MSC_VER) && (_MSC_VER <= 1300) Version 10 of Visual Studio has _MSC_VER set to 1600 (http://msdn.microsoft.com/en-us/library/b0084kay.aspx). So maybe this is an approriate fix? #if defined(_MSC_VER) && (_MSC_VER <= 1600) But really, is there any reason not to simply write this? #if defined(_MSC_VER) Florent
I can now confirm that dmake works fine, but not nmake. Show quoted text
> So maybe this is an appropriate fix? > #if defined(_MSC_VER) && (_MSC_VER <= 1600) > > But really, is there any reason not to simply write this? > #if defined(_MSC_VER)
Both solutions seem to work. I committed the second one to the git repository. However, there are still other issues that prevent compilation of the module with nmake: Show quoted text
>nmake
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved. cp MT.pm blib\lib\Math\Random\MT.pm C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils\xsubpp -typemap C:\Perl\lib\Ext Utils\typemap -typemap typemap MT.xs > MT.xsc && C:\Perl\bin\perl.exe -MExtUtils: :Command -e "mv" -- MT.xsc MT.c cl -c -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRI CT -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPL ICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -MD -Zi -DNDEBUG -O1 -DVERSION=\"1.13 \" -DXS_VERSION=\"1.13\" "-IC:\Perl\lib\CORE" MT.c MT.c MT.xs(38) : error C2275: 'U32' : illegal use of this type as an expression c:\perl\lib\core\handy.h(181) : see declaration of 'U32' MT.xs(38) : error C2065: 'array' : undeclared identifier MT.xs(39) : error C2275: 'U32' : illegal use of this type as an expression c:\perl\lib\core\handy.h(181) : see declaration of 'U32' MT.xs(39) : error C2146: syntax error : missing ';' before identifier 'ix_array' MT.xs(39) : error C2065: 'ix_array' : undeclared identifier MT.xs(41) : error C2065: 'array' : undeclared identifier MT.xs(41) : error C2065: 'ix_array' : undeclared identifier MT.xs(41) : error C2109: subscript requires array or pointer type MT.xs(41) : error C2065: 'ix_array' : undeclared identifier MT.xs(41) : error C2065: 'ix_array' : undeclared identifier MT.xs(41) : error C2065: 'ix_array' : undeclared identifier MT.xs(42) : error C2065: 'ix_array' : undeclared identifier MT.xs(44) : error C2065: 'array' : undeclared identifier MT.xs(44) : error C2065: 'ix_array' : undeclared identifier NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\V C\BIN\cl.EXE"' : return code '0x2' Stop.
Show quoted text
> MT.xs(38) : error C2275: 'U32' : illegal use of this type as an expression > c:\perl\lib\core\handy.h(181) : see declaration of 'U32'
I am not quite sure what causes this issue at the moment, so any help is appreciated. Thanks, Florent PS/ My environment is Windows 7, with Activestate perl 5.14 (32 bits) and Microsoft Visual Express C++ 2010 (which provide nmake).
Compilation should now work perfectly with nmake.