Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error running Makefile.PL on Windows

5 views
Skip to first unread message

Christopher Chavez

unread,
Aug 20, 2018, 12:15:03 PM8/20/18
to tc...@perl.org
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

Konovalov, Vadim

unread,
Aug 20, 2018, 3:45:03 PM8/20/18
to Christopher Chavez, tc...@perl.org
> 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.)


If you think that "dmake" is source of trouble, then we can add
workaround in Makefile.PL to handle your case.

You can add a code that checks these vars $? and $! differently

fortunately, our Makefile.PL already has a stub to deal with dmake,
so you can benefit from it.

Regards,
Vadim

Konovalov, Vadim

unread,
Aug 20, 2018, 4:45:03 PM8/20/18
to Christopher Chavez, tc...@perl.org
OMG you're correct

Will have a closer look tomorrow

-----Original Message-----
From: Christopher Chavez [mailto:chris...@gmx.us]
Sent: Monday, August 20, 2018 11:01 PM
To: tc...@perl.org
Subject: Re: Error running Makefile.PL on Windows
Fortunately I haven't encountered an issue with dmake specifically. I was checking to see if the past few commits of Tcl.pm would compile, and found the one from a few weeks ago when there were some suspicions over dmake causing compilation issues. The "dmake prohibited" message seemed to confuse ActivePerl for "modified" Strawberry Perl installation due to presence of dmake/lack of GNU make. But that message has since been reverted since the problem (if there is one) is believed to be elsewhere.
0 new messages