develooper Front page | perl.tcltk | Postings from August 2018

Error running Makefile.PL on Windows

Thread Next
From:
Christopher Chavez
Date:
August 20, 2018 16:06
Subject:
Error running Makefile.PL on Windows
Message ID:
d72d04f7-7f03-689f-293c-4e478f0afd12@gmx.us
I have a machine with Windows 10 64-bit 1803, ActivePerl* 5.24.3, and 
ActiveTcl 8.6.7.

*(Uses dmake and doesn't have gnu make. I'm not constrained to 
ActivePerl; I just didn't know about Strawberry until recently.)

I tried installing Tcl.pm 1.25 from cpanm as well as running the latest 
tcl.pm/Makefile.PL on git, but get errors:

 > error starting tclsh: $?=-1; $!=Inappropriate I/O control operation
 > error writing "stdout": broken pipe
 >     while executing
 > "puts "tclsh=[info nameofexecutable]""
 >     (file "tclcfg.tcl" line 1)

I.e. from the first error it appears to be dying at line 115:

     _die "error starting $tclsh: \$?=$?; \$!=$!\n" if $?!=0;

and the second error is just stderr from tclsh (complaining it couldn't 
write to stdout because Perl died)…


But running `tclsh tclcfg.tcl` both manually and from Perl seems to give 
the correct output. In fact if I comment out line 115 (`_die … if 
$?!=0`), then the tclsh output gets put in $tclcfg, and Makefile.PL 
seems to finish as expected.


I'm not sure what's wrong here. The only thing that seems strange to me 
is that $?=-1 for opening a command pipe on Windows (I can get $?=-1 for 
something like `open(my $fh, "echo hello |")`) but not on other OSes 
(e.g. macOS, where $?=0 when open() works). I have not found if/where 
this is explained in `perldoc open` or `perldoc perlipc`.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About