Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

IO:Tty installation in cygwin fails. stuck at "trying to open /dev/tty1."

by ericfons (Initiate)
on Nov 14, 2011 at 23:24 UTC ( #938045=perlquestion: print w/replies, xml ) Need Help??
ericfons has asked for the wisdom of the Perl Monks concerning the following question:

When I try to install IO::Tty in cygwin environment, it gets stuck at "trying to open /dev/tty?..." each time.

The first time I tried it got stuck at:

"trying to open /dev/tty1...".

When I aborted, and retried, it got stuck at:

"trying to open /dev/tty2..."

Each time I abort and retry the tty number goes up - tty3, tty4 etc.

(see log snippet at the end)

Given my limited knowledge of unix, I tried this:

ln -s /dev/stdout /dev/tty5

where 5 was the next tty number that it would get hung at duing the next attempt. It still got hung at tty5. In other words the symbolic link did not help.

I am running the latest version of cygwin v1.7.9. I need to install IO::Tty so that perl module Expect can be installed.

I'm really out of ideas. Your help will be much appreciated.

: Writing 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 blib/lib/IO/ cp Tty/ blib/lib/IO/Tty/ cp blib/lib/IO/ /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 && cp blib/arch/auto/IO/Tty/ && \ chmod 644 blib/arch/auto/IO/Tty/ 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" 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...

Replies are listed 'Best First'.
Re: IO:Tty installation in cygwin fails. stuck at "trying to open /dev/tty1."
by quester (Vicar) on Nov 15, 2011 at 07:52 UTC

    Based on a comment (Re^3: IO::Pty with Cygwin - can't install (by azredwing), in thread IO::Pty with Cygwin - can't install (also by azredwing) it looks like will work even if that particular test in IO::Tty fails.

    YMMV, but you could try this and see if it helps:

    # cpan cpan[1]> notest install IO::Tty cpan[2]> install Expect

    If all goes well, Expect will pass its tests and install. It worked for me (Windows Vista, Cygwin 1.7.9-1.)

    There is also a more drastic form of install, "force install IO::Tty", which will run the test but attempts to continue even if there are failures. Since the test hangs, you will have to control-C out of the test so the install will complete.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2017-03-25 00:57 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (310 votes). Check out past polls.