CountZero has asked for the wisdom of the Perl Monks concerning the following question:

Dear Brothers and Sisters in Perl!

I have recently installed ActiveState Perl 5.10 (on Windows Vista) and was now trying to get it to work with the MinGW compilers to install some modules which need xs-code.

When installing the xs-version of the Template Toolkit stash-module, I got the following errors:

In file included from Stash.xs:40: C:/data/Perl/lib/CORE/perl.h:587:24: sys/types.h: No such file or dire +ctory C:/data/Perl/lib/CORE/perl.h:598:22: stdarg.h: No such file or directo +ry C:/data/Perl/lib/CORE/perl.h:618:19: ctype.h: No such file or director +y C:/data/Perl/lib/CORE/perl.h:630:23: locale.h: No such file or directo +ry C:/data/Perl/lib/CORE/perl.h:647:20: setjmp.h: No such file or directo +ry C:/data/Perl/lib/CORE/perl.h:658:23: stdlib.h: No such file or directo +ry C:/data/Perl/lib/CORE/perl.h:965:23: stddef.h: No such file or directo +ry C:/data/Perl/lib/CORE/perl.h:973:25: string.h: No such file or directo +ry C:/data/Perl/lib/CORE/perl.h:1137:25: sys/stat.h: No such file or dire +ctory C:/data/Perl/lib/CORE/perl.h:1159:21: time.h: No such file or director +y C:/data/Perl/lib/CORE/perl.h:1180:19: errno.h: No such file or directo +ry C:/data/Perl/lib/CORE/perl.h:1773:20: limits.h: No such file or direct +ory C:/data/Perl/lib/CORE/perl.h:1776:19: float.h: No such file or directo +ry
(after which follow some more errors, but seemingly all caused by not finding these files)

On Perl 5.8 I have been able to install such modules without a hitch. Are there perhaps some development files I have to install first? I checked my Perl (and MinGW) install and indeed these files are missing.

Does anyone has any idea where to get these files and why they are no longer automatically installed as before?

Update 1: the header-files are under the MinGW distribution (thx syphilis) but CPAN + MinGW seem unable to find them.

Update 2: As syhilis pointed out I needed some patched version of MinGW to work on Windows Vista.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re: Perl 5.10 - errors when compiling xs-modules
by syphilis (Archbishop) on Dec 26, 2007 at 09:34 UTC
    indeed these files are missing

    All of those header files specified above exist in my MinGW/include folder. (And I've had no trouble compiling XS modules with ActivePerl-5.10 and MinGW.)

    Is MinGW/bin still in your path ?

    Cheers,
    Rob
      MinGW/bin is still in my path and I have even added
      C:\Data\MinGW\libexec\gcc\mingw32\3.4.5; C:\data\MinGW\include; C:\data\MinGW\lib\gcc\mingw32\3.4.5\include;
      Most of the .h are indeed in the MinGW distribution (I blame Vista's search function for not finding them before).

      But, alas, even when adding the paths to the .h-files. I keep getting the same errors. Is there perhaps some config-file in MinGW that I need to adjust and point to these folders?

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

        There are some Vista-specific issues with relation to MinGW. The solution involves installing patched versions of gcc.exe and g++.exe. Grab http://dessent.net/tmp/gcc-vista-3.4.5-20060117-1.tar.gz and unpack it in your MinGW root folder (ie Data/MinGW). It should install the patched files in all the right places.

        The fact that you found it necessary to add libexec\gcc\mingw32\3.4.5 to the path is consistent with this "Vista-specific" issue ... as also is the inability to locate the header files.

        However, if you were running perl 5.8 on Vista against this same version of MinGW, then you should have struck exactly the same problem ... but you didn't. (I'm guessing you *weren't* running 5.8 on Vista using the same version of MinGW).

        Having installed the patched files you can then remove those 3 folders that you quoted from the path.

        Cheers,
        Rob