Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

IO::Pty with Cygwin - can't install

by azredwing (Sexton)
on Aug 27, 2010 at 19:34 UTC ( #857756=perlquestion: print w/ replies, xml ) Need Help??
azredwing has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I'm trying to install IO::Pty under Cygwin, since Windows doesn't support ptys but it's doable with Cygwin. Seems to go okay, but the installation for IO::Tty (a prereq) gets stuck trying to open /dev/ttyN (N has ranged from 0-3 so far):

CPAN: Storable loaded ok (v2.20) Going to read '/cygdrive/c/Documents and Settings/Administrator/My Doc +uments/.cpan/Metadata' Database was generated on Thu, 26 Aug 2010 21:30:56 GMT Running install for module 'IO::Pty' CPAN: YAML loaded ok (v0.71) Running make for R/RG/RGIERSIG/IO-Tty-1.08.tar.gz CPAN: Digest::SHA loaded ok (v5.47) CPAN: Compress::Zlib loaded ok (v2.024) Checksum for /cygdrive/c/Documents and Settings/Administrator/My Docum +ents/.cpan/sources/authors/id/R/RG/RGIERSIG/IO-Tty-1.08.tar.gz ok CPAN: Archive::Tar loaded ok (v1.52) IO-Tty-1.08/ IO-Tty-1.08/Makefile.PL IO-Tty-1.08/README IO-Tty-1.08/try IO-Tty-1.08/test.pl IO-Tty-1.08/META.yml IO-Tty-1.08/MANIFEST IO-Tty-1.08/Pty.pm IO-Tty-1.08/ChangeLog IO-Tty-1.08/Tty.pm IO-Tty-1.08/Tty.xs CPAN: File::Temp loaded ok (v0.22) CPAN.pm: Going to build R/RG/RGIERSIG/IO-Tty-1.08.tar.gz Now let's see what we can find out about your system (logfiles of failing tests are available in the conf/ dir)... Looking for _getpty()...... not found. Looking for getpt()........ not found. Looking for grantpt()...... FOUND. Looking for openpty()...... FOUND. Looking for posix_openpt(). FOUND. Looking for ptsname()...... FOUND. Looking for ptsname_r().... not found. Looking for sigaction().... FOUND. Looking for strlcpy()...... FOUND. Looking for ttyname()...... FOUND. Looking for unlockpt()..... FOUND. Looking for libutil.h...... not found. Looking for pty.h.......... FOUND. Looking for sys/pty.h...... not found. Looking for sys/ptyio.h.... not found. Looking for sys/stropts.h.. not found. Looking for termio.h....... FOUND. Looking for termios.h...... FOUND. Looking for util.h......... not found. Checking which symbols compile OK... (sorry for the tedious check, but some systems have not too clean header files, to say the least; '+' means OK, '-' means not defined and '*' has compile problems...) +B0 +B110 +B115200 +B1200 +B134 +B150 -B153600 +B1800 +B19200 +B200 +B +230400 +B2400 +B300 -B307200 +B38400 +B460800 +B4800 +B50 +B57600 +B6 +00 +B75 -B76800 +B9600 +BRKINT +BS0 +BS1 +BSDLY +CBAUD -CBAUDEXT -CBR +K -CCTS_OFLOW +CDEL +CDSUSP +CEOF +CEOL +CEOL2 +CEOT +CERASE +CESC +C +FLUSH -CIBAUD -CIBAUDEXT +CINTR +CKILL +CLNEXT +CLOCAL -CNSWTCH +CNUL + +CQUIT +CR0 +CR1 +CR2 +CR3 +CRDLY +CREAD +CRPRNT +CRTSCTS +CRTSXOFF +-CRTS_IFLOW +CS5 +CS6 +CS7 +CS8 +CSIZE +CSTART +CSTOP +CSTOPB +CSUSP ++CSWTCH +CWERASE -DEFECHO -DIOC -DIOCGETP -DIOCSETP -DOSMODE +ECHO +E +CHOCTL +ECHOE +ECHOK +ECHOKE +ECHONL -ECHOPRT -EXTA -EXTB +FF0 +FF1 + +FFDLY -FIORDCHK +FLUSHO +HUPCL +ICANON +ICRNL +IEXTEN +IGNBRK +IGNCR ++IGNPAR +IMAXBEL +INLCR +INPCK +ISIG +ISTRIP +IUCLC +IXANY +IXOFF +IX +ON -KBENABLED -LDCHG -LDCLOSE -LDDMAP -LDEMAP -LDGETT -LDGMAP -LDIOC +-LDNMAP -LDOPEN -LDSETT -LDSMAP -LOBLK +NCCS +NL0 +NL1 +NLDLY +NOFLSH + +OCRNL +OFDEL +OFILL +OLCUC +ONLCR +ONLRET +ONOCR +OPOST -PAGEOUT +P +ARENB -PAREXT +PARMRK +PARODD -PENDIN -RCV1EN -RTS_TOG +TAB0 +TAB1 +T +AB2 +TAB3 +TABDLY -TCDSET +TCFLSH +TCGETA -TCGETS +TCIFLUSH +TCIOFF + +TCIOFLUSH +TCION +TCOFLUSH +TCOOFF +TCOON +TCSADRAIN +TCSAFLUSH +TCSA +NOW -TCSBRK +TCSETA +TCSETAF +TCSETAW -TCSETCTTY -TCSETS -TCSETSF -TC +SETSW -TCXONC -TERM_D40 -TERM_D42 -TERM_H45 -TERM_NONE -TERM_TEC -TER +M_TEX -TERM_V10 -TERM_V61 +TIOCCBRK -TIOCCDTR -TIOCCONS -TIOCEXCL -TI +OCFLUSH -TIOCGETC -TIOCGETD -TIOCGETP -TIOCGLTC -TIOCGPGRP -TIOCGSID +-TIOCGSOFTCAR +TIOCGWINSZ -TIOCHPCL -TIOCKBOF -TIOCKBON -TIOCLBIC -TI +OCLBIS -TIOCLGET -TIOCLSET +TIOCMBIC +TIOCMBIS +TIOCMGET +TIOCMSET +T +IOCM_CAR +TIOCM_CD +TIOCM_CTS +TIOCM_DSR +TIOCM_DTR -TIOCM_LE +TIOCM_ +RI +TIOCM_RNG +TIOCM_RTS -TIOCM_SR -TIOCM_ST -TIOCNOTTY -TIOCNXCL -TI +OCOUTQ -TIOCREMOTE +TIOCSBRK -TIOCSCTTY -TIOCSDTR -TIOCSETC -TIOCSETD + -TIOCSETN -TIOCSETP -TIOCSIGNAL -TIOCSLTC -TIOCSPGRP -TIOCSSID -TIOC +SSOFTCAR -TIOCSTART -TIOCSTI -TIOCSTOP +TIOCSWINSZ -TM_ANL -TM_CECHO +-TM_CINVIS -TM_LCF -TM_NONE -TM_SET -TM_SNL +TOSTOP -VCEOF -VCEOL +VD +ISCARD -VDSUSP +VEOF +VEOL +VEOL2 +VERASE +VINTR +VKILL +VLNEXT +VMIN + +VQUIT +VREPRINT +VSTART +VSTOP +VSUSP -VSWTCH +VT0 +VT1 +VTDLY +VTI +ME +VWERASE -WRAP -XCASE -XCLUDE -XMT1EN +XTABS >>> Configuration looks good! <<< Writing IO::Tty::Constant.pm... DEFINE = -DHAVE_CYGWIN -DHAVE_DEV_PTMX -DHAVE_GRANTPT -DHAVE_OPENPTY - +DHAVE_POSIX_OPENPT -DHAVE_PTSNAME -DHAVE_PTY_H -DHAVE_SIGACTION -DHAV +E_STRLCPY -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAVE_UNLO +CKPT Checking if your kit is complete... Looks good Writing Makefile for IO::Tty cp Tty.pm blib/lib/IO/Tty.pm cp Tty/Constant.pm blib/lib/IO/Tty/Constant.pm cp Pty.pm blib/lib/IO/Pty.pm /usr/bin/perl.exe /usr/lib/perl5/5.10/ExtUtils/xsubpp -typemap /usr/l +ib/perl5/5.10/ExtUtils/typemap Tty.xs > Tty.xsc && mv Tty.xsc Tty.c gcc -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing + -pipe -fstack-protector -I/usr/local/include -DUSEIMPORTLIB -O3 -D +VERSION=\"1.08\" -DXS_VERSION=\"1.08\" "-I/usr/lib/perl5/5.10/i686-c +ygwin/CORE" -DHAVE_CYGWIN -DHAVE_DEV_PTMX -DHAVE_GRANTPT -DHAVE_OPEN +PTY -DHAVE_POSIX_OPENPT -DHAVE_PTSNAME -DHAVE_PTY_H -DHAVE_SIGACTION +-DHAVE_STRLCPY -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAVE +_UNLOCKPT Tty.c rm -f blib/arch/auto/IO/Tty/Tty.dll g++ --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,- +-stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib -fstack- +protector Tty.o -o blib/arch/auto/IO/Tty/Tty.dll \ /usr/lib/perl5/5.10/i686-cygwin/CORE/cygperl5_10.dll -lutil + \ chmod 755 blib/arch/auto/IO/Tty/Tty.dll test -s Tty.bs && cp Tty.bs blib/arch/auto/IO/Tty/Tty.bs && \ chmod 644 blib/arch/auto/IO/Tty/Tty.bs Manifying blib/man3/IO.Tty.Constant.3pm Manifying blib/man3/IO.Tty.3pm Manifying blib/man3/IO.Pty.3pm RGIERSIG/IO-Tty-1.08.tar.gz make -- OK Running make test PERL_DL_NONLAZY=1 /usr/bin/perl.exe "-Iblib/lib" "-Iblib/arch" test.pl 1..4 Configuration: -DHAVE_CYGWIN -DHAVE_DEV_PTMX -DHAVE_GRANTPT -DHAVE_OPE +NPTY -DHAVE_POSIX_OPENPT -DHAVE_PTSNAME -DHAVE_PTY_H -DHAVE_SIGACTION + -DHAVE_STRLCPY -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAV +E_UNLOCKPT Checking for appropriate ioctls: Checking that returned fd's don't clash with stdin/out/err... trying posix_openpt()... trying grantpt()... trying unlockpt()... trying ptsname()... trying to open /dev/tty4...
Is there something else I need to install to do this?? Something Cygwin related? I'm at a loss as to why this won't install.

Comment on IO::Pty with Cygwin - can't install
Download Code
Re: IO::Pty with Cygwin - can't install
by Anonymous Monk on Aug 28, 2010 at 03:18 UTC
    /dev/tty is a prerequisite, and your cygwin should have it
Re: IO::Pty with Cygwin - can't install
by syphilis (Canon) on Aug 28, 2010 at 06:48 UTC
    Can't really help - IO-Tty-1.08 installs fine for me on Cygwin-1.7.5, perl-5.10.1:
    1..4 Configuration: -DHAVE_CYGWIN -DHAVE_DEV_PTMX -DHAVE_GRANTPT -DHAVE_OPE +NPTY -DHAVE_POSIX_OPENPT -DHAVE_PTSNAME -DHAVE_PTY_H -DHAVE_SIGACTION + -DHAVE_STRLCPY -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAV +E_UNLOCKPT Checking for appropriate ioctls: Checking that returned fd's don't clash with stdin/out/err... trying posix_openpt()... trying grantpt()... trying unlockpt()... trying ptsname()... trying to open /dev/tty0... ok 1 Checking if child gets pty as controlling terminal... trying posix_openpt()... trying grantpt()... trying unlockpt()... trying ptsname()... trying to open /dev/tty0... ok 2 gimme on /dev/tty: seems OK! back on STDOUT: SEEMS OK! ok 3 Checking basic functionality and how your ptys handle large strings... This test may hang on certain systems, even though it is protected by alarm(). If the counter stops, try Ctrl-C, the test should conti +nue. trying posix_openpt()... trying grantpt()... trying unlockpt()... trying ptsname()... trying to open /dev/tty0... isatty($master): YES isatty($slave): YES Child PID = 2016 Good, your raw ptys can handle at least 512 bytes at once. ok 4 Passed 4 of 4 tests.
    Cheers,
    Rob
      Thanks for this, Rob. I'm running Cygwin 1.7.6-1 and it doesn't want to go. Did the installation stall for you at 'opening /dev/tty1', and if so, how long did it take to get past that?

      I also couldn't find 1.7.5 online; newest version is 1.7.6 and there's no link on the Cygwin site to download previous versions. Do you think you could provide the setup.exe to me?

        Actually, no worries. I just installed manually instead of from the command line and skipped the make test. I ran my script that uses IO::Pty on Cygwin and it works perfectly. Not sure why it couldn't do make test.
      Make sure Perl in Cygwin isn't blocked by your windows firewall.
Re: IO::Pty with Cygwin - can't install
by newman64 (Initiate) on Aug 17, 2011 at 07:14 UTC
    Hi all, apologies in advance for any errors/omissions -this is my first perl question ever :)) I want to deploy cygwin with perl modules preinstalled, and I need to include the Net::SSH::Expect module which has dependency on IO::Pty/Tty but I am having similar issues wth /dev/ttyx hanging during the build with cpan. I know I can build manually and leave out the 'make test' but I would prefer a fix rather than a workaround I have installed cpanplus and have managed to build successfully by pressing ^C when the 'open /dev/ttyx/' freezes and continue with the install.
      hi ... i'm having the same problem actually. ptsname just hangs. unfortunately i'm not as savvy regarding the work around and could use the help to just get this working.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://857756]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (19)
As of 2014-07-10 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (213 votes), past polls