in reply to Re: PXPerl CPAN windows problem
in thread PXPerl CPAN windows problem

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

Replies are listed 'Best First'.
Re^3: PXPerl CPAN windows problem
by syphilis (Archbishop) on Oct 05, 2006 at 08:38 UTC
    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
      Thanks for the help, it seems that it got a little further, but not finished. Now I ran install Bundle::CPAN because some of the modules are missing. This is the end of the messages, the rest I didn'y get:

      Thanks for all the help so far

      Anders, Norway

      Edited by planetscape - added readmore tags

        Have a look at Jacques's Cheat Sheet for a way to capture all that nasty output:

        make test > test.txt 2>&1

        Usually when I'm at the point you're at, I try downloading and manually installing the problem modules. If nothing else, that allows you to break the problem down into smaller pieces, isolate the real issues, and capture a manageable amount of information to work with, so you don't get feeling so overwhelmed.

        I.e., download http://search.cpan.org/CPAN/authors/id/M/MS/MSHELOR/Digest-SHA-5.43.tar.gz, then:

        perl makefile.pl make make test > test.txt 2>&1 make install

        Good luck,

        planetscape