RE: Error running Makefile.PL on Windows

2018-08-21 Thread Konovalov, Vadim
It appears that on $^O MSWin32 both perl-5.8.4, 5.6.1 are good with our 
"Makefile.PL",
Also "Cygwin" is good, and obviously "linux" + freebsd

Perl-5.12 5.16 5.16 and 5.28 all fail with 

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)

IMO this is MSWin32 incompatibility WRT "$?" var.

What we need to do is workaround which will ignore $? on win32.

Report with perlbug to perl5-port...@perl.org?





-Original Message-
From: Konovalov, Vadim [mailto:vadim.konova...@dell.com] 
Sent: Monday, August 20, 2018 11:39 PM
To: Christopher Chavez; tcltk@perl.org
Subject: RE: Error running Makefile.PL on Windows

OMG you're correct

Will have a closer look tomorrow

-Original Message-
From: Christopher Chavez [mailto:chrischa...@gmx.us] 
Sent: Monday, August 20, 2018 11:01 PM
To: tcltk@perl.org
Subject: Re: Error running Makefile.PL on Windows


On 8/20/2018 2:36 PM, Konovalov, Vadim wrote:
>> 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.
>
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.

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


RE: Error running Makefile.PL on Windows

2018-08-20 Thread Konovalov, Vadim
OMG you're correct

Will have a closer look tomorrow

-Original Message-
From: Christopher Chavez [mailto:chrischa...@gmx.us] 
Sent: Monday, August 20, 2018 11:01 PM
To: tcltk@perl.org
Subject: Re: Error running Makefile.PL on Windows


On 8/20/2018 2:36 PM, Konovalov, Vadim wrote:
>> 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.
>
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.

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


Re: Error running Makefile.PL on Windows

2018-08-20 Thread Christopher Chavez



On 8/20/2018 2:36 PM, Konovalov, Vadim wrote:

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.

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.


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


RE: Error running Makefile.PL on Windows

2018-08-20 Thread Konovalov, Vadim
> 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



Error running Makefile.PL on Windows

2018-08-20 Thread Christopher Chavez
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