Problem compiling perl module Term::ReadKey under cygwin

Charles S. Wilson
Wed Jun 14 10:09:00 GMT 2000

*I* know of no problems using cpan updates with my perl -- it works fine
for me. I haven't tried Term::ReadKey though.

However, your problem is different. It's because of a recent change to
cygwin -- see the recent cygwin mailing list thread entitled 'Wierd
patch problem' starting with

The change to cygwin is that ANY path that contains a backslash is
interpreted as a windows path, so /tmp\cc001120.base becomes "CURRENT

I think you need to create a \tmp directory in the root of the drive in
which you're building. So, if you're building in /usr/local/ and /usr is
mounted from F:\cygwin, then create F:\tmp

This is a hack to work around an error in the perlbuild scripts ('\'
shouldn't be used as a path separator) but it works okay on most unices.
It's just showing up now on cygwin (and only cygwin) because of the
recent change in cygwin's path handling.

Cygwin List:
  I think this argues for the recently proposed (and shot down) patch
that establishes (yet another) CYGWIN= setting so that, if set, paths
are interpreted as windows paths if and only if they contain ALL '\' and
no '/'. If that CYGWIN= setting is unset, behavior is unchanged from the

  This is the second complaint in two days I've gotten on this
cygwin-perl-/tmp issue.


Steve Kelem wrote:
> 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
> Help!
> Steve Kelem
> Here's the transcript:
> % gcc --version
> 2.95.2
> % 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
>         at
> 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
> /home/Kelem/.cpan/sources/modules/02packages.details.txt.gz
> 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
> /home/Kelem/.cpan/sources/authors/id/K/KJ/KJALB/TermReadKey-2.14.ta
> r.gz ok
> TermReadKey-2.14/
> TermReadKey-2.14/
> TermReadKey-2.14/README
> TermReadKey-2.14/MANIFEST
> TermReadKey-2.14/
> TermReadKey-2.14/
> TermReadKey-2.14/Makefile.PL
> TermReadKey-2.14/
> TermReadKey-2.14/ppport.h
> TermReadKey-2.14/ReadKey.xs
> 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
> /usr/local/lib/perl5/5.6.0/cygwin/CORE/libperl5_6_0.a
> 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
> /usr/local/lib/perl5/5.6.0/cygwin/CORE/libperl5_6_0.a
> 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
> /tmp\cc001181.base
> 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
> /usr/local/lib/perl5/5.6.0/cygwin/CORE/libperl5_6_0.a
> 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

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list