X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <6910a60802140142h57630ca8x56259befe152c1d3@mail.gmail.com> Date: Thu, 14 Feb 2008 10:42:08 +0100 From: "Reini Urban" To: cygwin AT cygwin DOT com Subject: Re: Perl with SerialPort In-Reply-To: <01d101c86e95$36d4b030$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <15468287 DOT post AT talk DOT nabble DOT com> <01d101c86e95$36d4b030$2e08a8c0 AT CAM DOT ARTIMI DOT COM> X-Google-Sender-Auth: f59020b1d2ccb11c X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 2008/2/14, Dave Korn : > On 13 February 2008 22:59, Dave Korn wrote: > > On 13 February 2008 22:46, Dave Korn wrote: > >> On 13 February 2008 21:23, curator wrote: > > >>> So the question is: i would like to prefer no 2. For that i have to > >>> install SerialPort for Perl for cygwin. > >>> > >>> Is this possible, and if yes, could you tell me how? Win32::SerialPort is not a recommended module for any platform other than ActivePerl for MSWin32. It uses Win32::API. The author had not the lightest idea how to use ExtUtils::MakeMaker. cpan Win32::SerialPort .. CPAN::Reporter: Makefile.PL result is 'pass', No errors. BBIRTH/Win32-SerialPort-0.19.tar.gz /usr/bin/perl.exe Makefile.PL -- NO Makefile created Running make test Make had some problems, won't test Running make install Make had some problems, won't install With the simple Makefile.PL below[1] and my Win32::API patches[2] for gcc, it works fine [3]. [1]: use ExtUtils::MakeMaker; WriteMakefile( 'NAME' => 'Win32::SerialPort', 'VERSION_FROM' => 'lib/Win32/SerialPort.pm', # finds $VERSION ); [2]: add http://rurban.xarch.at/software/cygwin to your setup path and select perl-Win32-API 0.42-1 for perl-5.8.x and 0.42-2 for perl-5.10.0-3 [3] /usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/test1....defined(@array) is deprecated at t/test1.t line 445. (Maybe you should just omit the defined()?) t/test1....ok t/test2....ok t/test3....defined(@array) is deprecated at t/test3.t line 444. (Maybe you should just omit the defined()?) t/test3....FAILED test 195 Failed 1/244 tests, 99.59% okay t/test4....FAILED tests 100, 252 Failed 2/516 tests, 99.61% okay t/test5....FAILED test 166 Failed 1/166 tests, 99.40% okay t/test6....NOK 116/315SetCommState failed at t/test6.t line 403 t/test6....FAILED tests 74, 114, 116, 201, 233, 237 Failed 6/315 tests, 98.10% okay t/test7....ok Failed Test Stat Wstat Total Fail List of Failed ------------------------------------------------------------------------------- t/test3.t 244 1 195 t/test4.t 516 2 100 252 t/test5.t 166 1 166 t/test6.t 315 6 74 114 116 201 233 237 Failed 4/7 test scripts. 10/1749 subtests failed. Files=7, Tests=1749, 61 wallclock secs ( 1.73 cusr + 0.87 csys = 2.59 CPU) Failed 4/7 test programs. 10/1749 subtests failed. make: *** [test_dynamic] Error 255 > >> I'm no perl expert, > > > > Still true, but I've found one thing out since sending that: > > > Still true, but I've found another: > > > > Running make test > > /usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, > > 'blib/lib', 'blib/arch')" t/*.t > > t/01timing.............ok 4/7 > > t/01timing.............NOK 7# Failed test (t/01timing.t at line 33) > > # then: 207441765 now: 207443905 diff: 2140 > > # Looks like you failed 1 test of 7. > > t/01timing.............dubious > > > That diff is absolutely reliably consistently 2140 for me. I'd speculate > that maybe the cygwin signal emulation requires a context switch or two, to or > away from the signal processing thread, and so we're seeing an extra quantum > or two of constant overhead for systematic reasons. So... > > > looking at 01timing.t:- > > Well, editing it in ~/.cpan/build/Device-SerialPort-1.04/t/, to be exact: > > > > # Allow 100ms fudge-time for slow calls, etc > > ok( ($now-$then) <= 2100, "measured sleep as less than 2 seconds") > > or diag("then: $then now: $now diff: ".($now-$then)); # test > > > Change that to "100ms" and "<= 2200" and it goes ahead and installs. Thanks! -- Reini Urban http://phpwiki.org/ http://murbreak.at/ http://spacemovie.mur.at/ http://helsinki.at/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/