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

I have installed PXPerl for Windows. I want to use CPAN to install new modules. When I try to install for example GB I get an error during make. I have installed MinGW with gcc, what else do I need to use CPAN in Windows? Anders Norway

Replies are listed 'Best First'.
Re: PXPerl CPAN windows problem
by grep (Monsignor) on Oct 04, 2006 at 20:59 UTC

      Here is the message from starting CPAN:

      C:\PXPerl\bin>cpan CPAN: File::HomeDir loaded ok Sorry, we have to rerun the configuration dialog for CPAN.pm due to the following indispensable but missing parameters: mbuild_arg, mbuild_install_arg, mbuildpl_arg The next questions deal with Module::Build support. A Build.PL is run by perl in a separate process. Likewise we run './Build' and './Build install' in separate processes. If you have any parameters you want to pass to the calls, please specify them here. Parameters for the 'perl Build.PL' command? Typical frequently used settings: --install_base /home/xxx # different installation dire +ctory Your choice: [] Parameters for the './Build' command? Setting might be: --extra_linker_flags -L/usr/foo/lib # non-standard library locati +on Your choice: [] Parameters for the './Build install' command? Typical frequently used setting: --uninst 1 # uninstall conflicting files Your choice: [] Please remember to call 'o conf commit' to make the config permanent! cpan shell -- CPAN exploration and modules installation (v1.8801) ReadLine support enabled Can't ioctl TIOCGETP: Unknown error Consider installing Term::ReadKey from CPAN site nearby at http://www.perl.com/CPAN Or use perl -MCPAN -e shell to reach CPAN. Falling back to 'stty'. If you do not want to see this warning, set PERL_READLINE_NOWA +RN in your environment. stty gjenkjennes ikke som en intern eller ekstern kommando, kjørbart program eller satsvis fil. (stty is not a command, translatio +n from Norwegian) Cannot call `stty': No such file or directory at C:\PXPerl\site\lib/Te +rm/ReadLin e/readline.pm line 1741.

      I then try to run install Term::ReadKey as the error said:

      cpan[1]> install Term::ReadKey CPAN: Storable loaded ok Going to read C:\PXPerl\.cpan\Metadata Database was generated on Wed, 04 Oct 2006 16:39:37 GMT Running install for module Term::ReadKey Running make for J/JS/JSTOWE/TermReadKey-2.30.tar.gz CPAN: checksum security checks disabled because Digest::SHA not inst +alled. Please consider installing the Digest::SHA module. Scanning cache C:\PXPerl\.cpan\build for sizes CPAN: Compress::Zlib loaded ok CPAN: Archive::Tar loaded ok TermReadKey-2.30/ TermReadKey-2.30/genchars.pl TermReadKey-2.30/Makefile.PL TermReadKey-2.30/Configure.pm TermReadKey-2.30/test.pl TermReadKey-2.30/ReadKey.pm TermReadKey-2.30/META.yml TermReadKey-2.30/ReadKey.xs TermReadKey-2.30/ppport.h TermReadKey-2.30/MANIFEST TermReadKey-2.30/README Removing previously used C:\PXPerl\.cpan\build\TermReadKey-2.30 CPAN.pm: Going to build J/JS/JSTOWE/TermReadKey-2.30.tar.gz Checking if your kit is complete... Looks good Writing Makefile for Term::ReadKey CPAN: YAML loaded ok Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. cp ReadKey.pm blib\lib\Term/ReadKey.pm AutoSplitting blib\lib\Term/ReadKey.pm (blib\lib\auto\Term\ReadKey) C:\PXPerl\bin\perl.exe -IC:\PXPerl\lib genchars.pl Writing termio/termios section of cchars.h... Done. Checking for sgtty... Sgtty NOT found. Writing sgtty section of cchars.h... Done. C:\PXPerl\bin\perl.exe C:\PXPerl\lib\ExtUtils/xsubpp -noprotot +ypes -type map C:\PXPerl\lib\ExtUtils\typemap ReadKey.xs > ReadKey.xsc && C:\PXP +erl\bin\pe rl.exe -MExtUtils::Command -e mv ReadKey.xsc ReadKey.c gcc -c -g -O3 -W3 -fno-strict-aliasing -DWIN32 -D_CONSOLE - +DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_P +ERLIO -DPE RL_MSVCRT_READFIX -IC:\mingw\include -DVERSION=\"2.30\" -DXS_VERS +ION=\"2.30 \" -DHASATTRIBUTE "-IC:\PXPerl\lib\CORE" ReadKey.c In file included from C:/PXPerl/lib/CORE/win32thread.h:4, from C:/PXPerl/lib/CORE/perl.h:2306, from ReadKey.xs:4: C:/PXPerl/lib/CORE/win32.h:243: error: redefinition of typedef 'intptr +_t' C:/mingw/include/stdint.h:60: error: previous declaration of 'intptr_t +' was here C:/PXPerl/lib/CORE/win32.h:248: error: redefinition of typedef 'uintpt +r_t' C:/mingw/include/stdint.h:61: error: previous declaration of 'uintptr_ +t' was her e NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code + '0x1' Stop. nmake -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible Failed during this command: JSTOWE/TermReadKey-2.30.tar.gz : make NO cpan[2]>

      This is why I didn't post all the messages, I figured I just forgot to install some basic stuff for compiling.

      Anders, Norway
        I figured I just forgot to install some basic stuff for compiling

        No -it's nothing you've overlooked. I've come across this problem before - I think it has been fixed in perl 5.8.8. If not, it has been fixed in bleadperl and should therefore be fixed in perl 5.8.9.

        If you go into C:/PXPerl/lib/CORE/win32.h you should be able to find the following block of code:
        #ifndef _INTPTR_T_DEFINED typedef int intptr_t; # define _INTPTR_T_DEFINED #endif #ifndef _UINTPTR_T_DEFINED typedef unsigned int uintptr_t; # define _UINTPTR_T_DEFINED #endif

        Just before that above code, insert:
        #ifdef _STDINT_H #ifndef _INTPTR_T_DEFINED #define _INTPTR_T_DEFINED #endif #ifndef _UINTPTR_T_DEFINED #define _UINTPTR_T_DEFINED #endif #endif

        And that should fix that problem for you. Probably best to first make a backup copy of win32.h in case you mess something up with the copy'n'paste :-)

        I think the blame lies with win32.h - though it's interesting to note that this problem would not arise if ExtUtils::ParseXS did not insist on inserting the "-IC:\mingw\include" switch.

        Cheers,
        Rob
Re: PXPerl CPAN windows problem
by Khen1950fx (Canon) on Oct 04, 2006 at 20:16 UTC
    You're probably missing nmake15.exe. Here's a link to a little intro:

    nmake

      I have PXPerl, not ActiveState so nmake was installed with Perl. Any other ideas
Re: PXPerl CPAN windows problem
by xdg (Monsignor) on Oct 05, 2006 at 11:07 UTC
    I have installed PXPerl for Windows

    Given the problems you've experienced, as shown in the various compiler logs, I wonder whether you might want to try Strawberry Perl instead. Is there a specific reason that you need to use PXPerl?

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

      On the perl.com download page there was two choices, ActiveState, the first downloader I dowloaded didn't work so then I decided to try PXPerl which was the other choice. As long as I can download new modules and compile them I am happy. So Strawberry Perl is better then?

      Anders, Norway

        So Strawberry Perl is better then?

        Well, it has more active development and a few more things "just work" as result. You can find a lot of information on it and other Win32 Perl distributions at win32.perl.org.

        -xdg

        Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.