in reply to Re: (solved) Clean smoke-test install for Inline based modules using Inline::MakeMaker
in thread Clean smoke-test install for Inline based modules using Inline::MakeMaker

Math::Prime::FastSieve still doesn't install for me. I used cpan this time and it seems to have done the right thing by all the dependencies, but the compileation of the module itself fails with:

t/01basic.t ... Microsoft (R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. C:\Perl64\bin\perl.exe C:\Perl64\lib\ExtUtils\xsubpp -typemap + "C:\Perl64\lib\ExtUtils\typemap" -typemap "C:\Perl64\cpan\build\Inli +ne-CPP-0.33-uracNj\_Inline\build\_01basic_t_5cd2\CPP.map" _01basic_t +_5cd2.xs > _01basic_t_5cd2.xsc && C:\Perl64\bin\perl.exe -MExtUtils:: +Command -e "mv" -- _01basic_t_5cd2.xsc _01basic_t_5cd2.c cl -TP -c -I"C:/Perl64/cpan/build/Inline-CPP-0.33-uracNj/t" +-nologo -GF -W3 -MD -Zi -DNDEBUG -Ox -GL -Wp64 -fp:precise -DWIN32 -D +_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIVE -DUSE_S +ITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMP +LICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -Ox -GL + -Wp64 -fp:precise -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" "-IC +:\Perl64\lib\CORE" _01basic_t_5cd2.c cl : Command line warning D9035 : option 'Wp64' has been deprecated an +d will be removed in a future release cl : Command line warning D9035 : option 'Wp64' has been deprecated an +d will be removed in a future release _01basic_t_5cd2.c _01basic_t_5cd2.xs(2) : fatal error C1083: Cannot open include file: ' +iostream.h': No such file or directory NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual S +tudio 9.0\VC\Bin\amd64\cl.EXE"' : return code '0x2' Stop. A problem was encountered while attempting to compile and install your + Inline CPP code. The command that failed was: c:\PROGRA~2\MICROS~1.0\VC\Bin\amd64\nmake.exe > out.make 2>&1 The build directory was: C:\Perl64\cpan\build\Inline-CPP-0.33-uracNj\_Inline\build\_01basic_t_5 +cd2 To debug the problem, cd to the build directory, and inspect the outpu +t files. at t/01basic.t line 64 BEGIN failed--compilation aborted at t/01basic.t line 64. t/01basic.t ... Dubious, test returned 2 (wstat 512, 0x200) Failed 10/10 subtests ...

From the error message: _01basic_t_5cd2.xs(2) : fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory and a little googling, it looks like this is a common problem centred around using: #include <iostream.h>

rather than the (MS?) preferred:<code>#include <iostream></c>


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?

  • Comment on Re^2: (solved) Clean smoke-test install for Inline based modules using Inline::MakeMaker
  • Select or Download Code

Replies are listed 'Best First'.
Re^3: (solved) Clean smoke-test install for Inline based modules using Inline::MakeMaker
by davido (Cardinal) on Dec 15, 2011 at 18:00 UTC

    Thanks for that report. That has to be an Inline::CPP issue, so a separate problem. syphilis and I thought we had solved it a couple weeks ago, but it looks like more attention is required. I'll get to work on it. You must be in the 7% that are still having problems with Inline::CPP. My goal there is to get that module to the point that it installs for all systems that Inline::C installs for (assuming they have a C++ compiler), which would be about 98%.

    More details: The problem is related to how C++ has evolved and standardized. As I'm sure you know better than I, before a standard was adopted C++ headers usually had the .h extension. More recently (which really isn't all that recent now) C++ standardized around headers without the .h extension. Inline::CPP automatically includes <iostream>, or <iostream.h>. It's supposed to detect which is required, and for the majority of systems it seems to get it right. It looks like in your case it's guessing wrong. Now that I know it's still an issue I can turn my sights on it again. It's enough of a sore-spot that I'm almost inclined to eliminate the automatic inclusion of <iostream>, but that wouldn't really solve the problem of distributing code based on Inline::CPP, as it just forces module authors to try to figure out how to decide between '.h' or no '.h' themselves.


    Dave

      The test in Inline::CPP.pm is

      my $iostream = "iostream"; # $iostream .= ".h" unless $o->{ILSM}{STD_IOSTREAM}; if($o->{ILSM}{MAKEFILE}{CC} =~ /^cl/) { $iostream .= ".h" unless $o->{ILSM}{STD_IOSTREAM}; } $o->{ILSM}{AUTO_INCLUDE} =~ s|%iostream%|$iostream|g;

      Ie. If the compiler command is 'cl' append '.h'. But, according to MS, all their compilers since VS 2003 now only supply the newer standard extension-less standard header files.

      I have Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08 for x64 which I memory serves equates to VS 2008; internal version 9; File format version 10. (Damn I wish they'd use ONE bloody name for things!), so I think the above test will need to be more selective.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?

        Thanks again.

        I'm thinking that this may better be handled by #ifdef segments, as surely I should be able to find some examples of robust solutions implementing that approach. So far, however, I seem to not be using search terms that land me on anything useful.


        Dave