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

Hi

I have perl installed in my Windows 7, 64 bits, and it runs great. I also have no problem regarding adding new modules, even from cpan. However, when for some reason the module needs some kind of compilation (I think) I get a "build not ok" at the end. So the c:\perl\bin\perl.exe ./BUILD.pl fails. That is, the modules fails in the compilation of the C code probably. Does anyone knows how to fix this?

Best regards

Replies are listed 'Best First'.
Re: Modules in Windows
by stevieb (Canon) on Nov 17, 2018 at 15:55 UTC

    "Probably" doesn't really help here. Pasting in the error message in <code></code> tags would.

    Either way, if it is a compilation issue, it's likely the necessary tools weren't installed, or at least not in your PATH environment variable correctly.

    Please let us know which Perl installation you went with. Strawberry Perl should install everything you need by default. Also, at the command line, type echo %PATH% and paste (again, in code tags) the output from that command.

Re: Modules in Windows
by Anonymous Monk on Nov 17, 2018 at 15:52 UTC
    Does anyone knows how to fix this?

    no, because your question is incomplete

Re: Modules in Windows
by thechartist (Monk) on Nov 21, 2018 at 18:24 UTC

    This would be hard to answer without knowing more about the Perl distribution you are using. Are you using a pre-compiled Perl install (ie. Strawberry or ActiveState? )

    Next, what C compiler are you using? I know for a fact that GCC ships with the Strawberry Perl version for Windows. I do not know what ActiveState uses, or if they ship a C compiler at all. I suspect they do (you need it for most CPAN modules), but I cannot say for certain.

    Assuming your Perl environment is OK, the next thing to look at might be the module itself. The C code might not be written in a portable fashion, or it might be making assumptions about Windows systems that no longer hold true. This can get complicated really quick.

    There should be a log file that you can check to see what failed, and when. I believe it is in a cpan directory if you are using Strawberry Perl, but I cannot recall off the top of my head. That will give you detailed info you can post here to get more assistance.