Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Missing nmake - 64bit, Windows 7

by heliozoan (Initiate)
on Mar 01, 2011 at 21:29 UTC ( #890830=perlquestion: print w/replies, xml ) Need Help??
heliozoan has asked for the wisdom of the Perl Monks concerning the following question:

Dear Perl users, I am struggling with a re-installation of Perl modules on a 64-bit windows 7 machine. I have installed the latest Active Perl and that seems to be working fine, however when I tried to install various modules using the cpan shell I get the error: "It looks like you don't have a C compiler and make utility installed. Trying to install dmake and the MinGW gcc compiler using the PPM." then.... "ppm.bat install failed: Can't find any package that provides MinGW" then.... "It looks like the installation of dmake and MinGW has failed. You will not be able run Makefile commands or compile C extension code. Please check your internet connection and your proxy settings" So, are there any suggestions for installing a 'make utility'? If so, how? Best, h

Replies are listed 'Best First'.
Re: Missing nmake - 64bit, Windows 7
by cjb (Friar) on Mar 01, 2011 at 22:09 UTC

    You could try Strawberry Perl, which I've have plenty of success with on Windows. Or you could look at using ppm to install the modules rather than cpan

      I've tried Strawberry, which I like a lot. Installation is simple and many modules are already included. Ultimately I need to install BioPerl and so far I've been unable to get that to work under Strawberry. So, I've reverted to ActiveState. The BioPerl site has very clear instructions for installation under ActiveState however I ran into the problem that I described in my original post. I'd prefer to work with Strawberry...there's a beta of Strawberry which includes BioPerl so I may have to go with that. Thanks!

        It's worth noting that both Strawberry Perl and ActiveState perl can install modules using cpan and PPM. The advantage with Strawberry Perl is that it already ships with MinGW and build tools, with ActiveState you have to install these via PPM: c:\ppm install mingw. See also 823275 if you're into BioPerl.

Re: Missing nmake - 64bit, Windows 7
by Eliya (Vicar) on Mar 01, 2011 at 22:14 UTC
      Thanks, I did see that thread previously, but the last comment was vague about finding a better version of nmake. Cheers!
Re: Missing nmake - 64bit, Windows 7
by cavac (Deacon) on Mar 01, 2011 at 22:30 UTC

    I'm an ActivePerl User too. I haven't done much compiling on Windows lately, so i'm writing this from what i think i remember ;-)

    The most likely problem with your MinGW installation ist that the binaries are not in the PATH variable. You can either set it temporarly in the batch file or system wide in the system properties.

    If that doesn't work, download the MinGW installer from their homepage and install that one.

    Also, i had some trouble getting the default dmake to work (on XP). You can install Microsoft's nmake.exe somewhere in your PATH, for example download the free "Visual C++ Express" from Microsoft. In this case you probably also have to set the correct "o conf" variable in the CPAN shell. This is because Makemaker has to create slightly different Makefiles and also call a different executable.

    Note: Changing the system wide PATH (by hand or by some software installer) does not propagate to already open cmd.exe shells. You need to close and reopen them.
      Thanks for the information, I will give it a try! Cheers
Re: Missing nmake - 64bit, Windows 7
by syphilis (Chancellor) on Mar 02, 2011 at 07:04 UTC
    I assume it's a 64-bit build of ActivePerl that you're using - one where perl -V:ivsize reports 8. (Note that 32-bit builds of perl, where the ivsize is 4, will also run quite well on 64-bit Windows.)

    If my assumption is correct, then one option is:
    a) Install dmake from CPAN, and add the location of dmake.exe to your path;
    b) Download this mingw port of the gcc compiler, unzip it and add the bin folder to your path;
    c) Install ExtUtils::FakeConfig from CPAN (using your usual procedure for building and installing modules);
    d) set the PERL5OPT environment variable to -MConfig_m

    You should then be right to go with building modules for your x64 ActivePerl, using dmake and MinGW, by simply going about the task in the usual way - either by running cpan -i ... or by running perl Makefile.PL, etc.

    Update: One can, of course, adopt the same approach with 32-bit builds of ActivePerl and MinGW - but ActiveState's seamless integration of MinGW for the 32-bit perls is so good that it makes the use of EU::FC unnecessary (imo).


      Without -MConfig_m:

      C:\Progs\mingw64\bin\g++.exe -o blib\arch\auto\DBD\SQLite\SQLite.dll - +Wl,--base-file -Wl,dll.base -mdll -L"C:\Progs\perl5121-ap1201\lib\COR +E" SQLite.o dbdimp.o sqlite3.o -Wl,--image-base,0x27340000 C +:\Progs\perl5121-ap1201\lib\CORE\perl512.lib -lkernel32 -luser32 -lgd +i32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -ln +etapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 - +lcomctl32 -lbufferoverflowU -lmsvcrt dll.exp c:/progs/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.4.5/../../../../x +86_64-w64-mingw32/bin/ld.exe: cannot find -lbufferoverflowU

      With -MConfig_m, it doesn't even get that far:

      C:\Progs\perl5121-ap1201\bin\perl.exe -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"DBD::SQLite\", 'DLBASE' => 'SQLite', 'DL +_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => [] +);" dmake: Error: -- `C:\Progs\perl5121-ap1201\lib\CORE\libperl510.a' not + found, and can't be made

      5.10? This is 5.12!

        5.10? This is 5.12!

        The module probably hasn't been updated since the release of 5.12 - certainly there's no spec/ap_mingw_512.txt present in the distro.

        I'd like to send the author some patches to get this module up to date ... it's just a matter of finding the time.


        In $active_perl\site\lib\, change




        Then, it works with -MConfig_m.

        Note: will be write-protected, so you'll have to change its attributes to edit it.

      Hi Rob, Yes, it's a 64-bit build of ActivePerl. I will try your suggestions. Cheers!
        Yes, it's a 64-bit build of ActivePerl

        If the version of perl is later than 5.10, then there might be some (hopefully simple) hacking needed .... I'm not sure yet.
        If you strike trouble, please feel free to follow it up here.

        With 64-bit builds of ActivePerl, some of the other suggestions mentioned earlier in this thread won't work - eg you won't be able to 'ppm install MinGW'.

Re: Missing nmake - 64bit, Windows 7
by Anonymous Monk on Mar 01, 2011 at 21:34 UTC
    "So, are there any suggestions for installing a 'make utility'?"

    Yes. Use Linux. Use UNIX. Use BDS. Don't use Windows.
      I know, I know, Linux is preferred. Thanks.
        hey, were you able to figure this out? I am just learning perl, and like you I need some Bioperl modules for writing a script. I was able to install Bioperl with built in modules, despite getting the error " You don't have aC compiler in your path and install MinGW." But when I try to install any other Bioperl modules, they are never installed because I do not have an nmake on my windows, The nmake15.exe on bioperl website does not run on 64 bit, and I don't know where else to get it. But you had the exact same problem as mine, so I would be very happy if you tell me how you solved it. Thanks! :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://890830]
Approved by chrestomanci
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2018-05-27 00:35 GMT
Find Nodes?
    Voting Booth?