Re: 5.12.3 portable / Tk installation

2011-11-23 Thread Sergei Steshenko
The thread contains http://perlmonks.org/?node_id=899504 - 
http://www.nntp.perl.org/group/perl.win32.vanilla/2010/07/msg252.html - 
http://www.nntp.perl.org/group/perl.win32.vanilla/2010/07/msg251.html

- which appears to be a solution.

I haven't tried it myself.

Regards,
  Sergei.



- Original Message -
 From: Ch Lamprecht ch.l.n...@online.de
 To: win32-vanilla@perl.org
 Cc: 
 Sent: Wednesday, November 23, 2011 1:06 PM
 Subject: 5.12.3 portable / Tk installation
 
 Hello,
 
 there is a problem with Tk-804.030 build failing using strawberry 5.12.3 
 portable.
 The following test-report gives details (Win7). I see the same issue trying 
 to 
 build Tk on WinXP 32 / strawberry 5.12.3 portable.
 
 http://www.cpantesters.org/cpan/report/cd91ab56-6bf3-1014-831b-9f0412cd2d3c
 
 Tk builds fine using the standard strawberry installation:
 
 http://www.cpantesters.org/cpan/report/c7ef3add-6c7e-1014-a540-09fc885448ee
 
 The problem was discussed here without a solution:
 
 http://perlmonks.org/?node_id=939207
 
 Cheers, Christoph



Re: gcc for building Perl on WinXP

2011-11-02 Thread Sergei Steshenko




- Original Message -
 From: Mark Dootson mark.doot...@znix.com
 To: Chris Marshall devel.chm...@gmail.com
 Cc: Karel Miko karel.m...@hotmail.com; win32-vanilla@perl.org
 Sent: Wednesday, November 2, 2011 7:04 PM
 Subject: Re: gcc for building Perl on WinXP
 
 Hi,
 
 At mingw-w64 Oskan Sezer (sezero) has updated his release of gcc 4.5.4 
 including latest patches.

[snip]

I do not see gcc-4.5.4 at gcc.gnu.org . The latest gcc-4.5.X I see is gcc-4.5.3.

Does such a release really exist ?

Thanks,
  Sergei.



Re: gcc for building Perl on WinXP

2011-11-02 Thread Sergei Steshenko
Visiting


http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/sezero_4.5_2001/

I see gcc: 4.5.4-prerelease (svn r.180676 with patches), so the prerelease 
part solves the mystery.

Regards,
  Sergei.



- Original Message -
 From: Mark Dootson mark.doot...@znix.com
 To: Sergei Steshenko sergst...@yahoo.com
 Cc: win32-vanilla@perl.org win32-vanilla@perl.org
 Sent: Wednesday, November 2, 2011 8:08 PM
 Subject: Re: gcc for building Perl on WinXP
 
 It is the 32bit version of mingw-w64.
 
 Source at
 
 http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/sezero_4.5_2001/
 
 The native 32 bit compiler is
 
 mingw-w32-bin_i686-mingw_2001_sezero.zip
 
 
 
 The bundled compiler toolchains that come with Strawberry Perl are based on
 
 http://mingw-w64.sourceforge.net/
 
 Hope it helps
 
 
 Mark
 
 
 
 On 02/11/2011 17:41, Sergei Steshenko wrote:
 
 
 
 
  - Original Message -
  From: Mark Dootsonmark.doot...@znix.com
  To: Chris Marshalldevel.chm...@gmail.com
  Cc: Karel Mikokarel.m...@hotmail.com; win32-vanilla@perl.org
  Sent: Wednesday, November 2, 2011 7:04 PM
  Subject: Re: gcc for building Perl on WinXP
 
  Hi,
 
  At mingw-w64 Oskan Sezer (sezero) has updated his release of gcc 4.5.4
  including latest patches.
 
  [snip]
 
  I do not see gcc-4.5.4 at gcc.gnu.org . The latest gcc-4.5.X I see is 
 gcc-4.5.3.
 
  Does such a release really exist ?
 
  Thanks,
     Sergei.
 



Re: (fork + socketpair) x 2 doesn't work under Windows, works under Linux

2009-04-21 Thread Sergei Steshenko



--- On Tue, 4/21/09, David Golden xda...@gmail.com wrote:

 From: David Golden xda...@gmail.com
 Subject: Re: (fork + socketpair) x 2 doesn't work under Windows, works under  
 Linux
 To: Sergei Steshenko sergst...@yahoo.com
 Cc: win32-vanilla@perl.org
 Date: Tuesday, April 21, 2009, 1:19 PM
 On Tue, Apr 21, 2009 at 3:52 PM,
 Sergei Steshenko sergst...@yahoo.com
 wrote:
 
  Hello All,
 
  has anyone encountered the problem described here:
 
  http://bugs.activestate.com/show_bug.cgi?id=82846
 
 If you look at perldoc perlport, it claims that
 socketpair isn't
 implemented on Win32.
 
   socketpair
           Not implemented. (Win32,
 RISC OS, VOS, VM/ESA)
 
 So I'm surprised it works when you fork/socketpair even
 once.
 
 Moreover, if you look at perldoc perlfork, you'll see
 that fork on
 Win32 is emulated using Perl threads and there are some
 cautions in
 there about sockets, pipes, etc.  I suspect that it's
 the second fork
 that's causing the problem, but couldn't give you more
 specific
 guidance than that.
 
 Best of luck,
 David
 

Well, if 'socketpair' is not implemented as the documentation says, then
it's another bug.

I tried something not implemented from POSIX module, and the attempt ended
up in getting something like not implemented in your OS error message.

Actually, just moving lines around I think I can make the code work - the
following:

 1  #!/usr/bin/perl -w
 2
 3  # pipe2 - bidirectional communication using socketpair
 4  #   the best ones always go both ways
 5  use Socket;
 6  use IO::Handle; # thousands of lines just for autoflush :-(
 7  # We say AF_UNIX because although *_LOCAL is the
 8  # POSIX 1003.1g form of the constant, many machines
 9  # still don't have it.
10
11  use strict;
12
13  my $child_fh;
14  my $parent_fh;
15  socketpair($child_fh, $parent_fh, AF_UNIX, SOCK_STREAM, PF_UNSPEC) or 
die socketpair: $!;
16
17  $child_fh-autoflush(1);
18  $parent_fh-autoflush(1);
19  my $pid;
20  if($pid = fork)
21{
22close $parent_fh;
23print $child_fh Parent Pid $$ is sending this\n;
24chomp(my $line = $child_fh);
25warn Parent Pid $$ just read this: '$line';
26close $child_fh;
27waitpid($pid,0);
28}
29  else
30{
31die cannot fork: $! unless defined $pid;
32close $child_fh;
33chomp(my $line = $parent_fh);
34warn Child Pid $$ just read this: '$line';
35print $parent_fh Child Pid $$ is sending this\n;
36close $parent_fh;
37
38  {
39  my $child_fh;
40  my $parent_fh;
41  socketpair($child_fh, $parent_fh, AF_UNIX, SOCK_STREAM, PF_UNSPEC) 
or die socketpair: $!;
42
43  $child_fh-autoflush(1);
44  $parent_fh-autoflush(1);
45  my $pid;
46  if($pid = fork)
47{
48close $parent_fh;
49print $child_fh Parent Pid $$ is sending this\n;
50chomp(my $line = $child_fh);
51warn Parent Pid $$ just read this: '$line';
52close $child_fh;
53waitpid($pid,0);
54}
55  else
56{
57die cannot fork: $! unless defined $pid;
58close $child_fh;
59chomp(my $line = $parent_fh);
60warn Child Pid $$ just read this: '$line';
61print $parent_fh Child Pid $$ is sending this\n;
62close $parent_fh;
63exit;
64}
65  }
66
67exit;
68}

works under both Linux and Windows; under Windows the code prints negative
PIDs due to, I think, threads IDs rather then PIDs.

So, even two forks can work.

Any further ideas ?

Thanks,
  Sergei.





(fork + pipe + pipe) x 2 doesn't work under Windows, works under Linux

2009-04-21 Thread Sergei Steshenko

Hello All,

this is kind of follow-up on

(fork + socketpair) x 2 doesn't work under Windows, works under Linux

reported earlier.

This time I modified the example with 'pipe' rather than 'socketpair', and 
according to 'man perlport' there are no special comments WRT Win32, i.e.
I guess one can assume that 'pipe' is implemented under Windows.

The details are here:

http://bugs.activestate.com/show_bug.cgi?id=82870
.

Any ideas/suggestions ?

Thanks,
  Sergei.