Problem compiling perl module Term::ReadKey under cygwin

Steve Kelem
Wed Jun 14 09:39:00 GMT 2000

I'm getting some compilation errors when trying to install some perl
modules using cpan in cygwin 1.0 with the net updates.  I'm running
Windows NT 4.0 SP6a.

One error has to do with sgtty.  Ken, do you know if that's a problem?
Does Term::ReadKey require sgtty?
I believe Chris Faylor @ Red Hat said there's no support for sgtty in
cygwin, and no plans for support.

I installed Charles Wilson's Perl for Cygwin 1.0 (I have the CD.) on
Windows NT 4.0 SP6a.
Charles, is there a known problem with the cpan updates or the
Term::ReadKey module using your perl?

Mumit, I've searched the cygwin archives for a solution to the collect2
problem, and it isn't clear what the status is for this bug.

Any idea what's wrong?  I tried installing ld.exe as collect-ld.exe in
the directory with cc1.exe

Steve Kelem

Here's the transcript:
% gcc --version
% cpan_update
cpan shell -- CPAN exploration and modules installation (v1.54)
ReadLine support enabled

Can't ioctl TIOCGETP: Invalid argument
Consider installing Term::ReadKey from CPAN site nearby
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_NOWARN

in your environment.
cpan> install Term::ReadKey
Going to read /home/Kelem/.cpan/sources/authors/01mailrc.txt.gz
Going to read
Scanning cache /home/Kelem/.cpan/build for sizes
Going to read /home/Kelem/.cpan/sources/modules/
Running make for K/KJ/KJALB/TermReadKey-2.14.tar.gz
CPAN: MD5 loaded ok
Checksum for
r.gz ok
Removing previously used /home/Kelem/.cpan/build/TermReadKey-2.14 Going to build K/KJ/KJALB/TermReadKey-2.14.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Term::ReadKey
mkdir blib
mkdir blib/lib
mkdir blib/lib/Term
mkdir blib/arch
mkdir blib/arch/auto
mkdir blib/arch/auto/Term
mkdir blib/arch/auto/Term/ReadKey
mkdir blib/lib/auto
mkdir blib/lib/auto/Term
mkdir blib/lib/auto/Term/ReadKey
mkdir blib/man3
cp blib/lib/Term/
AutoSplitting blib/lib/Term/ (blib/lib/auto/Term/ReadKey)
/usr/local/bin/perl -I/usr/local/lib/perl5/5.6.0

Writing termio/termios section of cchars.h... Done.
Checking for sgtty...
        Sgtty NOT found.
Writing sgtty section of cchars.h... Done.
/usr/local/bin/perl -I/usr/local/lib/perl5/5.6.0/cygwin
-I/usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/5.6.0/ExtUtils/xsubpp
-typemap usr/local/lib/perl5/5.6.0/ExtUtils/typemap ReadKey.xs >
ReadKey.xsc && mv ReadKey.xsc ReadKey.c
Please specify prototyping behavior for ReadKey.xs (see perlxs manual)
gcc -c  -fno-strict-aliasing -I/usr/local/include -DUSEIMPORTLIB -O
-DVERSION=\"2.14\" -DXS_VERSION=\"2.14\"
-I/usr/local/lib/perl5/5.6.0/cygwin/CORE  ReadKey.c
Running Mkbootstrap for Term::ReadKey ()
chmod 644
LD_RUN_PATH="" ld2 -o blib/arch/auto/Term/ReadKey/ReadKey.dll
-L/usr/local/lib ReadKey.o
dllwrap --dllname ReadKey.dll --driver-name gcc --dlltool dlltool
--export-all-symbols --as as --output-def libReadKey.def --output-lib
libReadKey.a \
 -L/usr/local/lib ReadKey.o
Warning: no export definition file provided
dllwrap will create one, but may not be what you want
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/collect-ld: Can't open base file
collect2: ld returned 1 exit status
dllwrap: gcc exited with status 1
perlld: *** system() failed to execute
dllwrap --dllname ReadKey.dll --driver-name gcc --dlltool dlltool
--export-all-symbols --as as --output-def libReadKey.def --output-lib
libReadKey.a \
 -L/usr/local/lib ReadKey.o

make: *** [blib/arch/auto/Term/ReadKey/ReadKey.dll] Error 1
  /bin/make  -- NOT OK
Running make test
  Oops, make had returned bad status
Running make install
  Oops, make had returned bad status

More information about the Cygwin mailing list